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

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', crates/cli-support/src/descriptor.rs:208:15 #3004

Closed
robertpauson opened this issue May 19, 2023 · 1 comment
Labels
bug Something is broken

Comments

@robertpauson
Copy link

robertpauson commented May 19, 2023

(This is for compiling WASM). I've tried both versions where people reported it didn't happen, as well as the version after it was supposedly fixed. Referring to: rustwasm/wasm-bindgen#2776

2023-05-19T04:25:14.780061Z  INFO fetching cargo artifacts
2023-05-19T04:25:15.313252Z  INFO processing WASM for eframe_template
2023-05-19T04:25:15.370695Z  INFO calling wasm-bindgen for eframe_template
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', crates/cli-support/src/descriptor.rs:208:15
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2023-05-19T04:25:15.600072Z ERROR ❌ error
error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: wasm-bindgen call returned a bad status
Error: error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: wasm-bindgen call returned a bad status

No idea what to do...

My Cargo.toml (added versions in []):

name = "eframe_template"
version = "0.1.0"
authors = ["Emil Ernerfeldt <[email protected]>"]
edition = "2021"
rust-version = "1.65"
resolver = "2"

[dependencies]

egui.workspace = true ["0.20.1"]
eframe.workspace = true [{ version = "0.20.1", default-features = false, features = [
    "wgpu",
    "persistence"
]}]
egui_extras.workspace = true ["0.20.0"]

chrono.workspace = true ["0.4.22"]
ehttp.workspace = true ["0.2.0"]
ethers.workspace = true ["1.0.1"]
image.workspace = true ["0.24.5"]
regex.workspace = true ["1.7.0"]
serde.workspace = true [{ version = "1", features = ["derive"] }]
serde_json.workspace = true ["1.0.88"]
url.workspace = true ["2.3.1"]
thiserror.workspace = true ["1.0.35"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tracing-subscriber = "0.3"

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
tracing-wasm = "0.2"
wasm-bindgen-futures = "0.4"


[profile.release]
opt-level = 2 # fast and small wasm

# Optimize all dependencies even in debug builds:
[profile.dev.package."*"]
opt-level = 2


[patch.crates-io]

# If you want to use the bleeding edge version of egui and eframe:
# egui = { git = "https://github.com/emilk/egui", branch = "master" }
# eframe = { git = "https://github.com/emilk/egui", branch = "master" }

# If you fork https://github.com/emilk/egui you can test with:
# egui = { path = "../egui/crates/egui" }
# eframe = { path = "../egui/crates/eframe" }

Used to compile

@robertpauson robertpauson added the bug Something is broken label May 19, 2023
@emilk
Copy link
Owner

emilk commented May 22, 2023

Can you check out latest egui master and run:

scripts/setup_web.sh
scripts/build_demo_web.sh

I think it should work. Please re-open the issue if it dosn't!

@emilk emilk closed this as completed May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants