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

Godot Editor crash when re-importing .ogg song that is currently playing #26964

Closed
Yomic opened this issue Mar 12, 2019 · 7 comments · Fixed by #52406
Closed

Godot Editor crash when re-importing .ogg song that is currently playing #26964

Yomic opened this issue Mar 12, 2019 · 7 comments · Fixed by #52406

Comments

@Yomic
Copy link

Yomic commented Mar 12, 2019

Godot version:
Godot 3.1 RC2

OS/device including version:
Win 7 Pro 64-bit, Win 8.1 Pro 64-bit

Issue description:
When an ogg file is playing, if you re-import it while it's playing, it freezes Godot and crashes it upon scene saving.

Steps to reproduce:
Open the project in Godot 3.1 RC2, High-light the AudioStreamPlayer, check the 'Playing' button in the Inspector, Highlight the .ogg file in the Filesystem window, go to the import window and change a setting and re-import the file. This will cause only the 'Playing' button in the inspector to become unresponsive. Further, if you try to save the scene, Godot will crash.

Minimal reproduction project:
OggMusicTest.zip

@akien-mga akien-mga added this to the 3.2 milestone Mar 12, 2019
@volzhs
Copy link
Contributor

volzhs commented Oct 23, 2019

can't reproduce it with 3.2-alpha 48d3458

@KoBeWi
Copy link
Member

KoBeWi commented Dec 23, 2019

I can reproduce it with 3.2 beta4. It might not happen right away, reimport it few times also toggle playing on and off and it should eventually crash. I don't get backtrace though.

@akien-mga
Copy link
Member

Can't reproduce it either in the current master branch (bab91bd) on Linux.
Might be due to Windows file access locking files?

@akien-mga akien-mga modified the milestones: 3.2, 4.0 Jan 15, 2020
@KoBeWi
Copy link
Member

KoBeWi commented Feb 12, 2020

Ok, I keep getting random crashes that seem to be related to this. It's happening with OGG files and can happen to any new/modified file. In my case usually when I add a new music file, the editor crashes even if I didn't use the audio player. Still no backtrace.

Might be due to Windows file access locking files?

Why would it happen only to OGG files and not other resources?

EDIT:
I'm using 3e3f8a4

@3koozy
Copy link

3koozy commented Jul 12, 2020

Dear gents,
I have the same issue , when I try to import a (.ogg) file in the editor , it crashes right away..
Godot version : v3.2.2 stable official
OS: Windows 10 - 64-bit

  • Attached ; Project folder with a (Ogg_SoundFX.ogg) file to re-produce the crash.
    Test 4 - Sound.zip

@KoBeWi
Copy link
Member

KoBeWi commented Mar 9, 2021

I was FINALLY able to get a stack trace for this crash:

get8(stb_vorbis * z) Line 1326 (c:\godot_source\thirdparty\misc\stb_vorbis.c:1326)
vorbis_find_page(stb_vorbis * f, unsigned int * end, unsigned int * last) Line 4546 (c:\godot_source\thirdparty\misc\stb_vorbis.c:4546)
stb_vorbis_stream_length_in_samples(stb_vorbis * f) Line 4951 (c:\godot_source\thirdparty\misc\stb_vorbis.c:4951)
seek_to_sample_coarse(stb_vorbis * f, unsigned int sample_number) Line 4689 (c:\godot_source\thirdparty\misc\stb_vorbis.c:4689)
stb_vorbis_seek_frame(stb_vorbis * f, unsigned int sample_number) Line 4867 (c:\godot_source\thirdparty\misc\stb_vorbis.c:4867)
stb_vorbis_seek(stb_vorbis * f, unsigned int sample_number) Line 4901 (c:\godot_source\thirdparty\misc\stb_vorbis.c:4901)
AudioStreamPlaybackOGGVorbis::seek(float p_time) Line 115 (c:\godot_source\modules\stb_vorbis\audio_stream_ogg_vorbis.cpp:115)
AudioStreamPlaybackOGGVorbis::start(float p_from_pos) Line 84 (c:\godot_source\modules\stb_vorbis\audio_stream_ogg_vorbis.cpp:84)
EditorAudioStreamPreviewPlugin::generate(const Ref<Resource> & p_from, const Vector2 & p_size) Line 625 (c:\godot_source\editor\plugins\editor_preview_plugins.cpp:625)
EditorResourcePreviewGenerator::generate_from_path(const String & p_path, const Vector2 & p_size) Line 65 (c:\godot_source\editor\editor_resource_preview.cpp:65)
EditorResourcePreview::_generate_preview(Ref<ImageTexture> & r_texture, Ref<ImageTexture> & r_small_texture, const EditorResourcePreview::QueueItem & p_item, const String & cache_base) Line 160 (c:\godot_source\editor\editor_resource_preview.cpp:160)
EditorResourcePreview::_thread() Line 255 (c:\godot_source\editor\editor_resource_preview.cpp:255)
EditorResourcePreview::_thread_func(void * ud) Line 100 (c:\godot_source\editor\editor_resource_preview.cpp:100)
Thread::callback(Thread * p_self, const Thread::Settings & p_settings, void(*)(void *) p_callback, void * p_userdata) Line 73 (c:\godot_source\core\os\thread.cpp:73)
std::invoke<void (__cdecl*)(Thread *,Thread::Settings const &,void (__cdecl*)(void *),void *),Thread *,Thread::Settings,void (__cdecl*)(void *),void *>(void(*)(Thread *, const Thread::Settings &, void(*)(void *), void *) && _Obj, Thread * && _Arg1, Thread::Settings && <_Args2_0>, void(*)(void *) && <_Args2_1>, void * && <_Args2_2>) Line 1614 (c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits:1614)
std::thread::_Invoke<std::tuple<void (__cdecl*)(Thread *,Thread::Settings const &,void (__cdecl*)(void *),void *),Thread *,Thread::Settings,void (__cdecl*)(void *),void *>,0,1,2,3,4>(void * _RawVals) Line 44 (c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\thread:44)
thread_start<unsigned int (__cdecl*)(void *),1>(void * const parameter) Line 97 (c:\Users\Tomek\AppData\Local\Programs\Microsoft VS Code\minkernel\crts\ucrt\src\appcrt\startup\thread.cpp:97)
kernel32.dll!00007ffcd43d7c24() (Unknown Source:0)
ntdll.dll!00007ffcd4bed721() (Unknown Source:0)

I just opened project and exported an OGG from Audacity and Godot crashed upon importing it.

EDIT:
Now that I look at it, it's probably not related. Not sure.

@bud11
Copy link

bud11 commented Feb 17, 2023

Importing, replacing and even renaming ogg files while the editor is open still crashes consistently in godot 3.5.1. This happens regardless of whether I did it through godot or through the windows file manager.

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

Successfully merging a pull request may close this issue.

7 participants