4) Pop back to scene A and change the connection status (use sdkbox::PluginSdkboxPlay::signin() and sdkbox::PluginSdkboxPlay::signout()).
5) Notice that B::onConnectionStatusChanged gets called. In other words sdkbox::PluginSdkboxPlay::removeListener() doesn't work properly!
This is dangerous because the methods of the listener typically access to properties of the Layer. But if the Scene was deallocated this generate an invalid memory access and then a crash.
How to reproduce: 1) Create two
Scene
A
andB : public SdkboxPlayListener
. 2) Overrides the two methods in B:3) Add:
4) Pop back to scene A and change the connection status (use
sdkbox::PluginSdkboxPlay::signin()
andsdkbox::PluginSdkboxPlay::signout()
). 5) Notice thatB::onConnectionStatusChanged
gets called. In other wordssdkbox::PluginSdkboxPlay::removeListener()
doesn't work properly!This is dangerous because the methods of the listener typically access to properties of the Layer. But if the Scene was deallocated this generate an invalid memory access and then a crash.
Tested on Android device.