Skip to content
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

[Merged by Bors] - add a more helpful error to help debug panicking command on despawned entity #5198

Closed

Conversation

mockersf
Copy link
Member

@mockersf mockersf commented Jul 4, 2022

Objective

  • Help users fix issue when their app panic when executing a command on a despawned entity

Solution

  • Add an error code and a page describing how to debug the issue

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good approach; it's nice to collect this information in a unified place.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events A-Diagnostics Logging, crash handling, error reporting and performance analysis labels Jul 4, 2022
@alice-i-cecile
Copy link
Member

@bevyengine/docs-team brief review please :)

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jul 4, 2022
@Nilirad
Copy link
Contributor

Nilirad commented Jul 5, 2022

I didn't test it but I think the example shouldn't panic since commands are applied at a Stage boundary, so the entity will despawn after use_entity.

At a closer look it will actually panic, because there are DefaultPlugins, then there is no need to involve system ordering.

Copy link
Contributor

@Nilirad Nilirad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the example and the following text could be improved. See my comment above.

@mockersf
Copy link
Member Author

mockersf commented Jul 5, 2022

I didn't test it but I think the example shouldn't panic since commands are applied at a Stage boundary, so the entity will despawn after use_entity.

At a closer look it will actually panic, because there are DefaultPlugins, then there is no need to involve system ordering.

Well I tried the example, and it always panic with the specified ordering, randomly without ordering, and never if I replace the after with before

@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Jul 5, 2022
… entity (#5198)

# Objective

- Help users fix issue when their app panic when executing a command on a despawned entity

## Solution

- Add an error code and a page describing how to debug the issue
@bors
Copy link
Contributor

bors bot commented Jul 5, 2022

Build failed:

@mockersf
Copy link
Member Author

mockersf commented Jul 5, 2022

timeout in cache step on iOS...

@mockersf
Copy link
Member Author

mockersf commented Jul 5, 2022

bors retry

bors bot pushed a commit that referenced this pull request Jul 5, 2022
… entity (#5198)

# Objective

- Help users fix issue when their app panic when executing a command on a despawned entity

## Solution

- Add an error code and a page describing how to debug the issue
@bors bors bot changed the title add a more helpful error to help debug panicking command on despawned entity [Merged by Bors] - add a more helpful error to help debug panicking command on despawned entity Jul 5, 2022
@bors bors bot closed this Jul 5, 2022
inodentry pushed a commit to IyesGames/bevy that referenced this pull request Aug 8, 2022
… entity (bevyengine#5198)

# Objective

- Help users fix issue when their app panic when executing a command on a despawned entity

## Solution

- Add an error code and a page describing how to debug the issue
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
… entity (bevyengine#5198)

# Objective

- Help users fix issue when their app panic when executing a command on a despawned entity

## Solution

- Add an error code and a page describing how to debug the issue
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
… entity (bevyengine#5198)

# Objective

- Help users fix issue when their app panic when executing a command on a despawned entity

## Solution

- Add an error code and a page describing how to debug the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostics Logging, crash handling, error reporting and performance analysis A-ECS Entities, components, systems, and events S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants