f2e-spec icon indicating copy to clipboard operation
f2e-spec copied to clipboard

Game crashes when starting specific songs - deleting ~/.cache/performous temporarily resolves the problem

Open BWagener opened this issue 1 year ago • 10 comments
trafficstars

Performous & operating system versions

Performous: 1.3.1 Operating system: Arch Linux on the Steam Deck

What is the problem?

The game crashes when starting specific songs - deleting ~/.cache/performous temporarily resolves the problem.

The error message: FATAL ERROR: cannot create std::vector larger than max_size() core/error: cannot create std::vector larger than max_size()

image

It occurs when selecting a song to play. It only happens to a few specific songs. When I delete the game's cache directory in ~/.cache I can play the affected songs again.

After a while, the problem returns for the same songs again. Playing other songs keeps working fine.

Steps to reproduce

Play the game regularly and try out different songs, after a while it starts crashing for some songs.

Additional context

Let me know if there's anything I can do such as run specific debug versions etc.

Log(s) & preferences file(s)

This is the crash log of the most recent occurence:

songs/notice: Done Loading. Loaded 18592 Songs.
songs/notice: Done Caching.
image/error: Writing PNG failed
image/error: Writing PNG failed
stderr/info: libpng warning: Image height is zero in IHDR
ffmpeg/warning: Negative audio sample_position -2208 seconds, frame ignored.
ffmpeg/warning: Negative audio sample_position -2114 seconds, frame ignored.
ffmpeg/warning: Negative audio sample_position -2208 seconds, frame ignored.
ffmpeg/warning: Negative audio sample_position -2114 seconds, frame ignored.
ffmpeg/warning: Negative audio sample_position -2208 seconds, frame ignored.
ffmpeg/warning: Negative audio sample_position -2114 seconds, frame ignored.
ffmpeg/warning: Negative audio sample_position -2404 seconds, frame ignored.
ffmpeg/warning: Negative audio sample_position -2336 seconds, frame ignored.
ffmpeg/warning: Negative audio sample_position -2404 seconds, frame ignored.
ffmpeg/warning: Negative audio sample_position -2336 seconds, frame ignored.
core/notice: More details might be available in "/home/deck/.cache/performous/infolog.txt".
stderr/notice: 8 messages logged to stderr/info
FATAL ERROR: cannot create std::vector larger than max_size()
core/error: cannot create std::vector larger than max_size()
If you think this is a bug in Performous, please report it at 
  https://github.com/performous/performous/issues

config.xml.txt infolog.txt cache.zip

BWagener avatar Mar 24 '24 14:03 BWagener

I looked at the provided data but did not found which song data causes the problem. @BWagener can you get the information which song causes the problem.

twollgam avatar Mar 25 '24 10:03 twollgam

Of course, I'll dm you some examples of songs I encountered this issue with when I can. I spotted it with a couple of songs which have been working fine for a long time in previous versions.

BWagener avatar Mar 25 '24 10:03 BWagener

I'm keeping track of three songs I was currently facing this problem with. If I delete just those songs from the songs.json file in the cache I can play them again.

Something all three songs have in common is I have each song twice, from two different sources - both versions work until the problem occurs, then one stops working (so far it's always been the versions I sing).

I deleted the entries for the three songs which had the problem in the songs.json file, reran the game and closed it. Took a copy of the songs.json file and will compare the copy to the latest version in cache once the problem reoccurs.

BWagener avatar Mar 26 '24 23:03 BWagener

Okay, so results of this approach are as follows:

  • any broken song has loadStatus: 2 in the songs.json file
  • any song that's still working has loadStatus: 1
  • after singing a song and exiting the game as usual the song's entry in the songs.json file is updated from loadStatus: 1 to loadStatus: 2
  • I can "break" any song by changing its loadStatus value to 2 in the songs.json file, the same error as in the screenshot in the issue shows up from then on

BWagener avatar Mar 27 '24 20:03 BWagener

So i think this is due to the fact that we calculate the duration which can overflow sometimes, but i don't quite know why. I thought this was fixed by the "detect faulty/no mp3" pr but sadly no :(

Can you try run with a debugger and collect a stacktrace?

Baklap4 avatar Mar 29 '24 11:03 Baklap4

I'd need to have a development setup for this right? I haven't got that set up.

Not sure if this is how you can test it, but could you run it with a debugger and just set any song's loadStatus to 2 beforehand and then launch that song?

BWagener avatar Mar 29 '24 11:03 BWagener

I'd need to have a development setup for this right? I haven't got that set up.

That's correct, sorry for the assumption hahah

I'll give it a go with the suggestion and post results later 👍 Is this problem still occuring on latest master?

Baklap4 avatar Mar 29 '24 11:03 Baklap4

Nice.

@Baklap4 I managed to test the latest master on the Steam Deck, and I can't get it to crash!

On Fri, Mar 29, 2024, 12:44 Arjan Speiard | Asgard Sings! < @.***> wrote:

I'd need to have a development setup for this right? I haven't got that set up.

That's correct, sorry for the assumption hahah

I'll give it a go with the suggestion and post results later 👍 Is this problem still occuring on latest master?

— Reply to this email directly, view it on GitHub https://github.com/performous/performous/issues/977#issuecomment-2027125106, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETNBUTWZRNUYBNFLIR5HKLY2VAZHAVCNFSM6AAAAABFFXDVRKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRXGEZDKMJQGY . You are receiving this because you were mentioned.Message ID: @.***>

BWagener avatar Mar 29 '24 11:03 BWagener

@Baklap4 should I close this issue?

It seems to be addressed in master.

One question I still have is what causes the loadStatus to be updated to 2 after playing these songs?

BWagener avatar Mar 31 '24 17:03 BWagener

Just tested it locally the problem still seems to exist, but now that we have a repro. We can try to fix it, thanks for the info!

Baklap4 avatar Apr 05 '24 17:04 Baklap4