Skip to content
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

SIGSEGV on exit for example_glfw_metal #5363

Closed
mmalex opened this issue May 31, 2022 · 5 comments
Closed

SIGSEGV on exit for example_glfw_metal #5363

mmalex opened this issue May 31, 2022 · 5 comments

Comments

@mmalex
Copy link

mmalex commented May 31, 2022

Version/Branch of Dear ImGui:

Version: Dear ImGui 1.88 WIP (18725)
Branch: master

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_glfw.cpp + imgui_impl_metal.cpp
Compiler: clang-1316.0.21.2.5
Operating System: Mac OS Monterey 12.4

When running the example_glfw_metal example, on quit (whether by clicking to close the window, or pressing Apple-Q), the program 'quits unexpectedly'. The full report including stack trace and imgui about info is attached.
imgui_crash_report.txt

steps to reproduce:
what is the correct FIRST thing to do with an absolutely brand new apple macbook pro? install imgui, of course. steps:

  • acquire brand new shiny macbook pro, glory at its M1 shinyness. ponder its expense in a time of global warming.
  • endure the new mac onboarding process
  • install all automatic updates (to monterey 12.4, at time of writing)
  • run clang from the commandline to trigger the dev tools CLI installer
  • install homebrew
  • brew install glfw
  • git clone --recursive imgui (as of about 2 hours before this issue)
  • cd examples/example_glfw_metal
  • make
  • ./example_glfw_metal
  • Apple-Q or click the red close button -> observe crash

Note that this does not happen with glfw+opengl2, nor glfw+opengl3.
I havent been able to get the SDL based example compiling yet, it fails to find SDL.h despite having run brew install sdl; Im guessing thats a separate issue though...

@mmalex
Copy link
Author

mmalex commented May 31, 2022

doh, im such a noob, the SDL issue was that you need to install sdl2; TIL. anyway, can now confirm that it doesnt crash on exit with example_sdl_metal.

@warrenm
Copy link
Contributor

warrenm commented May 31, 2022

This may be addressed by #5365.

@mmalex
Copy link
Author

mmalex commented May 31, 2022

I can confirm that #5365 fixes the issue!

@mmalex
Copy link
Author

mmalex commented May 31, 2022

(I actually think that means you fixed it faster than I could even write the issue. that's... negative response time. faster than light!)

@ocornut
Copy link
Owner

ocornut commented May 31, 2022

Merged fix as 7354009, thanks Warren !
And thanks Alex for filling such a careful bug report (Apologies if this felt/was overkill! we get a lot of noise and generally have to ask)

@ocornut ocornut closed this as completed May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants