Bug 441525 - playlist crashes in FileBrowserProxyModel::recursiveEnqueue() Elisa if opened in Files window
Summary: playlist crashes in FileBrowserProxyModel::recursiveEnqueue() Elisa if opened...
Status: RESOLVED FIXED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
: 484665 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-08-25 10:39 UTC by empyreal
Modified: 2024-06-08 13:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.05.1
Sentry Crash Report:


Attachments
Notice how playlist looks in Playlist (212.11 KB, image/png)
2021-08-25 10:39 UTC, empyreal
Details
can't generate (55.53 KB, image/png)
2021-08-25 16:58 UTC, empyreal
Details
elisa gdb log (4.66 KB, text/plain)
2021-08-25 17:29 UTC, empyreal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description empyreal 2021-08-25 10:39:15 UTC
Created attachment 141032 [details]
Notice how playlist looks in Playlist

Elisa Version 21.11.70 --branch light

$ elisa
qrc:/qml/ElisaMainWindow.qml:19:1: QML ElisaMainWindow: Accessible must be attached to an Item
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/Page.qml:355: Error: Cannot assign QObject* to PageRow_QMLTYPE_223*
file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/Page.qml:355: Error: Cannot assign QObject* to PageRow_QMLTYPE_223*
org.kde.elisa.indexers.manager: Local file system indexer is inactive
org.kde.elisa.indexers.manager: Baloo indexer is unavailable
org.kde.elisa.indexers.manager: Baloo indexer is inactive
org.kde.elisa.baloo: Baloo indexer has been configured to be deactivated. Disabling Elisa support for using Baloo indexer.
org.kde.elisa.indexers.manager: Local file system indexer is active
org.kde.elisa.indexers.manager: MusicListenersManager::startAndroidIndexing
org.kde.elisa.indexers.manager: trigger init of local file indexer
qrc:/qml/ContextView.qml:160:30: QML Image: Failed to get image from provider: image://icon/error
qrc:/qml/ImageWithFallback.qml:36:5: QML Image: Failed to get image from provider: image://icon/error
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool
qrc:/qml/ImageWithFallback.qml:36:5: QML Image: Failed to get image from provider: image://icon/error
qrc:/qml/MediaPlayListView.qml:296:33: Unable to assign [undefined] to bool

/////////////////////////////////////AND PLAYLIST OPENS!!!

"Could not convert argument 0 at"
         "onEnqueue@qrc:/qml/DataGridView.qml:84"
         "onEnqueue@qrc:/qml/GridBrowserView.qml:149"
         "onClicked@qrc:/qml/GridBrowserDelegate.qml:134"
"Passing incompatible arguments to C++ functions from JavaScript is dangerous and deprecated."
"This will throw a JavaScript TypeError in future releases of Qt!"
kf.kio.core: Invalid URL: QUrl("")
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = elisa path = /usr/bin pid = 42635
KCrash: Arguments: /usr/bin/elisa 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi
pa_write() failed while trying to wake up the mainloop: Bad file descriptor
pa_write() failed while trying to wake up the mainloop: Bad file descriptor
pa_write() failed while trying to wake up the mainloop: Bad file descriptor
Invalid write to eventfd: Bad file descriptor
Code should not be reached at pulsecore/fdsem.c:199, function pa_fdsem_post(). Aborting.
Unable to start Dr. Konqi
Re-raising signal for core dump handling.
Aborted (core dumped)

Choose playlist in Files window and get crash.

Folder Music contains one folder and two playlists. Opens only folder.
Comment 1 Nate Graham 2021-08-25 16:43:10 UTC
Please attach a backtrace of the crash.
Comment 2 empyreal 2021-08-25 16:58:41 UTC
Created attachment 141043 [details]
can't generate

Executable: elisa PID: 88341 Signal: Segmentation fault (11) Time: 25.08.21 19:55:06 EEST

$ org.kde.drkonqi: The specified process does not exist.
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
Comment 3 Nate Graham 2021-08-25 17:06:39 UTC
If DrKonqi can't do it, you'll need to do it manually using gdb. See the instructions at https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_with_GDB.
Comment 4 empyreal 2021-08-25 17:23:06 UTC
"Could not convert argument 0 at"
         "onReplaceAndPlay@qrc:/qml/DataGridView.qml:88"
         "onReplaceAndPlay@qrc:/qml/GridBrowserView.qml:150"
         "onClicked@qrc:/qml/GridBrowserDelegate.qml:266"
"Passing incompatible arguments to C++ functions from JavaScript is dangerous and deprecated."
"This will throw a JavaScript TypeError in future releases of Qt!"
kf.kio.core: Invalid URL: QUrl("")

Thread 1 "elisa" received signal SIGSEGV, Segmentation fault.
0x00007ffff66d36e4 in QUrl::isValid() const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
Comment 5 Nate Graham 2021-08-25 17:25:15 UTC
Please get a backtrace, and stop changing the status back to REPORTED until you've gotten a backtrace.

If you are saying that you've gotten the backtrace and gone even further and identified the piece of code causing the problem, then go ahead and submit a merge request to fix it. :)
Comment 6 empyreal 2021-08-25 17:29:59 UTC
Created attachment 141045 [details]
elisa gdb log

Just patience =)
Comment 7 Nate Graham 2021-08-26 14:53:47 UTC
Thanks. :) Pasting the relevant part inline:

0x00007ffff66d36e4 in QUrl::isValid() const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#0  0x00007ffff66d36e4 in QUrl::isValid() const () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x00007ffff5c672d7 in  () at /lib/x86_64-linux-gnu/libKF5KIOCore.so.5
#2  0x00007ffff5c600f5 in KIO::ListJob::ListJob(KIO::ListJobPrivate&) () at /lib/x86_64-linux-gnu/libKF5KIOCore.so.5
#3  0x00007ffff5c61c05 in  () at /lib/x86_64-linux-gnu/libKF5KIOCore.so.5
#4  0x00007ffff5c6051d in KIO::listRecursive(QUrl const&, QFlags<KIO::JobFlag>, bool) ()
    at /lib/x86_64-linux-gnu/libKF5KIOCore.so.5
#5  0x00007ffff7efd9f1 in FileBrowserProxyModel::recursiveEnqueue() () at /usr/lib/x86_64-linux-gnu/elisa/libelisaLib.so.0
#6  0x00007ffff7efcb7d in FileBrowserProxyModel::listRecursiveResult(KJob*) ()
    at /usr/lib/x86_64-linux-gnu/elisa/libelisaLib.so.0
#7  0x00007ffff7f03ed3 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<KJob*>, void, void (FileBrowserProxyModel::*)(KJob*)>::call(void (FileBrowserProxyModel::*)(KJob*), FileBrowserProxyModel*, void**) ()
    at /usr/lib/x86_64-linux-gnu/elisa/libelisaLib.so.0
#8  0x00007ffff7f03627 in void QtPrivate::FunctionPointer<void (FileBrowserProxyModel::*)(KJob*)>::call<QtPrivate::List<KJob*>, void>(void (FileBrowserProxyModel::*)(KJob*), FileBrowserProxyModel*, void**) ()
    at /usr/lib/x86_64-linux-gnu/elisa/libelisaLib.so.0
#9  0x00007ffff7f029ff in QtPrivate::QSlotObject<void (FileBrowserProxyModel::*)(KJob*), QtPrivate::List<KJob*>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) () at /usr/lib/x86_64-linux-gnu/elisa/libelisaLib.so.0
#10 0x00007ffff67c75c7 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff75bdfa0 in KJob::result(KJob*, KJob::QPrivateSignal) () at /lib/x86_64-linux-gnu/libKF5CoreAddons.so.5
#12 0x00007ffff75bed1b in KJob::finishJob(bool) () at /lib/x86_64-linux-gnu/libKF5CoreAddons.so.5
Comment 8 Jack Hill 2024-05-17 12:27:56 UTC
*** Bug 484665 has been marked as a duplicate of this bug. ***
Comment 9 Jack Hill 2024-06-07 20:05:08 UTC
Git commit 87ef42ed7864582c7c9899def66ab56d656aa8a3 by Jack Hill.
Committed on 07/06/2024 at 19:58.
Pushed by jackh into branch 'master'.

Fix potential crash when enqueueing from empty files view

If the current folder is empty, then mPendingEntries will be empty. Calling
front on an empty queue is undefined behaviour, and can result in a crash.

Test-plan: added an autotest
Related: bug 484972

M  +11   -0    autotests/CMakeLists.txt
A  +86   -0    autotests/filebrowserproxymodeltest.cpp     [License: LGPL(v3.0+)]
M  +6    -7    src/models/filebrowserproxymodel.cpp

https://invent.kde.org/multimedia/elisa/-/commit/87ef42ed7864582c7c9899def66ab56d656aa8a3
Comment 10 Jack Hill 2024-06-08 13:25:17 UTC
Git commit 246178d77c77f89a430829e5113ffd20805acb54 by Jack Hill.
Committed on 08/06/2024 at 11:10.
Pushed by ngraham into branch 'release/24.05'.

Fix potential crash when enqueueing from empty files view

If the current folder is empty, then mPendingEntries will be empty. Calling
front on an empty queue is undefined behaviour, and can result in a crash.

Test-plan: added an autotest
Related: bug 484972
(cherry picked from commit 87ef42ed7864582c7c9899def66ab56d656aa8a3)

M  +11   -0    autotests/CMakeLists.txt
A  +86   -0    autotests/filebrowserproxymodeltest.cpp     [License: LGPL(v3.0+)]
M  +6    -7    src/models/filebrowserproxymodel.cpp

https://invent.kde.org/multimedia/elisa/-/commit/246178d77c77f89a430829e5113ffd20805acb54