You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
3D/native render panics on Linux: Failed to build event loop: RecreationAttempt (bevy_winit) #182
On Linux (Debian 13, x86_64, RTX 3060 / NVIDIA 550.163.01) every 3D composition fails to render, while "page" compositions (text, motion design, HTML) render fine on the same GPU and the same X server.
$ DISPLAY=:99 raea render examples/games/shapes.tsx -o out.mp4
thread 'main' panicked at bevy_winit-0.20.0/src/lib.rs:137:14:
Failed to build event loop: RecreationAttempt
Environment
raea built from master @ de32b26 (2026-11-15), cargo build --release -p raea-cli --no-default-features
Debian 13, kernel 6.12.117, Xorg 21.1.16 on :99, real display via an HDMI dummy plug
a real X server, a headless Wayland compositor (weston --backend=headless-backend.so), and no display at all
With no display the error is the expected one instead (Os(Misc("neither WAYLAND_DISPLAY nor WAYLAND_SOCKET nor DISPLAY is set"))), so the display plumbing itself is fine.
Control: raea render of a "page" composition generated by raea init succeeds (0 errors, 90 frames, h264), so the Vulkan → GPU path and the X server are not in question.
winit 0.30 allows only one EventLoop per process: the second EventLoop::new() returns EventLoopError::RecreationAttempt. The backtrace shows the panic comes from WinitPlugin's build(), i.e. an event loop had already been created earlier in the same process.
Notes on the search so far
The web target does produce frames (raea app check … --target web --png DIR → 00-mount.png), but the image is blank: the 3D drawing is done by the native "Rune host", which is exactly the part that panics.
raea-page-host is a separate process (it exits 101 with the very same panic when DISPLAY is unset), so the first event loop appears to come from somewhere else in the main process — the 3D path probably builds two Bevy apps in sequence.
The same code presumably works on macOS, where raea is developed; the divergence is worth an explicit platform test.
Expected
raea render examples/games/shapes.tsx -o out.mp4 should produce an MP4 of the 3D scene on Linux, as on macOS.
If the native/3D path is not ready on Linux yet, a clear error ("3D not available on this platform") would be far more useful than a winit panic.
Correction — and apologies for the noise: the root cause was on my side, not in raea.
My checkout had been built from /tmp/raea. /tmp is a tmpfs here, and after a reboot the SDK package paths baked into the binary no longer resolved. The RecreationAttempt panic was downstream of that failure, not a genuine second EventLoop: one app attempt failed after creating the event loop, and the retry hit winit's one-loop-per-process rule.
After rebuilding in place (/home/<user>/raea, same commit de32b26, no other change), every 3D example renders on this Linux box:
raea render examples/games/animated-character.tsx → 90 frames, 0 errors (65 ms/frame), robots animated with shadows — screenshot available if wanted
Two real (small) findings worth keeping, feel free to ignore them or ask me to file them separately:
A failed bundle/path resolution surfaces as a bevy_winit panic instead of the path error that actually caused it. The message Failed to build event loop: RecreationAttempt sent me looking at winit/platform code for a while, when the real cause was a missing SDK directory. Reporting the resolution error first would have saved that.
examples/games/animated-character.tsx cannot run from a clean checkout: it wants examples/games/media/RobotExpressive.glb, while the asset ships at sdk/raea/bench/bevy/character/media/RobotExpressive.glb (the media/ directory next to the example does not exist). Copying the GLB across makes it render.
Closing as not a bug. Thanks for raea — the page and 3D paths both work nicely once the checkout is sane.
Thanks for the report and the backtrace. It's fixed in #183, and the fix ships in 0.1.8.
The cause. raea's 3D engine keeps Bevy's window plugin (WinitPlugin) out of its own app, because winit allows one event loop per process and the window, if any, owns it. The plugin was left out only when one particular plugin asked for that. Building raea-cli together with raea-page-host --features window in one cargo build merges Cargo features across the two packages, so bevy_winit ended up in raea-cli's build by another route. The engine then made a second event loop and panicked with RecreationAttempt.
The fix. Every engine raea makes now leaves WinitPlugin out, however the build came together (raea_runtime_plugins::group).
A unit test runs on macOS and Ubuntu CI.
The release archive check now renders a 3D frame on Linux, both under X and with no display.
Checked from source on ubuntu-24.04, built the way you built it:
Before the fix:raea render of a 3D scene panics with Failed to build event loop: RecreationAttempt.
After the fix: it renders under xvfb and with DISPLAY and WAYLAND_DISPLAY unset.
The prebuilt Linux archives (0.1.7 and the 0.1.8 candidates) don't build raea-cli that way and weren't affected. If you're building from source before 0.1.8 is out, building raea-cli on its own avoids the panic. So does pulling main.
Activity
yennefermotbot commentedon Nov 18, 2026
Correction — and apologies for the noise: the root cause was on my side, not in raea.
My checkout had been built from
/tmp/raea./tmpis a tmpfs here, and after a reboot the SDK package paths baked into the binary no longer resolved. TheRecreationAttemptpanic was downstream of that failure, not a genuine secondEventLoop: one app attempt failed after creating the event loop, and the retry hit winit's one-loop-per-process rule.After rebuilding in place (
/home/<user>/raea, same commitde32b26, no other change), every 3D example renders on this Linux box:raea render examples/games/shapes.tsx→90 frames, 0 errors, 0 warns, 0 notes(73 ms/frame)raea render examples/games/animated-character.tsx→90 frames, 0 errors(65 ms/frame), robots animated with shadows — screenshot available if wantedTwo real (small) findings worth keeping, feel free to ignore them or ask me to file them separately:
bevy_winitpanic instead of the path error that actually caused it. The messageFailed to build event loop: RecreationAttemptsent me looking at winit/platform code for a while, when the real cause was a missing SDK directory. Reporting the resolution error first would have saved that.examples/games/animated-character.tsxcannot run from a clean checkout: it wantsexamples/games/media/RobotExpressive.glb, while the asset ships atsdk/raea/bench/bevy/character/media/RobotExpressive.glb(themedia/directory next to the example does not exist). Copying the GLB across makes it render.Closing as not a bug. Thanks for raea — the page and 3D paths both work nicely once the checkout is sane.
probe #182: from source, before (main) and after (linux-winit), 3D un…
Merge pull request #183 from shinyobjectz/linux-winit
shinyobjectz commentedon Nov 18, 2026
Thanks for the report and the backtrace. It's fixed in #183, and the fix ships in 0.1.8.
The cause. raea's 3D engine keeps Bevy's window plugin (
WinitPlugin) out of its own app, because winit allows one event loop per process and the window, if any, owns it. The plugin was left out only when one particular plugin asked for that. Buildingraea-clitogether withraea-page-host --features windowin onecargo buildmerges Cargo features across the two packages, sobevy_winitended up in raea-cli's build by another route. The engine then made a second event loop and panicked withRecreationAttempt.The fix. Every engine raea makes now leaves
WinitPluginout, however the build came together (raea_runtime_plugins::group).Checked from source on ubuntu-24.04, built the way you built it:
raea renderof a 3D scene panics withFailed to build event loop: RecreationAttempt.DISPLAYandWAYLAND_DISPLAYunset.The prebuilt Linux archives (0.1.7 and the 0.1.8 candidates) don't build raea-cli that way and weren't affected. If you're building from source before 0.1.8 is out, building
raea-clion its own avoids the panic. So does pulling main.shinyobjectz#182: no Engine makes an event loop, in any build, so 3D …