Threading requirements for Noesis::GUI::Shutdown
Posted: 28 Jul 2022, 15:26
Hi!
We've ran into an issue (NoesisGUI 3.1.4) with Shutdown method reporting threading errors like this:
According to your doc https://www.noesisengine.com/docs/Gui.C ... orial.html a View object has to be accessed from the owner thread, but it is possible to use separate views with different threads. It doesn't say anything about Init and Shutdown and we assumed these don't care about specific thread (otherwise which thread would it be?).
We've also noticed that Init and Shutdown has to be called on the same thread. Failing to do this gives an error even without creating any views:
It looks like some UI objects are being created and not released until shutdown and thus having shutdown in a separate thread violates their threading requirements.
We've ran into an issue (NoesisGUI 3.1.4) with Shutdown method reporting threading errors like this:
This happens if we use one thread for GUI:Init and GUI::Shutdown but create/update views in a different thread.[NOESIS/I] Noesis Shutdown
[NOESIS/E] The calling thread (***) cannot access this DispatcherObject because a different thread (***) owns it
According to your doc https://www.noesisengine.com/docs/Gui.C ... orial.html a View object has to be accessed from the owner thread, but it is possible to use separate views with different threads. It doesn't say anything about Init and Shutdown and we assumed these don't care about specific thread (otherwise which thread would it be?).
We've also noticed that Init and Shutdown has to be called on the same thread. Failing to do this gives an error even without creating any views:
Overall it is not a problem to have init/shutdown in the same thread as views - we plan to use a single update thread anyway, but could you advice if this is expected behavior and not some sort of memory leak?[NOESIS/E] The calling thread (***) cannot access this Canvas because a different thread (***) owns it
It looks like some UI objects are being created and not released until shutdown and thus having shutdown in a separate thread violates their threading requirements.