Closed YoureMySoul closed 2 weeks ago
Same issue, on Celluloid. When a video finishes, the player crashes. But launching without a video doesn't crash. I don't really watch youtube videos this way anymore, but I would like to help diagnosing and resolving this issue.
[40177.609304] traps: cplugin/sponsor[65953] trap invalid opcode ip:7f0c4c2bc017 sp:7f0c2a7faab0 error:0 in sponsorblock.so[7f0c4c258000+2b5000]
[46957.972344] traps: cplugin/sponsor[68483] trap invalid opcode ip:7f28ac2bc017 sp:7f286d7f8ab0 error:0 in sponsorblock.so[7f28ac258000+2b5000]
[47147.967576] traps: cplugin/sponsor[79824] trap invalid opcode ip:7f0848ab6d17 sp:7f08497f8ad0 error:0 in sponsorblock.so[7f0848a54000+298000]
Along with the locally-built binary: libmpv_sponsorblock.zip
I took a look at the binary you gave me and it seems you have built it with the nightly toolchain. I could reproduce the crash when building with the nightly toolchain. Can you both try building the binary with the stable toolchain please?
I've built my binary using stable toolchain. The project does not override the toolchain used and my toolchain is set to stable by default.
Using command cargo +stable build --release --locked
to ensure this is stable:
[12192.580821] traps: cplugin/sponsor[39211] trap invalid opcode ip:7f58e42b6d17 sp:7f58b57f8ad0 error:0 in sponsorblock.so[7f58e4254000+298000]
My mistake you built it with rustc version 1.80.1 (3f5fd8dd4 2024-08-06)
. I was testing on an old build with rustc version 1.77.2
, it seems to work fine on this version of the compiler. I tried in 1.80.1 and the crash happens.
I'm going to take a look.
Yes, I used 1.80.1, the current rust stable
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
cargo 1.80.1 (376290515 2024-07-16)
Can you try to build this branch : https://github.com/TheCactusVert/mpv-sponsorblock/tree/crash_no_video
I found the problem it's in the way rust handle enum. I should rewrite mpv-client and use someting like rust-bindgen
to generate the bindings.
Yes, that branch fixes it!
Thanks for your help! I'm going to rework a lot of things for the next release.
Thank you so much for the quick fix. It's working now.
minimal reproduction:
Description
When mpv starts without any video input, it crashes. However, everything works fine as long as there is a video input.
System
mpv v0.38.0 Archlinux