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

midi.city panics with "internal error: entered unreachable code: CancelScheduledValues/SetValue should never appear in the timeline" #22580

Closed
jdm opened this issue Dec 31, 2018 · 21 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Dec 31, 2018

./mach run -d https://midi.city/ yields:

internal error: entered unreachable code: CancelScheduledValues/SetValue should never appear in the timeline (thread AudioRenderThread, at /Users/jdm/.cargo/git/checkouts/media-c23a3cd5aa97076a/352072f/audio/src/param.rs:318)
stack backtrace:
   0:        0x10c91c394 - __ZN9backtrace9backtrace5trace17hefbd7c3b17ad6e6eE
                        at /Users/jdm/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.9/src/backtrace/mod.rs:42
   1:        0x10c91543c - __ZN9backtrace7capture9Backtrace14new_unresolved17hfa7d39a5ef5fb84fE
                        at /Users/jdm/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.9/src/capture.rs:88
   2:        0x10c91539e - __ZN9backtrace7capture9Backtrace3new17hb34b0ddcba79179eE
                        at /Users/jdm/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.9/src/capture.rs:63
   3:        0x1069dfb60 - __ZN5servo4main28_$u7b$$u7b$closure$u7d$$u7d$17h7f3fe551d03f80b0E
                        at ports/servo/non_android_main.rs:111
   4:        0x10e6dfe08 - __ZN3std9panicking20rust_panic_with_hook17h14490a1041ee4235E
                        at libstd/panicking.rs:480
   5:        0x10e6df91c - __ZN3std9panicking18continue_panic_fmt17h7beddad0ba45f4eaE
                        at libstd/panicking.rs:390
   6:        0x10e6df870 - __ZN3std9panicking15begin_panic_fmt17h19527e965f98f107E
                        at libstd/panicking.rs:345
   7:        0x109eda4af - __ZN17servo_media_audio5param15AutomationEvent4time17h92c6827fe61d766bE
                        at /Users/jdm/.cargo/git/checkouts/media-c23a3cd5aa97076a/352072f/audio/src/param.rs:318
   8:        0x109ed9ad6 - __ZN17servo_media_audio5param5Param12insert_event17hec97b7bfab456939E
                        at /Users/jdm/.cargo/git/checkouts/media-c23a3cd5aa97076a/352072f/audio/src/param.rs:188
   9:        0x109de99f7 - __ZN17servo_media_audio4node15AudioNodeEngine7message17h731f0e30ee88e1c0E
                        at /Users/jdm/.cargo/git/checkouts/media-c23a3cd5aa97076a/352072f/audio/src/node.rs:126
  10:        0x109de310c - __ZN69_$LT$servo_media_audio..render_thread..AudioRenderThread$LT$S$GT$$GT$10event_loop28_$u7b$$u7b$closure$u7d$$u7d$17hffd1b796b5a66e0cE
                        at /Users/jdm/.cargo/git/checkouts/media-c23a3cd5aa97076a/352072f/audio/src/render_thread.rs:254
  11:        0x109de1922 - __ZN69_$LT$servo_media_audio..render_thread..AudioRenderThread$LT$S$GT$$GT$10event_loop17h7b89e29b77ab2459E
                        at /Users/jdm/.cargo/git/checkouts/media-c23a3cd5aa97076a/352072f/audio/src/render_thread.rs:292
  12:        0x109de5cf1 - __ZN69_$LT$servo_media_audio..render_thread..AudioRenderThread$LT$S$GT$$GT$5start17h400228aff06919a7E
                        at /Users/jdm/.cargo/git/checkouts/media-c23a3cd5aa97076a/352072f/audio/src/render_thread.rs:159
  13:        0x109e035b4 - __ZN58_$LT$servo_media_audio..context..AudioContext$LT$B$GT$$GT$3new28_$u7b$$u7b$closure$u7d$$u7d$17h37525165597cf22fE
                        at /Users/jdm/.cargo/git/checkouts/media-c23a3cd5aa97076a/352072f/audio/src/context.rs:137
  14:        0x109dec864 - __ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h92a251424c2fd43fE
                        at libstd/sys_common/backtrace.rs:136
  15:        0x109e00e44 - __ZN3std6thread7Builder5spawn28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17hacf0a3fec65dfd81E
                        at libstd/thread/mod.rs:409
  16:        0x109dec274 - __ZN101_$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$9call_once17he089024d982f6fa8E
                        at libstd/panic.rs:313
  17:        0x109def164 - __ZN3std9panicking3try7do_call17h2228f77087c9f309E
                        at libstd/panicking.rs:310
  18:        0x10e6ec37e - ___rust_maybe_catch_panic
                        at libpanic_unwind/lib.rs:102
  19:        0x109def043 - __ZN3std9panicking3try17h1369a4767145ca2dE
                        at libstd/panicking.rs:289
  20:        0x109deca94 - __ZN3std5panic12catch_unwind17h094a535d777cd760E
                        at libstd/panic.rs:392
  21:        0x109e00c6e - __ZN3std6thread7Builder5spawn28_$u7b$$u7b$closure$u7d$$u7d$17h9d98e6cb80cc20c2E
                        at libstd/thread/mod.rs:408
  22:        0x109e00eb3 - __ZN50_$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$8call_box17h020ffcda8d80c913E
                        at liballoc/boxed.rs:672
  23:        0x10e6c331b - __ZN3std3sys4unix6thread6Thread3new12thread_start17hba53abd905cebc29E
                        at libstd/sys_common/thread.rs:24
  24:     0x7fffae9ec93a - __pthread_body
  25:     0x7fffae9ec886 - __pthread_start
@highfive
Copy link

@highfive highfive commented Jan 7, 2019

Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the #servo channel in IRC.

If you intend to work on this issue, then add @highfive: assign me to your comment, and I'll assign this to you. 😄

@ferjm
Copy link
Member

@ferjm ferjm commented Jan 7, 2019

This should likely be unimplemented instead of unreachable cause we have the DOM and the glue code already in place, so the code is actually reachable.

@jdm
Copy link
Member Author

@jdm jdm commented Jan 7, 2019

That will still panic, right?

@ferjm
Copy link
Member

@ferjm ferjm commented Jan 7, 2019

Er, right. A warn, println or even no-op then, until #22367 is done.

@okevese
Copy link

@okevese okevese commented Feb 3, 2019

Hello, I would like to work on this issue, @highfive: assign me

@highfive highfive added the C-assigned label Feb 3, 2019
@highfive
Copy link

@highfive highfive commented Feb 3, 2019

Hey @okevese! Thanks for your interest in working on this issue. It's now assigned to you!

@servo servo deleted a comment from highfive Feb 3, 2019
@okevese
Copy link

@okevese okevese commented Feb 8, 2019

@jdm I get the following error when building servo on Linux Mint 18.3. I ran ./mach bootstrap successfully and I'm using clang 6.0

undefined reference to 'gst_promise_new_with_change_func
...
undefined reference to 'gst_player_config_set_position_update_interval'
...
undefined reference to 'gst_player_media_info_get_number_of_video_streams'
...
undefined reference to 'gst_player_media_info_is_live'

Please can you help pinpoint the problem?

@jdm
Copy link
Member Author

@jdm jdm commented Feb 8, 2019

It sounds like you need to update the version of GStreamer that you have installed.

@okevese
Copy link

@okevese okevese commented Feb 8, 2019

I've done that and still get the same error. I'm currently checking the gstreamer.rs dependencies of servo/media, maybe that's where the problem is.

@jdm jdm removed the C-assigned label Mar 10, 2019
@flofriday
Copy link

@flofriday flofriday commented Mar 10, 2019

#22367 seems to got implemented, since this issue got opened.

However, servo still panics when loading https://midi.city/.
Should this still be converted into a warn or println?

@jdm
Copy link
Member Author

@jdm jdm commented Mar 10, 2019

@flofriday Good catch! That code should return the tick value from CancelScheduledValues: https://doc.servo.org/servo_media_audio/param/enum.AutomationEvent.html#variant.CancelScheduledValues

@Axighi
Copy link

@Axighi Axighi commented Mar 19, 2019

If this issue is still open, @highfive: assign me

@highfive highfive added the C-assigned label Mar 19, 2019
@highfive
Copy link

@highfive highfive commented Mar 19, 2019

Hey @Axighi! Thanks for your interest in working on this issue. It's now assigned to you!

@jdm jdm removed the C-assigned label May 22, 2019
@dralley
Copy link
Contributor

@dralley dralley commented May 25, 2019

If this would be a good first issue to tackle, I would like to pick it up (if not, never mind). I've reproduced it on my machine. I'm not sure how I need to set up the environment to build against a local source copy of https://github.com/servo/media though.

@jdm
Copy link
Member Author

@jdm jdm commented May 25, 2019

https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#overriding-dependencies describes how to make Servo depend on your local clone of the repository.

servo/Cargo.toml

Lines 17 to 26 in 61d2641

[patch.crates-io]
# If you need to temporarily test Servo with a local fork of some upstream
# crate, add that here. Use the form:
#
# <crate> = { path = "/path/to/local/checkout" }
#
# Or for a git dependency:
#
# [patch."https://github.com/servo/<repository>"]
# <crate> = { path = "/path/to/local/checkout" }
has some documentation to help as well.

@jdm
Copy link
Member Author

@jdm jdm commented May 25, 2019

And yes, this should be a good first issue to fix!

@dralley
Copy link
Contributor

@dralley dralley commented May 25, 2019

@jdm With this in my Cargo.toml

[patch."https://github.com/servo/media.git"]
servo-media-audio = { path = "../media/audio"}

I get this

warning: Patch `servo-media-audio v0.1.0 (/home/dalley/Devel/media/audio)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
@jdm
Copy link
Member Author

@jdm jdm commented May 25, 2019

What if you run cargo update -p servo-media-audio?

@dralley
Copy link
Contributor

@dralley dralley commented May 25, 2019

[dalley@localhost servo]$ cargo update -p servo-media-audio
    Updating git repository `https://github.com/servo/media`
    Updating crates.io index
warning: Patch `servo-media-audio v0.1.0 (/home/dalley/Devel/media/audio)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.

[dalley@localhost servo]$ ./mach build --dev
warning: Patch `servo-media-audio v0.1.0 (/home/dalley/Devel/media/audio)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
    Finished dev [unoptimized + debuginfo] target(s) in 1.05s
Build Completed in 0:00:01

FYI I joined the Moznet IRC #servo channel (nick: dalley) if you want to keep dev env debugging out of the issue discussion.

@jdm
Copy link
Member Author

@jdm jdm commented May 26, 2019

When I add this to my cargo.toml:

[patch."https://github.com/servo/media"]
servo-media-audio = { path = "../media/audio" }

and run cargo update -p servo-media-audio, I see this output:

godot:master-servo jdm$ cargo update -p servo-media-audio
    Updating git repository `https://github.com/servo/media`
    Updating crates.io index
    Removing servo-media-audio v0.1.0 (https://github.com/servo/media#ecd5a7c6)
      Adding servo-media-audio v0.1.0 (/Users/jdm/src/media/audio)
    Removing servo_media_derive v0.1.0 (https://github.com/servo/media#ecd5a7c6)
      Adding servo_media_derive v0.1.0 (/Users/jdm/src/media/servo-media-derive)
@jdm
Copy link
Member Author

@jdm jdm commented May 26, 2019

Try removing the .git from the patch name.

bors-servo added a commit to servo/media that referenced this issue May 26, 2019
Fix panic on "unreachable code" that is reachable

Fixes servo/servo#22580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

7 participants
You can’t perform that action at this time.