-
Notifications
You must be signed in to change notification settings - Fork 42
Adding a PointLight crashes the app #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I also tried it with the DX12 backend and I get the same error |
Can you see if this is still happening with 0.6.0? I made a fair few changes before getting to this and I never reproduced. Here's how I'm adding a point light in the fn setup(mut commands: Commands, mut lines: ResMut<DebugLines>) {
commands.spawn_bundle(PerspectiveCameraBundle {
transform: Transform::from_translation(Vec3::new(0.0, 0.0, 5.0)),
..Default::default()
});
commands.spawn_bundle(PointLightBundle {
..Default::default()
});
// A line that stays on screen 9 seconds
lines.line_gradient(
Vec3::new(1.0, -1.0, -1.0),
Vec3::new(-1.0, 1.0, 1.0),
9.0,
Color::CYAN,
Color::MIDNIGHT_BLUE,
);
} |
So, I just tried it with 0.6.0 and I still get the same crash, but I noticed it only crashes when shadows are enabled on the point light. If shadows are not enabled it doesn't crash. Here's how I was spawning it. commands.spawn_bundle(PointLightBundle {
point_light: PointLight {
intensity: 1500.0,
shadows_enabled: true, // This seems to be the issue
..Default::default()
},
transform: Transform::from_xyz(4.0, 8.0, 4.0),
..Default::default()
}); |
So I've just disabled shadows (we shouldn't be casting/receiving shadows anyway) in 0.6.1, which seems to fix this, but still will have a look into what causes it. |
I just tried 0.6.1 with shadows on the point light and I can confirm it works. |
I think this is related to bevyengine/bevy#3959, where meshes with custom attributes seem to potentially get screwed up if they don't have an index buffer (and even then sometimes). If I add mesh indices then it doesn't crash with shadows enabled. I won't close this for now since it might be the cause of other random issues if they come up. Relevant thread from Discord:
|
When I try to use this plugin with a scene with a point light it crashes.
For example, if I add a point light in the 3d example of this repo I get this error:
I don't get this error if I don't spawn a point light.
I tried it with bevy 0.6 and the latest bevy main and the bevy-main branch of this repo. This is on windows 10.
The text was updated successfully, but these errors were encountered: