CCTMXTiledMap sometimes could not get some values from the objectGroup

Hey,there! Lately,I came with a problem.

I added a CCTMXTiledMap to a layer. BTW, I parsed some value from the map.

Like this:
spawnPoint->valueForKey(“x”)->floatValue();
spawnPoint->valueForKey(“y”)->floatValue();

Sometimes it worked fine.

But, Sometimes , it came out that the key value equaled “” . so the floatValue() throwed exceptions!

Did anyone meet this?

Maybe is there anything wrong with my map file? Since sometimes I opened my PC and Debug, fine.

But sometimes it crashed . Really boring and helpless. It Seemed not the code reason,right?

I used Cocos2d-X (Version 2.20) and the latest Tiled MapEditor
Thanks in advance! :slight_smile:

show your codes.
Maybe it’s out of index ?