MacOS crash #2
Labels
No labels
agent
agent:ci
agent:done
agent:failed
agent:needs-input
agent:refined
agent:refining
agent:running
agent:skip
autonomous
driven
local
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jeroen/cartopolis#2
Loading…
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?
We got a MacOS crash. Can you verify whether it is still an issue? Seems to be egui-related. We don't have further debug logs. Is this enough to verify?
🤖 Picked this up — working on branch
issue-2in a fresh worktree on the VPS. I'll report back here when I'm done.🤖 Picked this up — working on branch
issue-2in a fresh worktree on the VPS. I'll report back here when I'm done.Label an issue
agent:skipto keep me off it.Pushed
issue-2(one commit,1eb2b0c). PR link: https://code.garage44.eu/jeroen/viberfox/compare/main...issue-2Yes, it was still an issue — and it reproduces without a Mac
The stack was enough.
ui_mut()can only panic whenroot_uiisNoneduringUpdate, and the only thing that leaves itNoneisbegin_egui_framebailing out early:That happens on any frame with no
Windowentity and noHeadlessSurface. Bevy'sclose_when_requestedmarks the window on oneLastand despawns it on the next, so the shutdown sequence puts whole frames through the schedule with zero windows in the world. Every panel system then hits theexpectin parallel — which is exactly the reported shape: an unnamed system, on a compute-pool thread.What changed
crates/viberfox/src/systems/egui_manager.rsonly:begin_egui_framenow always begins the pass and builds the rootUi, laying out against the last surface it saw when there is none. Cost is one tessellated frame that is never presented.end_egui_frameloses its matching early return — an unbalancedbegin_passwould leave the pass open and nest the next one inside it (a second latent bug on the same path).EguiManageras one field, and a zero/NaN scale factor is sanitised on the way in — it divides every viewport size, and a display disappearing under us is precisely when a bad one would show up.I considered gating the ~8 UI systems with a
run_ifinstead and rejected it: it spreads the invariant acrossmain.rsand silently drops the UI the day someone adds a panel and forgets the condition.Verification
cargo check -p viberfox— clean (one pre-existinghistory_opendead-code warning).cargo test -p viberfox --bin viberfox— 164 passed, including three new tests inegui_manager.Compute Task Pool, followed byEncountered a panic in system <Enable the debug feature to see the name>!. With the fix they pass. The main test drives a realAppthrough aWindowCloseRequestedand asserts the window is actually gone, so it can't quietly stop testing the case it's about.Two things for you
systems::transit_live::tests::board_texture_renders_textfails in this container — it saves a preview to<repo>/target/board_preview.png, and myCARGO_TARGET_DIRis elsewhere so that directory doesn't exist.mkdir targetand it passes. Pre-existing, untouched by this change, but it will bite any worktree or CI job with a redirected target dir.Branch
issue-2(pushed)🤖 viberfox issue agent on the VPS — 49 turns · $3.87 · session
bfbd9a42-ca8b-4bf9-bfe8-f74bb7bd0b01. Reply with @agent to continue this session.