Skip to content
This repository was archived by the owner on Mar 3, 2022. It is now read-only.

view categorized crash #1530

Closed
nicman23 opened this issue Aug 27, 2019 · 18 comments
Closed

view categorized crash #1530

nicman23 opened this issue Aug 27, 2019 · 18 comments
Labels

Comments

@nicman23
Copy link

Describe the bug
Instant crash (seg fault)

To Reproduce
Steps to reproduce the behavior:

  1. library view
  2. set group by album
  3. sort by artist year album
  4. set view categorized

Version Info

  • OS: Arch Linux
  • Cantata Version: master
  • MPD Version: 0.21.14
@CDrummond
Copy link
Owner

No crash for me, just tried. However, Cantata should have printed a stack trace to the console. Please start Cantata from a console, reproduce crash, and attach output here. Thanks.

@nicman23
Copy link
Author

nicman23 commented Sep 2, 2019

no output at all.

with gdb it outputs:

sing host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff083b700 (LWP 4792)]
[New Thread 0x7fffe9b28700 (LWP 4793)]
Icon theme "gnome" not found.
[New Thread 0x7fffe3fff700 (LWP 4794)]
[New Thread 0x7fffe37fe700 (LWP 4795)]
[New Thread 0x7fffe2ffd700 (LWP 4796)]
[New Thread 0x7fffe0f3b700 (LWP 4797)]
[New Thread 0x7fffcf929700 (LWP 4798)]
[New Thread 0x7fffcf128700 (LWP 4799)]
[New Thread 0x7fffce927700 (LWP 4800)]
[New Thread 0x7fffce126700 (LWP 4801)]
[New Thread 0x7fffcd925700 (LWP 4802)]
[New Thread 0x7fffcd124700 (LWP 4803)]
[New Thread 0x7fffcc923700 (LWP 4804)]
[New Thread 0x7fffaffff700 (LWP 4805)]
[New Thread 0x7fffaf7fe700 (LWP 4806)]
[New Thread 0x7fffaeffd700 (LWP 4807)]
[New Thread 0x7fffae7fc700 (LWP 4808)]
[New Thread 0x7fffadffb700 (LWP 4809)]
[New Thread 0x7fffad7fa700 (LWP 4810)]
[New Thread 0x7fffacff9700 (LWP 4811)]
[New Thread 0x7fff8bfff700 (LWP 4812)]
[New Thread 0x7fff8b7fe700 (LWP 4813)]
[New Thread 0x7fff8affd700 (LWP 4814)]
[New Thread 0x7fff8a7fc700 (LWP 4815)]
[New Thread 0x7fff89ffb700 (LWP 4816)]

Thread 1 "cantata" received signal SIGSEGV, Segmentation fault.
0x00007ffff6244f8f in QString::reallocData(unsigned int, bool) () from /usr/lib/libQt5Core.so.5

@CDrummond
Copy link
Owner

Can you recompile Cantata with debug, and try again? Pass CMAKE_BUILD_TYPE=Debug when invoking CMake.

@nicman23
Copy link
Author

nicman23 commented Sep 2, 2019

Thread 1 "cantata" received signal SIGSEGV, Segmentation fault.
0x00007ffff6337cd8 in QAbstractItemModel::hasIndex(int, int, QModelIndex const&) const ()

if you need anything more from gdb tell me because i have forgotten how to use it :P

@CDrummond
Copy link
Owner

Thanks. Please re-run in gdb, and when it crashes type where This will then list all the call stack.

@nicman23
Copy link
Author

nicman23 commented Sep 2, 2019

#0  0x00007ffff6337cd8 in QAbstractItemModel::hasIndex(int, int, QModelIndex const&) const () from /usr/lib/libQt5Core.so.5
#1  0x000055555592a186 in SqlLibraryModel::index (this=0x555555e3f940, row=59, column=0, parent=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/models/sqllibrarymodel.cpp:276
#2  0x00007ffff636028a in ?? () from /usr/lib/libQt5Core.so.5
#3  0x00007ffff63602c2 in QSortFilterProxyModel::mapToSource(QModelIndex const&) const () from /usr/lib/libQt5Core.so.5
#4  0x00007ffff6360555 in QSortFilterProxyModel::data(QModelIndex const&, int) const () from /usr/lib/libQt5Core.so.5
#5  0x0000555555ade0bb in QModelIndex::data (arole=399415562, this=0x7fffff7ff110) at /usr/include/qt/QtCore/qabstractitemmodel.h:462
#6  KCategorizedView::Private::categoryForIndex (this=<optimized out>, index=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/3rdparty/kcategorizedview/kcategorizedview.cpp:380
#7  0x0000555555ae114c in KCategorizedView::visualRect (this=0x555556191320, index=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/3rdparty/kcategorizedview/kcategorizedview.cpp:559
#8  0x0000555555adefe9 in KCategorizedView::Private::blockHeight (this=0x555556119200, category=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/3rdparty/kcategorizedview/kcategorizedview.cpp:227
#9  0x0000555555adf438 in KCategorizedView::Private::blockPosition (this=0x555556119200, category=...) at /usr/include/qt/QtCore/qhash.h:321
#10 0x0000555555ae1430 in KCategorizedView::visualRect (this=0x555556191320, index=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/3rdparty/kcategorizedview/kcategorizedview.cpp:574
#11 0x0000555555adeffb in KCategorizedView::Private::blockHeight (this=0x555556119200, category=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/3rdparty/kcategorizedview/kcategorizedview.cpp:228
#12 0x0000555555adf438 in KCategorizedView::Private::blockPosition (this=0x555556119200, category=...) at /usr/include/qt/QtCore/qhash.h:321
#13 0x0000555555ae1430 in KCategorizedView::visualRect (this=0x555556191320, index=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/3rdparty/kcategorizedview/kcategorizedview.cpp:574
#14 0x0000555555adeffb in KCategorizedView::Private::blockHeight (this=0x555556119200, category=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/3rdparty/kcategorizedview/kcategorizedview.cpp:228
#15 0x0000555555adf438 in KCategorizedView::Private::blockPosition (this=0x555556119200, category=...) at /usr/include/qt/QtCore/qhash.h:321
#16 0x0000555555ae1430 in KCategorizedView::visualRect (this=0x555556191320, index=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/3rdparty/kcategorizedview/kcategorizedview.cpp:574
#17 0x0000555555adeffb in KCategorizedView::Private::blockHeight (this=0x555556119200, category=...) at /tmp/yaytmp-1000/cantata-git/src/cantata-git/3rdparty/kcategorizedview/kcategorizedview.cpp:228
#18 0x0000555555adf438 in KCategorizedView::Private::blockPosition (this=0x555556119200, category=...) at /usr/include/qt/QtCore/qhash.h:321

after that it repeats the last 3 lines (to the thousands )

@CDrummond
Copy link
Owner

Thanks for that. However, not sure what to do - as the crash is in Qt code (hasIndex). KCategorizedView is a piece of KDE code that I just copied into Cantata. Guess its being misused somehow :(

@nicman23
Copy link
Author

nicman23 commented Sep 3, 2019

what version of qt libs are your system running? perhaps it is an upstream regression?

@CDrummond
Copy link
Owner

Qt 5.12 (according to synaptic) on Ubuntu 19.04

@nicman23
Copy link
Author

looking more into this, it only happens with sort Ablums options that start with Artists as the first filter. So Album, Artist, Year does not crash but Artist, Album, Year does

@CDrummond
Copy link
Owner

Still no crash for me, sorry.

@nicman23
Copy link
Author

nicman23 commented Oct 23, 2019

errrrrmmm, it also crashes in a 18.04.03 ubuntu vm i spinned up just for testing it.

latest master with compiled with debian folder from upstream

cantata.log.txt

@CDrummond
Copy link
Owner

I've disabled this by default. I have no time to look into this, and I'd like to release 2.4.0 soon.

@nicman23
Copy link
Author

so now that it is enabled by default should this be reopened

@nicman23
Copy link
Author

hey fyi this still crashes

@CDrummond
Copy link
Owner

Not unless you are going to investigate. Does not, and never has, crash for me - but then I nolonger use this.

@ecesar88
Copy link

Hello! I'm also facing the same exact issue.

@CDrummond
Copy link
Owner

@fP4rad0x This view has been disabled for the next release. I no longer actively use Cantata nor MPD (switched to LMS over 4 years ago), so have no time to look into this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants