[Solve] Events raised on shutdown (CEGUI 0.8.5) (Bug?)
Posted: Sun Apr 17, 2016 16:07
Hey guys,
I've been using CEGUI in my game project for quite a while now. Very nice UI solution.
I recently upgraded from 0.8.3 to 0.8.5 and I was faced with some weird issue:
When shutting down CEGUI (destroy()/destroySystem()), it seems some of my subscribed event handlers get raised one more time.
This is particularly true for the "Deactivated" and the related "TextAccepted" events on the Editbox class (in my case stored in List-Items).
I had to add a call to "removeAllEvents()" into the destroy() of Window class to "fix" this for all cases.
The other solution was to manually "unregister" all subscribed events on my cegui-instances before shutting down CEGUI...
See this commit on my repo:
https://github.com/cyberjunk/meridian59 ... 3f4d84f5c8
Note: This commit also includes another fix from your repo. The important line is only the "removeAllEvents()".
(Other changes from: https://bitbucket.org/cegui/cegui/commi ... 1eca12aba5)
Is this a bug? Or are users supposed to manually unregister all events before shutting down?
I've been using CEGUI in my game project for quite a while now. Very nice UI solution.
I recently upgraded from 0.8.3 to 0.8.5 and I was faced with some weird issue:
When shutting down CEGUI (destroy()/destroySystem()), it seems some of my subscribed event handlers get raised one more time.
This is particularly true for the "Deactivated" and the related "TextAccepted" events on the Editbox class (in my case stored in List-Items).
I had to add a call to "removeAllEvents()" into the destroy() of Window class to "fix" this for all cases.
The other solution was to manually "unregister" all subscribed events on my cegui-instances before shutting down CEGUI...
See this commit on my repo:
https://github.com/cyberjunk/meridian59 ... 3f4d84f5c8
Note: This commit also includes another fix from your repo. The important line is only the "removeAllEvents()".
(Other changes from: https://bitbucket.org/cegui/cegui/commi ... 1eca12aba5)
Is this a bug? Or are users supposed to manually unregister all events before shutting down?