Cocos2DXNA / cocos2d-xna

XNA Port of Cocos2d-X
www.cocos2dxna.com
226 stars 123 forks source link

Invalid target scene state during scene test #140

Closed totallyeviljake closed 11 years ago

totallyeviljake commented 11 years ago

Go to the scene test, play with the push/pop, push with transition, pop with transition, then push and pop and eventually you will get an exception in CCTransition because the target and the current scenes are the same. No specific sequence to reproduce yet.

totallyeviljake commented 11 years ago

this happens on the popSceneWithTransition option in the scene test.

kjpou1 commented 11 years ago

Can you verify this again with the PR https://github.com/totallyevil/cocos2d-xna/pull/144

I can not get the error but maybe this fixes the issue as well.

totallyeviljake commented 11 years ago

this still happens. When I pop with transition, the next scene appears to be the scene that I started with:

SceneTestLayer1#onEnterTransitionDidFinish cocos2d : getActionByTag: Target not found cocos2d : removeActionByTag: Tag -1061138430 not found ---- DEBUG ASSERTION FAILED ---- ---- Assert Short Message ---- Incoming scene must be different from the outgoing scene ---- Assert Long Message ----

at cocos2d.CCTransitionScene.InitWithDuration(Single t, CCScene scene) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\layers_scenes_transitions_nodes\transition\CCTransitionScene.cs:line 104 at cocos2d.CCTransitionScene.Reset(Single t, CCScene scene) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\layers_scenes_transitions_nodes\transition\CCTransitionScene.cs:line 83 at cocos2d.CCDirector.PopScene(Single t, CCTransitionScene s) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\CCDirector.cs:line 978 at tests.SceneTestLayer1.onPopSceneTran(Object pSender) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\tests\tests\classes\tests\SceneTest\SceneTestLayer1.cs:line 75 at cocos2d.CCMenuItem.Activate() in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\menu_nodes\CCMenuItem.cs:line 87 at cocos2d.CCMenuItemLabel.Activate() in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\menu_nodes\CCMenuItemLabel.cs:line 96 at cocos2d.CCMenu.TouchEnded(CCTouch touch, CCEvent e) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\menu_nodes\CCMenu.cs:line 288 at cocos2d.CCTouchDispatcher.Touches(List1 pTouches, CCEvent pEvent, Int32 uIndex) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\touch_dispatcher\CCTouchDispatcher.cs:line 225 at cocos2d.CCTouchDispatcher.TouchesEnded(List1 touches, CCEvent pEvent) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\touch_dispatcher\CCTouchDispatcher.cs:line 51 at cocos2d.CCApplication.ProcessTouch() in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\platform\CCApplication.cs:line 569 at cocos2d.CCApplication.Update(GameTime gameTime) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\cocos2d\platform\CCApplication.cs:line 240 at Microsoft.Xna.Framework.Game.Update(GameTime gameTime) at tests.Game1.Update(GameTime gameTime) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\tests\tests\Game1.cs:line 67 at Microsoft.Xna.Framework.Game.Tick() at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e) at Microsoft.Xna.Framework.GameHost.OnIdle() at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame() at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e) at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Microsoft.Xna.Framework.WindowsGameHost.Run() at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun) at Microsoft.Xna.Framework.Game.Run() at tests.Program.Main(String[] args) in C:\Users\Jacob Anderson\Documents\GitHub\cocos2d-xna\tests\tests\Program.cs:line 105

kjpou1 commented 11 years ago

Oh I see what you did. It actually makes sense because you are running on the root scene and you are trying to pop it off as well because it is the last scene. Is this something we want to catch in the tests?

totallyeviljake commented 11 years ago

I think @kjpou1 fixed this with a recent pr.