-
-
Notifications
You must be signed in to change notification settings - Fork 178
triangle_wgpu imgui demo segfault on exit #618
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
Comments
I think the bug is the destructor is never called upon this static: zig-gamedev/libs/zgui/libs/imgui/imgui_demo.cpp Line 7430 in fc64152
|
The destructor is called if diff --git a/libs/zgui/libs/imgui/imgui_demo.cpp b/libs/zgui/libs/imgui/imgui_demo.cpp
index 9b4ba871..ca67882d 100644
--- a/libs/zgui/libs/imgui/imgui_demo.cpp
+++ b/libs/zgui/libs/imgui/imgui_demo.cpp
@@ -7425,9 +7425,9 @@ struct ExampleAppConsole
}
};
+static ExampleAppConsole console;
static void ShowExampleAppConsole(bool* p_open)
{
- static ExampleAppConsole console;
console.Draw("Example: Console", p_open);
} I think clang is incorrectly removing the destructor thinking that is an unobservable change. |
Ah, is the problem there is an attempt to call the destructor but the allocator is already been deinit? Seems similar to ocornut/imgui#538 |
This looks like the fix to me. |
If so can we repo this without zig-gamedev and fix it upstream? |
I think we should consider this "not an issue" since it is a deliberate choice as per ocornut/imgui#538 (comment) We can "fix" this issue by removing the imgui demo window from triangle_wgpu |
Steps to reproduce:
zig build triangle_wgpu-run
The text was updated successfully, but these errors were encountered: