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

Crash when importing specific OGG file (converted from MP3 via audacity) #88793

Closed
marchare555 opened this issue Feb 25, 2024 · 9 comments
Closed

Comments

@marchare555
Copy link

marchare555 commented Feb 25, 2024

Tested versions

  • 4.2
  • 4.2.1 (stable)
  • 4.3-dev3

System information

Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 with Max-Q Design (NVIDIA; 30.0.15.1169) - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads)

Issue description

Godot crashes everytime I import an audio file. It happens during the "re-import" process with .ogg or .mp3 files. I don't see any error message when it happens.

Steps to reproduce

  1. Open Godot
  2. Import audio file through file manager or drag'n'drop
  3. Wait for Godot to "re-import"

Minimal reproduction project (MRP)

Any project, even a fresh empty one triggers the crash on my side.

Additional note: sometimes Godot has time to leave "import" files in the folder where the file was imported. Sometimes it doesn't. I can upload an import file if that helps.

@AkhRani
Copy link

AkhRani commented Feb 26, 2024

Not seeing this on 4.2.1 (stable) with Windows 10 19045.4046 with 6GB GeForce 1060, 32GB of RAM and AMD Ryzen 9 3900X (12 cores), at least not with the first random .mp3 I tried.

Project is using Forward Plus for the renderer, and default settings for the mp3 importer (and ogg, though I didn't check that)
Tried with a project updated from 4.0 and a new project.

Upload your files and I'll try with them. Also, maybe try running godot from the command line and see if there are any error messages there?

@marchare555
Copy link
Author

marchare555 commented Feb 26, 2024

Upload your files and I'll try with them. Also, maybe try running godot from the command line and see if there are any error messages there?

I tried running the "godot console" .exe and unfortunately, I couldn't see any new information here before it closes down at the same time as the editor.

Here is an .ogg files that makes Godot crash every time
clenchinghand.zip

And here is the one file that seems to work without crash (+ import info)
beltbuckle.zip

@AkhRani
Copy link

AkhRani commented Feb 26, 2024

Was able to reproduce the crash in 4.2.1 stable with the uploaded .ogg file. No useful information on the console. Debug build of the master branch does not crash. Going to try a debug build of 4.2.1.

@marchare555
Copy link
Author

I found several more files that work without crash. If it helps I can upload a handful of "crashing" and "non-crashing" files if that helps find a pattern that differs between the two groups.

@AkhRani
Copy link

AkhRani commented Feb 26, 2024

Current 4.2.2 tip gives the following console error on import but does not crash

ERROR: Error during vorbis synthesis -135
at: (modules\vorbis\audio_stream_ogg_vorbis.cpp:159)

(Edit) It produces a ton of these messages if the sample is played, though it seems to play correctly.
(Edit) Tracked to this block in synthesis.c
/* Check the packet type /
if(oggpack_read(opb,1)!=0){
/
Oops. This is not an audio data packet */
return(OV_ENOTAUDIO);
}

Edited to add:
Checked this file with the following commands, and no errors were reported. However, the first command only checks the ogg wrapper, and I'm not sure about the second.

oggz-validate clenchinghand.ogg
ffmpeg -i clenchinghand.ogg -f null -err_detect +crccheck+bitstream+buffer+explode+careful+compliant+aggressive -v error -xerror

I think this is enough to go on for someone who understands this code better than I do, but if you want to upload the smallest .ogg and .mp3 files that cause the problem, that might help.

@marchare555
Copy link
Author

marchare555 commented Feb 27, 2024

Ok, I tried importing all audio files (2200 of them) and it turns out that it's just that one file that makes Godot crash.

It's literally this file I found on Freesound.org, which was originally in MP3 and I converted to .ogg with Audacity:
https://freesound.org/people/Taira%20Komori/sounds/215015/

Curiously, the untouched MP3 file imports just fine to Godot, so it might be some change in Audacity during the conversion that Godot doesn't seem to like.

@MJacred
Copy link
Contributor

MJacred commented Feb 27, 2024

@marchare555: So you only have the issue when using an .ogg file? Could you please make a build using PR #87246 or any later? 4.3-dev3 was before that PR got merged.

(this is possibly a duplicate of #87076)

@akien-mga akien-mga changed the title Godot crashes everytime I import audio files Crash when importing specific OGG file (converted from MP3 via audacity) Feb 27, 2024
@akien-mga akien-mga added this to the 4.3 milestone Feb 27, 2024
@akien-mga
Copy link
Member

I can confirm the crash in 4.2.1-stable and 4.3-dev3 with the clenchinghand.ogg file from #88793 (comment)

And indeed I can confirm that it's fixed in the master branch by #87246, so it's the same bug as #87076.
I'll backport #87246 for 4.2.2 and 4.1.4 so this should be fixed in the next builds.

@marchare555
Copy link
Author

@marchare555: So you only have the issue when using an .ogg file? Could you please make a build using PR #87246 or any later? 4.3-dev3 was before that PR got merged.

(this is possibly a duplicate of #87076)

I tried with 4.3-dev4 and the offending OGG files now imports and plays properly. Thanks a bunch!

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

No branches or pull requests

5 participants