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

RemoteControl RemoteAdministrator.h ASSERT always hit ASSERT((_keyCallback == nullptr) ^ (callback == nullptr)); #836

Open
laurence-ejraee opened this issue Oct 4, 2024 · 1 comment

Comments

@laurence-ejraee
Copy link

Hello,

When I enable build type debug on R5 Thunder with R5 ThunderNanoServices, this ASSERT in RemoteAdministrator.h is always hit on the second time of activating the RemoteControl plugin.

What seems to be happening is for the first activation of RemoteControl plugin, the ASSERT is fine because _keyCallback is nullptr since the RemoteAdministrator has just been created. However, when deactivated and then activated a second time, the ASSERT is hit because for some reason _keyCallback is not nullptr.

It seems RemoteAdministrator is not destroyed when the RemoteControl plugin is deactivated. Is this the intended behaviour or a bug?
Or do you believe the issue is something else?

Here is the stack trace at the fail:

===== $$ [3271]: ASSERT [RemoteAdministrator.h:436] ((_keyCallback == nullptr) ^ (callback == nullptr))
[<...>/usr/lib/libThunderCore.so.5]:[DumpCallStack]:[68]
[<...>/usr/lib/thunder/plugins/libThunderRemoteControl.so]:[Thunder::Remotes::RemoteAdministrator::Callback(Thunder::Exchange::IKeyHandler*)]:[256]
[<...>/usr/lib/thunder/plugins/libThunderRemoteControl.so]:[Thunder::Plugin::RemoteControl::Initialize[abi:cxx11](Thunder::PluginHost::IShell*)]:[3380]
[<...>/usr/bin/Thunder]:[]:[-1]

Any help is much appreciated!
Thanks.

@laurence-ejraee
Copy link
Author

If I add the following calls to set the variables back to the expected nullptr in RemoteControl.cpp Deinitialize() it fixes the issue:

        admin.Callback(static_cast<IKeyHandler*>(nullptr));
        admin.Callback(static_cast<IWheelHandler*>(nullptr));
        admin.Callback(static_cast<IPointerHandler*>(nullptr));
        admin.Callback(static_cast<ITouchHandler*>(nullptr));

Are these calls or similar missing from the implementation, or is there some other bug happening in my build?
Thanks.

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

1 participant