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

index out of bounds when running any Bevy example #6231

Closed
mockersf opened this issue Oct 11, 2022 · 8 comments
Closed

index out of bounds when running any Bevy example #6231

mockersf opened this issue Oct 11, 2022 · 8 comments
Labels
C-Bug An unexpected or incorrect behavior C-Regression Functionality that used to work but no longer does. Add a test for this! O-Android Specific to the Android mobile operating system O-iOS Specific to the iOS mobile operating system O-MacOS Specific to the MacOS (Apple) desktop operating system P-High This is particularly urgent, and deserves immediate attention
Milestone

Comments

@mockersf
Copy link
Member

Bevy version

7673db7

Issue exists since #5413, and disappear if I revert that commit

[Optional] Relevant system information

AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, backend: Metal }

What you did

cargo run --example load_gltf --release

    Finished release [optimized] target(s) in 0.16s
     Running `target/release/examples/load_gltf`
2022-10-11T00:45:54.918977Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, backend: Metal }
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', crates/bevy_render/src/lib.rs:168:70
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@mockersf mockersf added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Oct 11, 2022
@alice-i-cecile alice-i-cecile removed the S-Needs-Triage This issue needs to be labelled label Oct 11, 2022
@mockersf
Copy link
Member Author

it seems to be running OK in CI so potentially a macOS bug

@alice-i-cecile
Copy link
Member

Ping @VitalyAnkh for thoughts.

@alice-i-cecile alice-i-cecile added C-Regression Functionality that used to work but no longer does. Add a test for this! O-MacOS Specific to the MacOS (Apple) desktop operating system P-High This is particularly urgent, and deserves immediate attention labels Oct 11, 2022
@alice-i-cecile alice-i-cecile added this to the Bevy 0.9 milestone Oct 11, 2022
@alice-i-cecile
Copy link
Member

Presumably this is only occurring for you on examples that invoke the renderer? Hello World for example shouldn't hit this path at all.

@alice-i-cecile
Copy link
Member

I can't reproduce this on Window 10; I suspect this is Mac specific.

@mockersf
Copy link
Member Author

reading the code, this will happen on iOS and android too. on those systems we don't create the window early, so the surface is not yet available when initialising the renderer

@mockersf mockersf added O-Android Specific to the Android mobile operating system O-iOS Specific to the iOS mobile operating system labels Oct 11, 2022
@VitalyAnkh
Copy link
Contributor

VitalyAnkh commented Oct 11, 2022

this will happen on iOS and android too

The linked PR makes sense. Thanks! I wonder why the "run exampes" check didn't catch this problem. Could we make this check examples on more platforms/features?

@rparrett
Copy link
Contributor

There is a balance with CI time and example coverage.

At one point I wanted to try to mitigate this by running the examples occasionally in a separate repo with a dashboard: https://rparrett.github.io/prototype_bevy_example_runner/

This runs all examples, but only on Linux right now.

@mockersf
Copy link
Member Author

Bevy CI is running a few examples in wasm on firefox and chrome, and in native on linux and windows.

There may be a way to also run them on macOS, but I haven't had the time to set it up yet. Running on iOS and android would be great, but I'm not aware of it being possible in GitHub actions

@bors bors bot closed this as completed in 13dcdba Oct 11, 2022
james7132 pushed a commit to james7132/bevy that referenced this issue Oct 19, 2022
…evyengine#6233)

# Objective

- Fix bevyengine#6231

## Solution

- In case no supported format is found, try to use Bevy default instead of panicking
james7132 pushed a commit to james7132/bevy that referenced this issue Oct 28, 2022
…evyengine#6233)

# Objective

- Fix bevyengine#6231

## Solution

- In case no supported format is found, try to use Bevy default instead of panicking
Pietrek14 pushed a commit to Pietrek14/bevy that referenced this issue Dec 17, 2022
…evyengine#6233)

# Objective

- Fix bevyengine#6231

## Solution

- In case no supported format is found, try to use Bevy default instead of panicking
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
…evyengine#6233)

# Objective

- Fix bevyengine#6231

## Solution

- In case no supported format is found, try to use Bevy default instead of panicking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior C-Regression Functionality that used to work but no longer does. Add a test for this! O-Android Specific to the Android mobile operating system O-iOS Specific to the iOS mobile operating system O-MacOS Specific to the MacOS (Apple) desktop operating system P-High This is particularly urgent, and deserves immediate attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants