Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception on game destroy after a scene has been restarted #3878

Closed
mbunby opened this issue Jul 30, 2018 · 1 comment
Closed

exception on game destroy after a scene has been restarted #3878

mbunby opened this issue Jul 30, 2018 · 1 comment

Comments

@mbunby
Copy link

mbunby commented Jul 30, 2018

version: 3.11

example: https://codepen.io/anon/pen/EpoXPG?editors=1111

steps to reproduce

  • starting with 'SceneA', click to change to 'SceneB'
  • click again to change back to 'SceneA'
  • press the 't' key to destroy the game instance

expected behaviour

when game.destroy() is called, the scene manager should destroy each scene's systems without throwing an error.

actual behaviour

throws the following exception:

phaser.js:114617 Uncaught TypeError: Cannot read property 'events' of null
at CameraManager.shutdown (phaser.js:114617)
at CameraManager.destroy (phaser.js:114633)
at EventEmitter.emit (phaser.js:2030)
at Systems.destroy (phaser.js:27523)
at SceneManager.destroy (phaser.js:47768)
at Game.runDestroy (phaser.js:109537)
at Game.step (phaser.js:109315)
at TimeStep.step (phaser.js:106091)
at step (phaser.js:66488)

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants