Closed kjpou1 closed 11 years ago
Is this in CCBReader?
CCSizeConverter.cs line 28? NULL value there? From CCSize.Parse line 272 while reading the sprite frames from a PList.
SpriteFrameAliasNameTest (line 24)
this one is an incorrectly formatted type 3 Plist file.
This regression was introduced by the new type converters. In the past, the CCSize.parse would ignore the null I think, but the type converters do not. That's good, because this PList is clearly not format 3.
animations/grossini-aliases.plist, it's a format 2 hybrid with aliases in it.
The original cocos2d-x had the correct plist for this one, so I pulled it in
I my commit fixes this?
https://github.com/totallyevil/cocos2d-xna/commit/92428734079dfe4ca366bd22c73380d40307dc18
Jake
Thanks for that. I was going to allow null and pass it on through which would not have been good in the end.
I will test you change. Is there anything we really should be checking here instead and send a more informative error?
The PList reader should handle incorrectly formatted fields better than it does. So if we want to fix this NRE then it should happen at the Plist level instead of the type converter.
That did not work.
I totally agree with what you say it should be fixed at the Plist level instead of the type converter. That means that the Plist is not correctly formatted for some reason.
All of the sprite tests work for me. Which one is failing for you?
Oh I see I think it is because it was just the .plist that you committed and not the .xnb of the plist. I do not have windows here to create the content.
oops, sorry!
Here is what I got from git:
Kenneth-Pounceys-iMac:cocos2d-xna Jimmy$ git fetch upstream remote: Counting objects: 21, done. remote: Compressing objects: 100% (6/6), done. remote: Total 10 (delta 7), reused 7 (delta 4) Unpacking objects: 100% (10/10), done. From https://github.com/totallyevil/cocos2d-xna d43515e..9242873 master -> upstream/master Kenneth-Pounceys-iMac:cocos2d-xna Jimmy$ git merge upstream/master Merge made by the 'recursive' strategy. tests/testsContent/animations/grossini-aliases.plist | 500 +++++++++++++++++++++--------------------- 1 file changed, 250 insertions(+), 250 deletions(-)
Yes!!! And another one bites the dust.
Thanks. That really is better than what I was going to do.
There seems to be a regression with the change made when eliminating CCNS https://github.com/totallyevil/cocos2d-xna/pull/78.
There are null values that need to be considered or it is reading incorrectly.