Bug 323678

Summary: Crash when adding content to an initially empty playlist layout
Product: [Applications] amarok Reporter: Benjamin Schindler <beschindler>
Component: Playlist/Playlist Layout EditorAssignee: Amarok Bugs <amarok-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: minor Flags: myriam: corner_case+
Priority: NOR    
Version First Reported In: 2.8.0   
Target Milestone: 2.9   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Benjamin Schindler 2013-08-18 16:40:44 UTC
So for some reason, my playlist layout got erased, it has 0 entries at least in the gui. So I added just the track title, press apply -> crash: 

Thread 1 (Thread 0x7faa71cd07c0 (LWP 13529)):
[KCrash Handler]
#6  0x00007faa87f31f18 in QListWidgetItem::text (this=0x0) at /usr/include/qt4/QtGui/qlistwidget.h:90
#7  0x00007faa87f77fc0 in Playlist::PlaylistLayoutEditDialog::apply (this=0x28e57d0) at /var/tmp/portage/media-sound/amarok-2.8.0/work/amarok-2.8.0/src/playlist/layouts/PlaylistLayoutEditDialog.cpp:426
#8  0x00007faa87f7895d in Playlist::PlaylistLayoutEditDialog::qt_static_metacall (_o=0x28e57d0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fff011d7a20) at /var/tmp/portage/media-sound/amarok-2.8.0/work/amarok-2.8.0_build/src/PlaylistLayoutEditDialog.moc:71
#9  0x00007faa864e0c71 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#10 0x00007faa87561c92 in QAbstractButton::clicked(bool) () from /usr/lib64/qt4/libQtGui.so.4
#11 0x00007faa872a1b2e in ?? () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007faa872a2e6b in ?? () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007faa872a30dc in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#14 0x00007faa86f4a48c in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007faa86ef9c54 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#16 0x00007faa86eff2f3 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#17 0x00007faa88ba3b06 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#18 0x00007faa864cce0c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#19 0x00007faa86efac22 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/qt4/libQtGui.so.4
#20 0x00007faa86f76618 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007faa86f7540a in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#22 0x00007faa86f9cd52 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#23 0x00007faa80c306f3 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#24 0x00007faa80c30a40 in ?? () from /usr/lib64/libglib-2.0.so.0
#25 0x00007faa80c30b04 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#26 0x00007faa864fbf1f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#27 0x00007faa86f9c9ee in ?? () from /usr/lib64/qt4/libQtGui.so.4
#28 0x00007faa864cb942 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#29 0x00007faa864cbb97 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#30 0x00007faa864d09b5 in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#31 0x0000000000408be0 in main (argc=1, argv=0x7fff011db528) at /var/tmp/portage/media-sound/amarok-2.8.0/work/amarok-2.8.0/src/main.cpp:329

Reproducible: Always

Steps to Reproduce:
1. Make playlist layout empty (may be apply this first, exiting the dialog?)
2. Add track name to the layout
3. Press apply
Actual Results:  
crash, with backtrace as above
Comment 1 Myriam Schweingruber 2013-08-18 21:44:11 UTC
I am quit puzzled how you can end up with an empty layout, this is really a corner case, as there are 4 preset playlist layouts, those don't just disappear like that.
Comment 2 Benjamin Schindler 2013-08-18 21:47:44 UTC
And with that, you already hinted at the solution of the bug. 

For some reason, all of the 4 presets are lost here (is there a way to get them back?). 
If there is no layout, the current layout is empty, and hence the crash. 

If I press "new layout", and then add e.g. the title, things work. 

So yes, corner case. But it is a segfault and a segfault is a serious error in my book.
Comment 3 Myriam Schweingruber 2013-08-18 21:53:32 UTC
Something must have gone terribly wrong when you upgraded, as there was no change in this code from our side since quite some time. I tend to think this is an installation or compilation problem.
Comment 4 Benjamin Schindler 2013-08-18 22:00:20 UTC
I can likely explain the strange thing that happened: 

I had a bug seemingly in amarok. I used 2.7.x at that time. As I'm a software engineer I decided to checkout latest git and debug the issue. It turned out to be a 3rd party problem, so I deleted this, and went back to 2.7.x, which is where the trouble happened. The upgrade to 2.8 didn't change anything. 
But as I'm using 2.8 now, I selected this. 

So its not a compilation problem, an updgrade problem, but a problem caused by a downgrade. But the problem is not the downgrade. The downgrade just exposed a real bug. 

I don't expect downgrades to be handled sensibly, so I don't cry out why amarok lost my layout presets. If I only knew how to get them back....
Comment 5 Myriam Schweingruber 2013-08-19 07:59:21 UTC
(In reply to comment #4)
...
> I don't expect downgrades to be handled sensibly, so I don't cry out why
> amarok lost my layout presets. If I only knew how to get them back....

The presets are xml files in this folder: ~/.kde/share/apps/amarok/playlist_layouts (might be .kde4/.. on some distributions.

Re-installing should add the missing stuff
Comment 6 Andrew Crouthamel 2018-11-10 03:20:51 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Andrew Crouthamel 2018-11-12 03:22:35 UTC
Changing back to REPORTED per request of Myriam (Amarok dev).
Comment 8 Justin Zobel 2022-12-03 09:01:20 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 9 Bug Janitor Service 2022-12-18 05:14:34 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Bug Janitor Service 2023-01-02 05:28:29 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!