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 trying to play audio #2034

Closed
homocomputeris opened this issue Dec 24, 2024 · 12 comments · Fixed by #2053 or #2055
Closed

Crash when trying to play audio #2034

homocomputeris opened this issue Dec 24, 2024 · 12 comments · Fixed by #2053 or #2055

Comments

@homocomputeris
Copy link

homocomputeris commented Dec 24, 2024

Describe the bug
GD crashes when trying to play audio

dsl resource name is /home/user/GoldenDict/deu-deu/deu-deu_duden_universal_as_3_0/ID4110882_3283053.m4a
/usr/include/c++/14.2.1/bits/stl_vector.h:1213: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::front() [with _Tp = char; _Alloc = std::allocator<char>; reference = char&]: Assertion '!this->empty()' failed.
zsh: IOT instruction (core dumped)  goldendict

To Reproduce
Steps to reproduce the behavior:

  1. Compress dictionary to dsl.dz
  2. Compress files to dsl.dz.files.zip
  3. Try to play audio

Affected Dictionaries
File structure:

test.dsl.dz.files.zip
test.dsl.dz

Expected behavior
Play audio and do not crash

Screenshots
If applicable, add screenshots to help explain your problem.

OS and software versions

Goldendict-ng 24.11.0.27c3e614 at 2024-12-22T18:53:50Z
Qt 6.8.1 GCC 14.2.1 20240910 arch linux 6.12.4-zen1-1-zen x86_64-little_endian-lp64
Flags: MAKE_ZIM_SUPPORT EPWING_SUPPORT MAKE_CHINESE_CONVERSION_SUPPORT no_ffmpeg_player

@xiaoyifang
Copy link
Owner

Can you upload the dictionary for testing?

@homocomputeris
Copy link
Author

test.dsl.zip

@xiaoyifang
Copy link
Owner

not reproduced on Windows ,will try linux later.

Do you build from source?

@homocomputeris
Copy link
Author

Do you build from source?

Yes, more specifically it's https://aur.archlinux.org/packages/goldendict-ng-git

@homocomputeris
Copy link
Author

It doesn't crash on

Goldendict-ng 24.11.0.b9ab7dc at 2024-12-20T03:22:19Z
Qt 6.7.2 Clang 15.0.0 (clang-1500.1.0.2.5) macos darwin 24.2.0 x86_64-little_endian-lp64
Flags: MAKE_ZIM_SUPPORT EPWING_SUPPORT MAKE_CHINESE_CONVERSION_SUPPORT no_ffmpeg_player

but no audio is played.

Does QT Multimedia support AAC in *.m4a?

@xiaoyifang
Copy link
Owner

xiaoyifang commented Dec 31, 2024

@homocomputeris do you still have the core dump file ,you can upload the stack trace here too.

IOT instruction (core dumped) goldendict

gdb goldendict [coredump]
#then input bt,will output the stack trace 

@homocomputeris
Copy link
Author

homocomputeris commented Dec 31, 2024

Immediately after it crashed again:

❯ gdb goldendict [coredump]
zsh: no matches found: [coredump]

~
❯ gdb goldendict
GNU gdb (GDB) 15.2
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from goldendict...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
(No debugging symbols found in goldendict)
(gdb) bt
No stack.
(gdb)

@xiaoyifang
Copy link
Owner

[coredump] should be replaced with your real path.

@homocomputeris
Copy link
Author

[coredump] should be replaced with your real path.

How do I find the real path?

@homocomputeris
Copy link
Author

homocomputeris commented Jan 1, 2025

Goldendict-ng 24.11.0.d96deece at 2025-01-01T19:00:12Z
Qt 6.8.1 GCC 14.2.1 20240910 arch linux 6.12.7-zen1-1-zen x86_64-little_endian-lp64
Flags: MAKE_ZIM_SUPPORT EPWING_SUPPORT MAKE_CHINESE_CONVERSION_SUPPORT no_ffmpeg_player

does not crash, but audio is not played (no sound). Tested both with QT multimedia and external audio player (mpv).

The same on macos (see above).

@xiaoyifang xiaoyifang reopened this Jan 2, 2025
@xiaoyifang
Copy link
Owner

ps: this bug existed in the official goldendict too.

I think the problem here is that the file is streamed file ,which the local zip file header 's field general_purpose_bit_flag bit 3==1.

@homocomputeris
Copy link
Author

I confirm it works in

Goldendict-ng 24.11.0.24720a79 at 2025-01-03T21:13:05Z
Qt 6.8.1 GCC 14.2.1 20240910 arch linux 6.12.7-zen1-1-zen x86_64-little_endian-lp64
Flags: MAKE_ZIM_SUPPORT EPWING_SUPPORT MAKE_CHINESE_CONVERSION_SUPPORT no_ffmpeg_player

Thank you very much!

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