Compiling in Debug mode #144
R-Abbasi
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since Ubuntu 23 failed to work properly with the project, I had to switch back to 22 and installed the current LTS version 22.04.3. It didn't work properly with the project either (but later on, after installing the packages mentioned in the README file, Ubuntu 22.04.3 seemed to work appropriately with the project - I guess 23 will work that way too), hence had no choice except going for Windows. Compiled the project and ran it there. cmake seemingly uses msvc by default on Windows, even though gcc was installed as well.
By clicking on the Diagnostics menu button, the program crashed. When debugging, the error found was: Assertion failed: SizeOfColorStack >= g.ColorStack.Size && "PushStyleColor/PopStyleColor Mismatch!" this line. This problem doesn't happen on Ubuntu (gcc ignores that?), so probably it has existed from long time ago.
When reviewing the code in
main.cpp
, 6push
s were counted against 5pop
s for that situation, which revealed the source of the mismatch. Increasing the firstImGui::PopStyleColor();
in that menu button's code to 2 (ImGui::PopStyleColor(2);
) fixed the problem.The point here could be considering using mcvs and Debug mode, apart from gcc, during development time.
Beta Was this translation helpful? Give feedback.
All reactions