You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, when importing mp3 files in the editor, the editor crashes with this callstack. The bug is not related to the file itself, as I managed to import a file that crashed the editor previously successfully in other tries.
godot.windows.tools.64.exe!hdr_valid(const unsigned char * h) Line 266 C++
godot.windows.tools.64.exe!mp3d_find_frame(const unsigned char * mp3, int mp3_bytes, int * free_format_bytes, int * ptr_frame_bytes) Line 1676 C++
godot.windows.tools.64.exe!mp3dec_decode_frame(mp3dec_t * dec, const unsigned char * mp3, int mp3_bytes, float * pcm, mp3dec_frame_info_t * info) Line 1731 C++
> godot.windows.tools.64.exe!mp3dec_ex_read_frame(mp3dec_ex_t * dec, float * * buf, mp3dec_frame_info_t * frame_info, unsigned __int64 max_samples) Line 904 C++
godot.windows.tools.64.exe!AudioStreamPlaybackMP3::_mix_internal(AudioFrame * p_buffer, int p_frames) Line 51 C++
godot.windows.tools.64.exe!AudioStreamPlaybackResampled::begin_resample() Line 105 C++
godot.windows.tools.64.exe!AudioStreamPlaybackMP3::start(float p_from_pos) Line 87 C++
godot.windows.tools.64.exe!EditorAudioStreamPreviewPlugin::generate(const Ref<Resource> & p_from, const Vector2 & p_size) Line 638 C++
godot.windows.tools.64.exe!EditorResourcePreviewGenerator::generate_from_path(const String & p_path, const Vector2 & p_size) Line 69 C++
godot.windows.tools.64.exe!EditorResourcePreview::_generate_preview(Ref<ImageTexture> & r_texture, Ref<ImageTexture> & r_small_texture, const EditorResourcePreview::QueueItem & p_item, const String & cache_base) Line 166 C++
godot.windows.tools.64.exe!EditorResourcePreview::_iterate() Line 256 C++
godot.windows.tools.64.exe!EditorResourcePreview::_thread() Line 334 C++
godot.windows.tools.64.exe!EditorResourcePreview::_thread_func(void * ud) Line 106 C++
godot.windows.tools.64.exe!Thread::callback(Thread * p_self, const Thread::Settings & p_settings, void(*)(void *) p_callback, void * p_userdata) Line 76 C++
It looks like the mp3d in the AudioStreamPlaybackMP3 was not properly initialised as it points to garbage data. This might be caused by a race condition due to the multithreaded nature of the preview generation, which would explain why the bug is not 100% reproducible.
Steps to reproduce
Import mp3s in an empty project until the editor crashes. The bug might be easier to reproduce on a full debug build of the editor (where I first encountered it)
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered:
If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.
Godot version
4.0.dev (168edcd) (debug)
System information
Windows 10
Issue description
Sometimes, when importing mp3 files in the editor, the editor crashes with this callstack. The bug is not related to the file itself, as I managed to import a file that crashed the editor previously successfully in other tries.
It looks like the
mp3d
in the AudioStreamPlaybackMP3 was not properly initialised as it points to garbage data. This might be caused by a race condition due to the multithreaded nature of the preview generation, which would explain why the bug is not 100% reproducible.Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: