Bizarre Stack Overflow when utilizing Default trait or ..default() to initialize components #12820
Labels
A-Utils
Utility functions and types
C-Bug
An unexpected or incorrect behavior
S-User-Error
This issue was caused by a mistake in the user's approach
Bevy version
0.13.1
Relevant system information
cargo --version
)What you did
In my own project I was trying to create a Component that implemented the
Default
trait for my own purposes and ran into a stack overflow when spawning an entity bundle with the component. There was no real distinguishable cause.After commenting out some code I found it had to with implementing and using the
Default
trait on one of my own Components. This looked like it could be an issue with Bevy so I created an MRE using justMinimalPlugins
, so headless Bevy and low and behold the stack overflow persists.What went wrong
I'd expect initializing via the Default trait or using
..default()
, to well, not cause any issues and work as you'd expect theDefault
trait to work. But instead it resulted in a stack overflow error. These overflows seem to originate from compute task pool threads based on the resulting errors.This does not seem to be related to GUI at all as it still occurs with only
MinimalPlugins
.Additional information
MRE Repo
Possibly related issue: #8406
The only workaround I've found is just to straight-up not use the
Default
trait or..default()
to initialize in-house Components when creating an entity.Also just for clarity, when I say in-house I mean anything not in Bevy's codebase.
The text was updated successfully, but these errors were encountered: