Sentry crash report: EXCEPTION_ACCESS_VIOLATION_WRITE
Sentry Issue: IMODELJSNODEADDON-130
EXCEPTION_ACCESS_VIOLATION_WRITE / 0x24: Fatal Error: EXCEPTION_ACCESS_VIOLATION_WRITE / 0x24
?, in RtlpWaitOnCriticalSection
?, in RtlpEnterCriticalSectionContended
?, in RtlEnterCriticalSection
File "node_api.cc", line 1383, in napi_call_threadsafe_function
return reinterpret_cast<v8impl::ThreadSafeFunction*>(func)->Push(data,
?
...
(53 additional frame(s) were not displayed)
Sentry is still reporting crashes, reopened the issue.
Call stack in this crash event shows that NativeECPresentationManager destructor is being called without first calling the Terminate method. In addition, based on what happens further, it seems there are open iModels as well.
This suggests that on the TS side the application creates a PresentationManager and doesn't call dispose on it before exiting the process. In cases then the manager is retrieved through Presentation entry point, this could as well happen due to IModelHost.shutdown() not being called on process exit.
I couldn't find a way to reproduce this in itwin-studio-visualizer app. @iTwin/itwin-studio-dev, any ideas how I could get into this situation?
PresentationManager and doesn't call dispose on it before exiting the process. In cases then the manager is retrieved through Presentation entry point
you are correct, we only call Presentation.initialize
IModelHost.shutdown() not being called on process exit
You can try killing the process abruptly (e.g. via task manager?), though it might be a bit tricky to find the correct one