-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
CompareWithCurrentState uses IM_ASSERT_USER_ERROR #5654
Conversation
I believe the current code is too harsh, and will fail on recoverable errors. This uses `IM_ASSERT_USER_ERROR` instead of `IM_ASSERT` in order to allow the UI in dev mode to yield errors. Also useful when doing scripting like Lua. Tried locally, and most of those errors seem recoverable properly anyway.
We can head toward that change but I believe for each value we need to ensure safe recovery, which doesn't seem handled by the PR. In principle the recovery may simply be to assign the value back to saved value, but it needs to be checked carefully for each value. Some of them we silently work yet keep growing a stack during the frame, which may be unnecessary if not confusing. Some of them may not be reset on EndFrame or NewFrame. Would need to check one by one. Linking to #1651 |
Right, I wasn't totally sure about this. Thanks for pointing me to the right direction. I'll look at the details. |
FYI we have a basic test for A second test could be added to fine-test that stack have been unwinded correctly, with perhaps extra sanity check. I would suggest looking at each stack one by one to ensure the size reset is valid. I'll probably do that eventually as I agree this would be useful. |
Closing this as I am working on a larger revamp of those systems. |
I believe the current code is too harsh, and will fail on recoverable errors. This uses
IM_ASSERT_USER_ERROR
instead ofIM_ASSERT
in order to allow the UI in dev mode to yield errors. Also useful when doing scripting like Lua. Tried locally, and most of those errors seem recoverable properly anyway.