8000 Catch imgui console errors? · Issue #511 · ImGuiNET/ImGui.NET · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Catch imgui console errors? #511

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

Open
se5a opened this issue Mar 14, 2025 · 2 comments
Open

Catch imgui console errors? #511

se5a opened this issue Mar 14, 2025 · 2 comments

Comments

@se5a
Copy link
se5a commented Mar 14, 2025

I don't really know how possible/easy this would be,
recently we updated imgui from a fairly old version, the new version is waaay more strict about things and will crash with a console message.

It'd be far more useful if imgui.net could catch these so we could see exactly where it was crashing in the code while debugging.
Sometimes the console error is enough to figure out where in the code to look, but not always, and even when it does, our project is large enough that finding the file and line takes some effort.

@ImaMapleTree
Copy link

There's 4 exposed options for error recovery:
ConfigErrorRecovery
ConfigErrorRecoveryEnableAssert (this is the one that causes the popup dialog)
ConfigErrorRecoveryEnableDebugLog
ConfigErrorRecoveryEnableTooltip

It's not recommended to disable error recovery completely as it makes it hard to catch issues within your code, however disabling the assert allows your application to continue on without the crashes.

unsafe {
  ImGui.GetIO().NativePtr->ConfigErrorRecoveryEnableAssert = 0; // disable error asserts
}

(Note that these are only modifiable via the C++ native ptr, the ImGuiIOPtr only provides readonly access to these values.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@se5a @ImaMapleTree and others
0