Skip to content

#182: no Engine makes an event loop, in any build, so 3D renders on Linux - #183

Merged
shinyobjectz merged 1 commit into
mainfrom
linux-winit
Nov 18, 2026
Merged

shinyobjectz merged 1 commit into
mainfrom
linux-winit

Conversation

@shinyobjectz

Copy link
Copy Markdown
Owner

Fixes #182.

What broke. raea's headless Engines (raea-render's, and the page's BlitzPage) left Bevy's WinitPlugin out only when a registered plugin that brought bevy_winit said so: hanabi's x11 hook, and raea-page-host's window hook. A build that brought bevy_winit in some other way kept the plugin on. One such build is cargo unifying features across -p raea-cli -p raea-page-host --features raea-page-host/window; a whole-workspace build is another. Each App then made an event loop, and winit allows one per process. On Linux every 3D render and play panicked with Failed to build event loop: RecreationAttempt, while page compositions rendered. With no display the first attempt failed instead: neither WAYLAND_DISPLAY nor WAYLAND_SOCKET nor DISPLAY is set. Both match the report.

The releases weren't affected: their plugin catalog includes hanabi, whose hook turns the plugin off. rc3's Linux archive rendered examples/games/shapes.tsx under Xvfb, under headless Wayland (weston) and with no display.

The fix. raea-runtime-plugins compiles bevy_winit in on desktop targets (x11 on Linux: loaded at run time, never opened), and group() always leaves WinitPlugin out, however the build brought it. The lockfile already held this graph, since winit was already in for raea play's window, so --locked builds are unchanged.

Tests

  • Unit test an_engine_makes_no_event_loop (runtime/plugins), added to CI's test list on macOS and Ubuntu.
  • The release archive check (tools/release-check.sh) now renders a 3D frame on Linux and macOS, and on Linux renders it again with no display. No release step had rendered 3D on Linux before. The scene is on black, so a 3D pass that drew nothing trips raea's all-black check.
  • Before/after reproduction from source, built the way the reporter did: the probe-182 branch's workflow.

🤖 Generated with Claude Code

…inux

raea's headless Engines (raea-render's, the page's BlitzPage) left Bevy's WinitPlugin out only when a registered
plugin that brought bevy_winit said so (hanabi's x11, raea-page-host's window). A build that brought it some other
way, cargo unifying features across `-p raea-cli -p raea-page-host --features raea-page-host/window` or the whole
workspace, kept it on: each App made an event loop, winit allows one a process, and every 3D render and play
panicked "Failed to build event loop: RecreationAttempt" on Linux (with no display: "neither WAYLAND_DISPLAY nor
... DISPLAY is set"), while a page rendered.

raea-runtime-plugins now compiles bevy_winit in on the desktop (x11 on Linux, loaded at run time, never opened)
and its group() always leaves WinitPlugin out, however the build brought it. The lockfile already held the graph
(winit was in for raea play's window). A unit test says so on macOS and Ubuntu (CI's test list), and the release
archive check renders a 3D frame on Linux and macOS, on Linux once more with no display: no release step had
rendered 3D on Linux.
@shinyobjectz
shinyobjectz merged commit 1c8f405 into main Nov 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3D/native render panics on Linux: Failed to build event loop: RecreationAttempt (bevy_winit)

1 participant