Error: The value type isn't Type::MAP?

Hi!

So it has all been working for a lot of time but now all of a sudden this happened every time that it starts. It crashes every time:


After a lot of tests and breakpoints i’ve figured that this code was causing the error but still do not know how to fix it:

       SpriteFrameCache::getInstance()->addSpriteFramesWithFile("Main.plist");
       SpriteFrameCache::getInstance()->addSpriteFramesWithFile("Misc.plist");

And i do have the files in my “resource” folder…Why did this even happen and how to fix>?

Thanks, I WOULD APPRECIATE YOUR TIME<3

What version of Cocos2d-x?

and does it happen if you just add one plist?

Post your plist file.

Step into the addSpriteFramesWithFile function to track down the issue.

I am using cocos2d-x V3.7
2. No i have found out that it only happens for the “Misc.plist”, the other one works fine. Why?

@iQD,
Here is the two files: plistFiles.zip (13.6 KB)

I assume something is wrong in the .plist. Maybe comment it out and start adding back each one a few at a time until it fails. then see what those look like?

Maybe check for matching { }

Good luck with >1800 entries :wink:

It was generated by TexturePacker, but it seems he was inserting something by hand afterwards.

Where is the cocos2d-x file format checker :smile:

Because you have inserted a bogus entry at line No. 9393:

<key>New item</key>
<string></string>

Get rid of it and all is fine.

Btw. You have a lot of frames in those files :wink:

2 Likes

It would be no problem for Chuck Norris.

Of course, because errors correct themselves in front of Chuck Norris.

Well Chuck Norris can write a .plist by hand faster than TexturePacker :smile:

How would that happen, as Chuck Norris never has to write something himself? The computer would write it for Chuck Norris.

I’ll think of one, let me get back to you :slight_smile: