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
The emit cancelPlaying( false ); doesn't imply the thread will shut down immediately.
If the computer is slow enough, or someone clicks too fast, thread = std::make_shared< DecoderThread >( audioData, this ); will try to delete a running QThread and give this message QThread: Destroyed while thread is still running
thread = std::make_shared< DecoderThread >( audioData, this );
Screen.Recording.2024-03-19.at.8.35.45.PM.mov
The text was updated successfully, but these errors were encountered:
shenlebantongying
changed the title
Crash if clicking play audio insanely fast (or the computer is too slow)
Crash if clicking play audio maniacally fast (or the computer is too slow)
Mar 20, 2024
To reproduce easier, try to add a sanitizer to slow down.
Add a sound folder with a single sound -> https://upload.wikimedia.org/wikipedia/commons/5/52/En-us-hello.ogg
The problem is the operator
=
of std::shared_ptr will destroy the previous owned data first. https://en.cppreference.com/w/cpp/memory/shared_ptr/operator%3DThe
emit cancelPlaying( false );
doesn't imply thethread
will shut down immediately.If the computer is slow enough, or someone clicks too fast,
thread = std::make_shared< DecoderThread >( audioData, this );
will try to delete a running QThread and give this messageQThread: Destroyed while thread is still running
goldendict-ng/src/ffmpegaudio.cc
Lines 54 to 56 in ebce607
Screen.Recording.2024-03-19.at.8.35.45.PM.mov
The text was updated successfully, but these errors were encountered: