Skip to content

Metal: segmentation fault in glfwDestroyWindow #8367

@Drealmer

Description

@Drealmer

Version/Branch of Dear ImGui:

master

Back-ends:

imgui_impl_glfw.cpp + imgui_impl_metal.mm

Compiler, OS:

macOS 15.2 + clang 16.0.0 + Apple M1 Max

Full config/build information:

No response

Details:

Crash in glfwDestroyWindow when closing down the sample imgui/examples/example_glfw_metal
I've git bisected it to this commit: d0021e1

Full call stack:

objc_msgSend 0x00000001949dd820
invocation function for block in ImGui_ImplMetal_RenderDrawData(ImDrawData*, id<MTLCommandBuffer>, id<MTLRenderCommandEncoder>) imgui_impl_metal.mm:318
_dispatch_call_block_and_release 0x0000000194bf7854
_dispatch_client_callout 0x0000000194bf95b4
_dispatch_main_queue_drain 0x0000000194c08040
_dispatch_main_queue_callback_4CF 0x0000000194c07c58
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ 0x0000000194ed39c0
__CFRunLoopRun 0x0000000194e935ac
CFRunLoopRunSpecific 0x0000000194e92724
RunCurrentEventLoopInMode 0x00000001a03ea530
ReceiveNextEventCommon 0x00000001a03f017c
_BlockUntilNextEventMatchingListInModeWithFilter 0x00000001a03f0508
_DPSNextEvent 0x00000001989fd034
-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 0x00000001993612d4
_glfwPollEventsCocoa 0x000000010464ba10
_glfwDestroyWindowCocoa 0x000000010464b9a8
glfwDestroyWindow 0x0000000104643e48
main main.mm:173
start 0x0000000194a2c274

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

Unmodified imgui/examples/example_glfw_metal

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions