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

Sentry crash report: EXCEPTION_ACCESS_VIOLATION_WRITE #766

Open
sentry-io bot opened this issue May 21, 2024 · 3 comments · Fixed by #768
Open

Sentry crash report: EXCEPTION_ACCESS_VIOLATION_WRITE #766

sentry-io bot opened this issue May 21, 2024 · 3 comments · Fixed by #768
Assignees
Labels
bug Something isn't working presentation

Comments

@sentry-io
Copy link

sentry-io bot commented May 21, 2024

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-io sentry-io bot added the bug Something isn't working label May 21, 2024
@grigasp grigasp added this to the iTwin.js 4.7 milestone May 21, 2024
@grigasp grigasp reopened this Sep 9, 2024
@grigasp grigasp removed this from the iTwin.js 4.7 milestone Sep 9, 2024
@grigasp
Copy link
Member

grigasp commented Sep 9, 2024

Sentry is still reporting crashes, reopened the issue.

@grigasp
Copy link
Member

grigasp commented Sep 11, 2024

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?

@ImVeryLost
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working presentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants