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
Loading a faulty ini file with invalid docked size #7480
Comments
I'd be willing to add some recovery for that data, but only if I had a repro that created this invalid data in the first place. |
Thanks for your reply ! |
Version/Branch of Dear ImGui:
Version 1.89.9, Branch: docking
Back-ends:
custom win32
Compiler, OS:
MSVC2022 + Clang 17.6
Full config/build information:
No response
Details:
Loading an invalid ini file
We stumbled accross an ini file with some docking information like (note the 0 on y for the dock node)
Which obviously trigs this assert
IM_ASSERT(ancestor_node->Size.x > 0.0f && ancestor_node->Size.y > 0.0f);
instatic ImGuiDockNode* ImGui::DockContextBindNodeToWindow(ImGuiContext* ctx, ImGuiWindow* window)
when trying to open a window that was docked into that node.As this is really annoying for our users, I fixed it by setting the 0-sized value with the corresponding size of the window trying to instantiate that dock node. Works well so far.
I know that this is mainly due because we are manipulating the nodes in maybe a way that is not recommended with multiple hosted viewports in a Win32 app but my question is more :
Is there a proper way to deal with malformed ini files ? Or there will still be Asserts, making the ini file unusable ?
Thanks !
Yves.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: