Hot Door CORE Forum
0.7.4 dispatcher::unregisterTimer problem? - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Bugs (http://hotdoorcore.com/forum/forumdisplay.php?fid=5)
+--- Thread: 0.7.4 dispatcher::unregisterTimer problem? (/showthread.php?tid=229)



0.7.4 dispatcher::unregisterTimer problem? - Rick Johnson - 12-20-2019

When updating my plugins for AI 2020 with CORE 0.7.4, nine of them have gone well. One has been crashing on quit after the Plugin::shutdown runs on both Mac and Windows, builds for AI 23 and AI 24 (haven't tried older versions). The project includes two timers. Stepping through my Plugin::shutdown() it handles deactivate(), unregisterTimer(), and destroy() normally, using std::cout<< to verify the timer's properties at each step. The crash happens after my plugin's shutdown method has completed.

In Xcode 10.3, here's the series of events:

6. PluginMain
5. hdi::core::Plugin::_shutdown()
4. hdi::core::Dispatcher::~Dispatcher()
3. hdi::core::__IntDispatcherData::~__IntDispatcherData()
2. hdi::core::__IntDispatcherData::~__IntDispatcherData()
1. hdi::aip::Dispatcher::unregisterTimer()
0. hdi::aip::Dispatcher::timer()


It stops at hdi::aip::Dispatcher::timer() with "Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)" which happens in AI 23 and AI 24. The same code compiled for AI 23 with Xcode 9.4.1 and CORE 0.7.3 is fine.

With VisualStudio 2015, I get an error at about the same time, stopping at "_free_base()" instead for both AI 23 and 24. Again, AI quits normally when compiled with CORE 0.7.3 for either Mac or Windows.

I added the code to define and destroy the timers in the Skeleton project, but the problem still didn't appear when running Skeleton. I also have seven notifiers that access Dispatcher so I added them to Skeleton and everything ran fine. This is the only project I have that uses timers. It's puzzling that code that runs fine in 0.7.3 crashes in 0.7.4 on both Mac and Windows.

Does anything come to mind that may somehow affect shutdown and manifest itself in Dispatcher::timer()? Is there anything I can do to help narrow down what's happening?


RE: 0.7.4 dispatcher::unregisterTimer problem? - brendon - 01-14-2020

Hey Rick,

Can you show us what you did in the Skeleton project so we can try it?

Thanks,

Brendon