I've been trying to debug a fails-to-start for a friend. Quickly I
suspected a corrupt configuration file. The configuration file doesn't
seem to be corrupt, but I can reproducible SEGFAULT kid3-qt with the
following configuration file (copied and reduced from my friends laptop)
paul@toba ~ $ cat .config/Kid3/Kid3.conf
[GUI]
PlayToolBarVisible=true
[MainWindow]
Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\xff\xff\xff\xda\0\0\a\x7f\0\0\x3\xf1\0\0\0\0\0\0\0\0\0\0\0\x8e\0\0\x3\xf1\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x3\xf1)
WindowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\a\x80\0\0\x3v\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x2\0\0\0\x2\0\0\0\x1\0\0\0\x16\0M\0\x61\0i\0n\0T\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x14\0K\0i\0\x64\0\x33\0P\0l\0\x61\0y\0\x65\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0)
I started kid3-qt under gdb, see below. As this is very reproducible,
let me know if you need more info.
Paul
paul@toba ~ $ gdb kid3-qt
GNU gdb (Debian 16.3-1) 16.3
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-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 kid3-qt...
This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.debian.net>
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.
Reading symbols from
/home/paul/.cache/debuginfod_client/f690704b62aa8da66e29b2d32a765fe39055c6f7/debuginfo...
(gdb) run
Starting program: /usr/bin/kid3-qt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff09ff6c0 (LWP 226013)]
[New Thread 0x7fffecbf46c0 (LWP 226014)]
[New Thread 0x7fffe7fff6c0 (LWP 226015)]
[New Thread 0x7fffe49ff6c0 (LWP 226017)]
[New Thread 0x7fffde3ff6c0 (LWP 226018)]
[New Thread 0x7fffddbfe6c0 (LWP 226019)]
[New Thread 0x7fffdd3fd6c0 (LWP 226020)]
[New Thread 0x7fffdcbfc6c0 (LWP 226021)]
[New Thread 0x7fffbbfff6c0 (LWP 226022)]
[Thread 0x7fffbbfff6c0 (LWP 226022) exited]
[Thread 0x7fffdcbfc6c0 (LWP 226021) exited]
[Thread 0x7fffdd3fd6c0 (LWP 226020) exited]
[Thread 0x7fffddbfe6c0 (LWP 226019) exited]
[New Thread 0x7fffddbfe6c0 (LWP 226023)]
qt.multimedia.ffmpeg: Using Qt multimedia with FFmpeg version 7.1.1-1+b1
GPL version 2 or later
qt.multimedia.ffmpeg: Available HW decoding frameworks:
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared
object file: No such file or directory
[New Thread 0x7fffdd3fd6c0 (LWP 226026)]
[New Thread 0x7fffdcbfc6c0 (LWP 226027)]
[Thread 0x7fffdcbfc6c0 (LWP 226027) exited]
[Thread 0x7fffdd3fd6c0 (LWP 226026) exited]
qt.multimedia.ffmpeg: vaapi
qt.multimedia.ffmpeg: vulkan
qt.multimedia.ffmpeg: Available HW encoding frameworks:
qt.multimedia.ffmpeg: vaapi
qt.multimedia.ffmpeg: vulkan
[New Thread 0x7fffdd3fd6c0 (LWP 226028)]
Thread 1 "kid3-qt" received signal SIGSEGV, Segmentation fault.
Download failed: Invalid argument. Continuing without source file
./obj-x86_64-linux-gnu/./src/widgets/widgets/qtoolbararealayout.cpp.
0x00007ffff73e1b7d in QToolBarAreaLayoutItem::skip (this=0x5555559bf550)
at ./src/widgets/widgets/qtoolbararealayout.cpp:58
warning: 58 ./src/widgets/widgets/qtoolbararealayout.cpp: No such
file or directory
(gdb) bt
#0 0x00007ffff73e1b7d in QToolBarAreaLayoutItem::skip (this=0x5555559bf550)
at ./src/widgets/widgets/qtoolbararealayout.cpp:58
#1 QToolBarAreaLayoutLine::skip (this=0x555555cf77e0)
at ./src/widgets/widgets/qtoolbararealayout.cpp:155
#2 QToolBarAreaLayoutInfo::sizeHint (this=0x555555846500)
at ./src/widgets/widgets/qtoolbararealayout.cpp:188
#3 0x00007ffff7353f06 in QToolBarAreaLayout::fitLayout
(this=0x555555846440)
at ./src/widgets/widgets/qtoolbararealayout.cpp:609
#4 QToolBarAreaLayout::fitLayout (this=0x555555846440)
at ./src/widgets/widgets/qtoolbararealayout.cpp:601
#5 QMainWindowLayoutState::fitLayout (this=0x555555846428)
at ./src/widgets/widgets/qmainwindowlayout.cpp:870
#6 0x00007ffff7369b97 in QMainWindowLayout::setGeometry
(this=0x5555558463a0, _r=...)
at ./src/widgets/widgets/qmainwindowlayout.cpp:2349
#7 0x00007ffff71e2c29 in QLayoutPrivate::doResize
(this=this@entry=0x555555846bc0)
at ./src/widgets/kernel/qlayout.cpp:506
#8 0x00007ffff71e3403 in QLayout::activate (this=<optimized out>)
at ./src/widgets/kernel/qlayout.cpp:1055
#9 0x00007ffff7200767 in QWidgetPrivate::setVisible
(this=0x555555760bd0, visible=<optimized out>)
at ./src/widgets/kernel/qwidget.cpp:8352
#10 0x000055555556a47c in main (argc=<optimized out>, argv=<optimized out>)
at ./src/app/qt/mainqt.cpp:103
Hey Urs, could you have a look here? Thanks-------- Weitergeleitete Nachricht -------- Betreff: Bug#1106294: kid3-qt: SIGSEGV with certain configuration file Weitersenden-Datum: Thu, 22 May 2025 17:03:02 +0000 Weitersenden-Von: Paul Gevers <elbrus@debian.org> Weitersenden-An: debian-bugs-dist@lists.debian.org Weitersenden-CC: Patrick Matthäi <pmatthaei@debian.org> Datum: Thu, 22 May 2025 18:59:04 +0200 Von: Paul Gevers <elbrus@debian.org> Antwort an: Paul Gevers <elbrus@debian.org>, 1106294@bugs.debian.org An: Debian Bug Tracking System <submit@bugs.debian.org> Package: kid3-qt Version: 3.9.6-2+b2 Severity: normal I've been trying to debug a fails-to-start for a friend. Quickly I suspected a corrupt configuration file. The configuration file doesn't seem to be corrupt, but I can reproducible SEGFAULT kid3-qt with the following configuration file (copied and reduced from my friends laptop) paul@toba ~ $ cat .config/Kid3/Kid3.conf [GUI] PlayToolBarVisible=true [MainWindow] Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\xff\xff\xff\xda\0\0\a\x7f\0\0\x3\xf1\0\0\0\0\0\0\0\0\0\0\0\x8e\0\0\x3\xf1\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\a\x7f\0\0\x3\xf1) WindowState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\0\0\0\a\x80\0\0\x3v\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x2\0\0\0\x2\0\0\0\x1\0\0\0\x16\0M\0\x61\0i\0n\0T\0o\0o\0l\0\x62\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\x3\0\0\0\x1\0\0\0\x14\0K\0i\0\x64\0\x33\0P\0l\0\x61\0y\0\x65\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0) I started kid3-qt under gdb, see below. As this is very reproducible, let me know if you need more info. Paul paul@toba ~ $ gdb kid3-qt GNU gdb (Debian 16.3-1) 16.3 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-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 kid3-qt... This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.debian.net> 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. Reading symbols from /home/paul/.cache/debuginfod_client/f690704b62aa8da66e29b2d32a765fe39055c6f7/debuginfo... (gdb) run Starting program: /usr/bin/kid3-qt [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff09ff6c0 (LWP 226013)] [New Thread 0x7fffecbf46c0 (LWP 226014)] [New Thread 0x7fffe7fff6c0 (LWP 226015)] [New Thread 0x7fffe49ff6c0 (LWP 226017)] [New Thread 0x7fffde3ff6c0 (LWP 226018)] [New Thread 0x7fffddbfe6c0 (LWP 226019)] [New Thread 0x7fffdd3fd6c0 (LWP 226020)] [New Thread 0x7fffdcbfc6c0 (LWP 226021)] [New Thread 0x7fffbbfff6c0 (LWP 226022)] [Thread 0x7fffbbfff6c0 (LWP 226022) exited] [Thread 0x7fffdcbfc6c0 (LWP 226021) exited] [Thread 0x7fffdd3fd6c0 (LWP 226020) exited] [Thread 0x7fffddbfe6c0 (LWP 226019) exited] [New Thread 0x7fffddbfe6c0 (LWP 226023)] qt.multimedia.ffmpeg: Using Qt multimedia with FFmpeg version 7.1.1-1+b1 GPL version 2 or later qt.multimedia.ffmpeg: Available HW decoding frameworks: Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory [New Thread 0x7fffdd3fd6c0 (LWP 226026)] [New Thread 0x7fffdcbfc6c0 (LWP 226027)] [Thread 0x7fffdcbfc6c0 (LWP 226027) exited] [Thread 0x7fffdd3fd6c0 (LWP 226026) exited] qt.multimedia.ffmpeg: vaapi qt.multimedia.ffmpeg: vulkan qt.multimedia.ffmpeg: Available HW encoding frameworks: qt.multimedia.ffmpeg: vaapi qt.multimedia.ffmpeg: vulkan [New Thread 0x7fffdd3fd6c0 (LWP 226028)] Thread 1 "kid3-qt" received signal SIGSEGV, Segmentation fault. Download failed: Invalid argument. Continuing without source file ./obj-x86_64-linux-gnu/./src/widgets/widgets/qtoolbararealayout.cpp. 0x00007ffff73e1b7d in QToolBarAreaLayoutItem::skip (this=0x5555559bf550) at ./src/widgets/widgets/qtoolbararealayout.cpp:58 warning: 58 ./src/widgets/widgets/qtoolbararealayout.cpp: No such file or directory (gdb) bt #0 0x00007ffff73e1b7d in QToolBarAreaLayoutItem::skip (this=0x5555559bf550) at ./src/widgets/widgets/qtoolbararealayout.cpp:58 #1 QToolBarAreaLayoutLine::skip (this=0x555555cf77e0) at ./src/widgets/widgets/qtoolbararealayout.cpp:155 #2 QToolBarAreaLayoutInfo::sizeHint (this=0x555555846500) at ./src/widgets/widgets/qtoolbararealayout.cpp:188 #3 0x00007ffff7353f06 in QToolBarAreaLayout::fitLayout (this=0x555555846440) at ./src/widgets/widgets/qtoolbararealayout.cpp:609 #4 QToolBarAreaLayout::fitLayout (this=0x555555846440) at ./src/widgets/widgets/qtoolbararealayout.cpp:601 #5 QMainWindowLayoutState::fitLayout (this=0x555555846428) at ./src/widgets/widgets/qmainwindowlayout.cpp:870 #6 0x00007ffff7369b97 in QMainWindowLayout::setGeometry (this=0x5555558463a0, _r=...) at ./src/widgets/widgets/qmainwindowlayout.cpp:2349 #7 0x00007ffff71e2c29 in QLayoutPrivate::doResize (this=this@entry=0x555555846bc0) at ./src/widgets/kernel/qlayout.cpp:506 #8 0x00007ffff71e3403 in QLayout::activate (this=<optimized out>) at ./src/widgets/kernel/qlayout.cpp:1055 #9 0x00007ffff7200767 in QWidgetPrivate::setVisible (this=0x555555760bd0, visible=<optimized out>) at ./src/widgets/kernel/qwidget.cpp:8352 #10 0x000055555556a47c in main (argc=<optimized out>, argv=<optimized out>) at ./src/app/qt/mainqt.cpp:103
Hi Patrick, Thanks for the report. However, I am not able to reproduce it. I am running Debian Testing with the latest updates, which seems to be the version the reporter mentioned, but I cannot see a crash. I also tried with Debian Stable and with custom builds, both using Qt 6 and Qt 5, but I have never had a segfault. Can you reproduce it? Best regards, Urs
Hi, Original reporter here. My friend came to me with his failure, and I could reproduce it with the configuration I pasted. If it wasn't clear: it only fails with kid3-qt, it doesn't fail with kid3. I can reproduce it on my system, if you give me instructions I can extract more information if needed. Paul
I tested it with kid3-qt. I would say that using the attached Kid3.conf with `KID3_CONFIG_FILE=~/Downloads/Kid3.conf kid3-qt` should be enough to reproduce the issue, but I never could (neither with copying the configuration to ~/.config/Kid3/Kid3.conf). I have Debian testing with KDE, the same package versions as in the report. I normally have a resolution of 31840x2160 at 150%, but I also tried to reproduce it with lower resolutions. What you could do to extract more information: If I look at the stack trace, it could be a problem of Qt rather than kid3-qt. The crash happens at https://github.com/qt/qtbase/blob/f1136de66638060b8a1ab9bc0cdf1a91dcb5ec01/src/widgets/widgets/qtoolbararealayout.cpp#L58 which contains return widgetItem == nullptr || widgetItem->isEmpty(); so the most plausible cause could be widgetItem pointing to an invalid (probably deallocated) location. The most suspect code I found is https://github.com/qt/qtbase/blob/f1136de66638060b8a1ab9bc0cdf1a91dcb5ec01/src/widgets/widgets/qtoolbararealayout.cpp#L530 line.toolBarItems.insert(k, gap_item); with gap_item being allocated on the stack at line 506 QToolBarAreaLayoutItem gap_item; So what you could do is set a breakpoint in all these lines (58, 506, 530) to check if this code is run in the case of a crash and compare the address of widgetItem with the address of gap_item on the stack. You would have to install the debug symbol and source packages of qtbase to do so.
Hi Hmm, interesting. I recently had other issues because of relative low resolution [1], my resolution is 1920x1080, but maybe because of my settings (rather big font), it may effectively be less. [1] https://salsa.debian.org/reproducible-builds/reproducible-website/-/issues/61#note_554571 Although I'm a Debian Developer, I have very little experience with debugging code like that. I would need some hints how to achieve those things. Is it easy to say how to do that? Is it just as simple as starting kid3-qt under gdb, some call to set the breakpoint, type "run" and then ... I don't know... I'm using https://debuginfod.debian.net/ to get all debug symbols, but it's not sure if I need the source than too. Do you know? If yes, where should I put the source and/or how do I tell gdb? Paul