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

Fix crash on loading animated previews while using newer ffmpeg #2230

Open
wants to merge 1 commit into
base: 5_1-new
Choose a base branch
from

Conversation

mid-kid
Copy link

@mid-kid mid-kid commented Nov 8, 2022

No description provided.

@jhonny-oliveira
Copy link

Can you please merge this into the main branch? It is required at least in Ubuntu 22.04 and newer to load the animated previews with system FFMPEG.

This patch (#2175) is also required to be able to build successfully.

You can find further details on my Ubuntu build recipe here: https://launchpad.net/~xtradeb/+archive/ubuntu/play/+sourcefiles/stepmania/5.1.0~b2+git-d55acb1+dfsg1-1~xtradeb1/stepmania_5.1.0~b2+git-d55acb1+dfsg1-1~xtradeb1.debian.tar.xz

Thank you!

@quietly-turning
Copy link
Contributor

Can you provide some more information about this @mid-kid or @jhonny-oliveira? What is the issue it fixes? What are "animated previews"? Can you provide steps to reproduce the issue?

I'm not a StepMania maintainer, so I wouldn't be able to merge this, but perhaps someone else could if they had more context about what this is changing.

@jhonny-oliveira
Copy link

jhonny-oliveira commented Jan 18, 2023

Can you provide some more information about this @mid-kid or @jhonny-oliveira? What is the issue it fixes? What are "animated previews"? Can you provide steps to reproduce the issue?

I'm not a StepMania maintainer, so I wouldn't be able to merge this, but perhaps someone else could if they had more context about what this is changing.

If I recall correctly, some musics have videos. Without this patch, with recent versions of FFMPEG versions, the game will crash while attempting to load them. I confirm this on Ubuntu 22.04+.

@mid-kid
Copy link
Author

mid-kid commented Sep 11, 2023

I confirm what jhonny is saying.

@jerekulmala
Copy link

I tested this PR on top of stepmania-git from aur and animated previews seem to work now, but when the video ends stepmania just freezes with audio still playing in the background.

@jhonny-oliveira
Copy link

I tested this PR on top of stepmania-git from aur and animated previews seem to work now, but when the video ends stepmania just freezes with audio still playing in the background.

I think this is something new, not really related to the initial crash that required this PR. The issue you are reporting seems to be something new that I'm only experiencing in Ubuntu Lunar. Still looking for a fix.

0  0x00007ffff6ba7592 in avcodec_is_open () from /usr/lib64/libavcodec.so.58
1  0x00007ffff6a83c0d in avcodec_close () from /usr/lib64/libavcodec.so.58
2  0x00007ffff6fab5b9 in avcodec_free_context () from /usr/lib64/libavcodec.so.58
3  0x0000555555a52075 in MovieDecoder_FFMpeg::Init (this=this@entry=0x55555695aae0) at <path>/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp:167
4  0x0000555555a528cc in MovieDecoder_FFMpeg::MovieDecoder_FFMpeg (this=0x55555695aae0) at <path>/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp:120
5  MovieTexture_FFMpeg::MovieTexture_FFMpeg (this=0x55555bd0b7f0, ID=...) at <path>/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp:564
6  0x0000555555a52a40 in RageMovieTextureDriver_FFMpeg::Create (this=this@entry=0x55555c5b8b60, ID=..., sError=...)
   at <path>/stepmania/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp:570
7  0x0000555555a4ece3 in RageMovieTexture::Create (ID=...) at <path>/stepmania/src/arch/MovieTexture/MovieTexture.cpp:113
8  0x0000555555c32753 in RageTextureManager::LoadTextureInternal (this=<optimized out>, ID=...) at <path>/stepmania/src/RageTextureManager.cpp:168
9  0x0000555555c32951 in RageTextureManager::LoadTexture (this=this@entry=0x55555a9aa8f0, ID=...) at <path>/stepmania/src/RageTextureManager.cpp:184
10 0x000055555595f9e7 in Sprite::LoadFromTexture (this=0x55555b461900, ID=...) at <path>/stepmania/src/Sprite.cpp:362
11 0x000055555595fb7a in Sprite::Load (this=0x55555b461900, ID=...) at <path>/stepmania/src/Sprite.cpp:176
12 0x00005555559623d2 in LunaSprite::Load (p=0x55555b461900, L=0x5555567f9b50) at <path>/stepmania/src/Sprite.cpp:1132
@mid-kid
Copy link
Author

mid-kid commented Jan 2, 2024

After upgrading to ffmpeg 6.x (and applying #2247), I can say I'm experiencing the same issue, where the game just hangs when a background video finishes playing.
I hope someone can help me fix this at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants