FNF-CNE-Devs / CodenameEngine

awesome fnf engine :D
Apache License 2.0
246 stars 165 forks source link

Bug Report: [Editor Crashes Regardless If File Is Encoded via FFmpeg] #347

Open tivvo opened 1 month ago

tivvo commented 1 month ago

Which target are you using?

[X] Windows [ ] Linux [ ] Mac

Explain your issue

Please check first if your issue haven't already been reported yet.

Editor crashes upon trying to use a song that contains metadata (i.e, artist metada). (actual crash error) image

Recreation Steps

tivvo commented 1 month ago

this is so stupid lmao

tivvo commented 1 month ago

ok I LIEEED this seems to be after encoding with ffmpeg from any file to an ogg use the following command or whatever to tes tthis out should be obvious what song path is ffmpeg -i "songPath\song.mp3" -c:a libopus -b:a 128k "songPath\song.ogg"

NexIsDumb commented 5 days ago

wait can you pass me the audio this is so odd😭

tivvo commented 5 days ago

ignore that its subterfuge its the quickest thing i could think of that i can reencode for this evilterfuge.ogg.zip also yeah just tested on mac using whisky doesn't wanna work either tiv 2024-08-27 @ wine64-preloader@2x

NexIsDumb commented 5 days ago

aight, i'll check later on then

PetscopF commented 5 days ago

Recreation Steps

  • Use a audio file that contains metadata for an artist (easiest way for this is to get a song from cobalt.tools from youtube, andthen use it after converting it via ffmpeg to ogg)
  • Add it into the editor, whether voices or instrumental track, the following should be result: tiv@14-07-2024- CodenameEngine #Hind The intended result should be the following: tiv@14-07-2024- CodenameEngine #Ostracod
  • After this, create the song as normal and proceed to try to edit the diffculty.
  • The game should return an error, and then crash.

I am absolutely confused how implementing an artist into the OGG metadata even causes a Null Object Reference like this. Like, is there just something wrong with how the current audio system implements audio metadata or something that causes it to return a nonexistent object??

tivvo commented 5 days ago

Recreation Steps

  • Use a audio file that contains metadata for an artist (easiest way for this is to get a song from cobalt.tools from youtube, andthen use it after converting it via ffmpeg to ogg)

  • Add it into the editor, whether voices or instrumental track, the following should be result:

    tiv@14-07-2024- CodenameEngine #Hind

    The intended result should be the following:

    tiv@14-07-2024- CodenameEngine #Ostracod

  • After this, create the song as normal and proceed to try to edit the diffculty.

  • The game should return an error, and then crash.

I am absolutely confused how implementing an artist into the OGG metadata even causes a Null Object Reference like this. Like, is there just something wrong with how the current audio system implements audio metadata or something that causes it to return a nonexistent object??

iirc, even when stripping the metadata still caused an issue, although i do have a theory that the bitrate is too high for the song (it being 128k/b), i'll try a 32k/b encode instead and see if the same thing comes up

wonder if this is a haxel issue also

tivvo commented 5 days ago

bad news tiv 2024-08-27 @ wine64-preloader@2x (still fucks up with a lower bitrate)

PetscopF commented 5 days ago

I'm guessing that based on the images it's probably somewhere within the audio player.

Does this issue happen with the voices as well?

tivvo commented 5 days ago

yep, seems that from the actual crashing error the waveform that generates does not like it at all possible solution could be to catch a waveform error and instead not generate it and let the editor just work like normal (or don't and fix the issue, first thing could save alot of stress though imo)

PetscopF commented 4 days ago

My only guess right now is that it searches for the audio data at a very specific location in the file, but the metadata is in place of that and it crashes. I'm not sure if that is correct, I've never delved into how Ogg Vorbis works, I've never delved into how the waveform is generated, I've never delved into how ffmpeg converts into Ogg, but that's really what I've got so far.