Calling API from thread (C++)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey Everyone,
I'm trying to use the Fusion 360 API in a spawned thread. It works the majority of the time but, other times Fusion crashes without throwing an exception back to the user code so, I can't catch it. The offending function is ImportManager::importToTarget(...). isValid() returns true for all the objects used by this function and nothing is null, so I can't detect when Fusion will crash. I use this function in the same way for both the main thread and the spawned thread and it doesn't crash in the main thread so, it's not an implementation issue. Is there a work-around for this? Alternatively, I can run the Fusion code in the main thread if there is a way to interrupt the main thread from the spawned thread (async timer, throw custom events, etc).
Here's what visual studio says about the crashes:
Exception thrown at 0x00007FFD394E1F28 in Fusion360.exe: Microsoft C++ exception: acis_exception at memory location 0x000000834FFFA030.
Exception thrown at 0x00007FFD0059FCD0 (NuBase10.dll) in Fusion360.exe: 0xC0000005: Access violation reading location 0x00000000000000F0.
Thanks,
Ryan