15-03-2012 12:32 AM - edited 15-03-2012 12:33 AM
I've been trying to double check that I'm properly freeing all memory with dispose and cleanup methods. While testing GC.Collect, I found that it would cause Node.StopAllActions to throw a NullRefException. The exception is only thrown when running with the debugger- Ctrl-F5 works fine.
The project below demonstrates the error that I'm seeing. Line 504 in AppManager.cs is where the problem occurs. Press the X key to hit the error.
http://dl.dropbox.com/u/9158350/PssGameFramework-2
pass: pssbetacrew
I think I'll try to import the gameengine src into my project to see if that will give me a better idea where the NullRef is coming from.
on 15-03-2012 08:05 PM
The problem looks to be a conflict between the Node finalizer and Director.Terminate that leaves ActionManager.Instance as null but still called.
on 16-03-2012 10:00 AM
on 16-03-2012 01:52 PM
I've had a brief look into the problems, and I agree with you in that its down to the finalizer and the Director.Terminate() methods. The Director.Terminate() method is responsible for making the ActionManager null, so when the GC comes round and calls the desctructors, the links to the actions are no longer there, which appears to be causing the NullReferenceException to be thrown.
on 19-04-2012 03:45 PM
This still seems to be broken in 0.98. Can you confirm this has been fixed?
on 26-04-2012 04:43 PM
on 26-04-2012 04:59 PM
I understand, thanks.
I ran the 0.97 and 0.98 code through a diff program and am pretty sure it wasn't fixed. GameEngine2d was changed a little but nothing to do with this bug.
on 22-05-2012 05:43 PM
on 22-05-2012 06:10 PM
To me this is just a bug.
I've changed a local copy of GE2D so that, as a simple workaround it checks if the var is null before accessing it and this works. But compiling my own GE2D causes much more memory usage.
Yes, my library divides work into modes, of which GE2D should be just one.
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870