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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: unreachable executed #724

Closed
mikedilger opened this issue Oct 2, 2019 · 3 comments

Comments

@mikedilger
Copy link

commented Oct 2, 2019

馃悰 Bug description

I'm using wasm-pack to build a wasm that generates an SVG on the fly. Code compiles with no error. The resulting wasm worked fine up until I added a line (and included chrono), and now the browser gives me "RuntimeError: unreachable executed" and I can inspect into the wasm to an unreachable statement.

馃 Expected Behavior

Shouldn't be generating a wasm that can hit an unreachable statement.

馃憻 Steps to reproduce

See https://github.com/mikedilger/circular_calendar which I have just pushed for this bug report.

馃實 Your environment

wasm-pack version: 0.8.1
rustc version: 1.38.0

@mikedilger

This comment has been minimized.

Copy link
Author

commented Oct 2, 2019

Now that I think of it, it's probably related to chrono and time.

@Pauan

This comment has been minimized.

Copy link
Member

commented Oct 3, 2019

@mikedilger You should be using console_error_panic_hook, which will dramatically improve the error messages.

For chrono you need to enable the wasmbind feature.

@mikedilger

This comment has been minimized.

Copy link
Author

commented Oct 3, 2019

Oh man is that valuable information! Thanks.

@mikedilger mikedilger closed this Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.