-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Video-related crashes on some maps due to apparently negative duration #17345
Comments
the logs do not contain the crash trace you've pasted in, so you must have started the game after the crash again. we explicitly ask not to do that in the template because the logs are now unusable. please link the map on which this occurs. |
im sorry, im updating the logs |
Have you tried to play the map with video turned off? |
@enoslayd turning video off is not a valid solution. this looks like an actual bug. please do not suggest such things. |
i have updated the logs on the main issue post |
ok logs didn't include the crash trace again for some reason... video showing the crash: simplescreenrecorder-2022-03-19_17.50.13.mp4 |
any other information needed? |
i can't reproduce this locally but i think i can see how this can happen. no more info needed thanks. |
so i'm reasonably sure this is going to boil down to @Opelkuh do you know if it is perhaps possible that the aforementioned value is negative? i'm guessing it is -1 in this reported case, leading to a clamp failure multiple layers down the line. i don't think there's anything more intelligent to be done here than fail decoding entirely? link map for reference, maybe someone else will be able to repro: https://osu.ppy.sh/beatmapsets/1643234#osu/3354107 |
can't repro on windows, seems to be platform specific. |
yes it will be. it's likely to be linux-specific due to use of VDPAU, probably even ffmpeg-version-specific. saying you can't repro when i already said i can't either brings 0 value. |
The duration can be negative if the video stream doesn't provide it. I don't know if there are video containers that do this but it's the case with e.g. RTSP streams. Stopping decoding in that case is probably the safest bet. But I'm not sure what's causing it here, the video file does have duration set correctly. I reprod the crash in osu-framework by hardcoding a RTSP stream as the input: diff --git a/osu.Framework/Graphics/Video/VideoDecoder.cs b/osu.Framework/Graphics/Video/VideoDecoder.cs
--- a/osu.Framework/Graphics/Video/VideoDecoder.cs (revision 14ed4f4ac0a05e1ce48ec18d019536ad0262114b)
+++ b/osu.Framework/Graphics/Video/VideoDecoder.cs (date 1647710347145)
@@ -318,10 +318,10 @@
var fcPtr = ffmpeg.avformat_alloc_context();
formatContext = fcPtr;
- formatContext->pb = ioContext;
+ // formatContext->pb = ioContext;
formatContext->flags |= AGffmpeg.AVFMT_FLAG_GENPTS; // required for most HW decoders as they only read `pts`
- int openInputResult = ffmpeg.avformat_open_input(&fcPtr, "dummy", null, null);
+ int openInputResult = ffmpeg.avformat_open_input(&fcPtr, "rtsp://rtsp.stream/pattern", null, null);
inputOpened = openInputResult >= 0;
if (!inputOpened)
throw new InvalidOperationException($"Error opening file or stream: {getErrorMessage(openInputResult)}"); |
we may be unable to reproduce due to ffmpeg version differences... @xeome please post the output of |
I can repro the crash. $ ffmpeg -version
ffmpeg version n5.0 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100 5.0 seems pretty big (I think 4.0 is the latest supported by o!f right now?) |
osu!framework seems to run on FFmpeg 4.3.3 as of now, and the issue will probably hide once the proper FFmpeg libraries get shipped with the linux builds (ppy/osu-framework#4349), to then become apparent once we update to FFmpeg 5.0 (ppy/osu-framework#5051). Perhaps this sort of issue should be bundled within ppy/osu-framework#5051 instead. |
A temporary workaround to make video work again, is to override the library loading path to make it use the 4.4 version. Arch Linux users can install the |
Adding onto this: Editing line 7 of
does the trick really well for launching from a gui menu |
Can confirm, this fixed the issue for me, and also made my videos work again |
Tracking a fix for this at ppy/osu-framework#4349. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This issue has been fixed as this map doesn't crash Lazer anymore. 👍 |
That's because we're shipping FFmpeg inside the appimage, as described above. Closing as resolved. |
Type
Crash to desktop
Bug description
system information:
operating system: endeavouros (arch based)
kernel: latest zen kernel
gpu: gtx 760
gpu driver version: 470.103.01-1
i start a map and it crashes, log from terminal
Screenshots or videos
No response
Version
2022.319.0-lazer
Logs
database.log
network.log
performance.log
runtime.log
The text was updated successfully, but these errors were encountered: