mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-16 19:11:13 +00:00
Backends: Metal4: ImGui_ImplMetal4_NewFrame() waits forever with framesInFlight > 1 once a secondary viewport is rendered #9624
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#9624
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version 1.93.1 WIP, Branch: docking (
cf53467ab)Back-ends:
imgui_impl_sdl3.cpp + imgui_impl_metal4.mm
Compiler, OS:
macOS 27.0.1 (Apple Silicon) + Apple Clang 21
Full config/build information:
No response
Details:
My Issue/Question:
With more than one frame in flight, the application freezes on the frame after a secondary viewport was first rendered:
ImGui_ImplMetal4_NewFrame()never returns.ImGui_ImplMetal_RenderWindow()signalsevents[currentFrameSlot]with a single global++eventValue, whileImGui_ImplMetal4_NewFrame(slot)waits onevents[slot]for that global value withtimeoutMS:UINT64_MAX. The next frame uses another slot, whose event never reaches that value.Reproduces in the unmodified example_sdl3_metal4 (
FRAMES_IN_FLIGHT 3, viewports enabled): drag any window out of the main window, or paste the code below. The main thread is then stuck in-[MTLSharedEvent waitUntilSignaledValue:timeoutMS:]called fromImGui_ImplMetal4_NewFrame(). Not affected withFRAMES_IN_FLIGHT 1.Fix proposed in #9621.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code: