owncloud / client

🖥️ Desktop Syncing Client for ownCloud
GNU General Public License v2.0
1.4k stars 664 forks source link

client sometime crashes in OCC::AccountSettings::addModalLegacyDialog at `src/gui/accountsettings.cpp:559` #11673

Closed saw-jan closed 1 month ago

saw-jan commented 5 months ago

Pre-submission Checks

Describe the bug

Desktop client sometimes can crash in OCC::AccountSettings::addModalLegacyDialog at /drone/src/src/gui/accountsettings.cpp:559

Crashed in:

###########################################
Scenario: simple sharing of a file by public link with default expiration date
-------------------------------------------
Executable: /drone/src/build/bin/owncloud
Timestamp: 2024-06-04 05:42:03
Process ID: 4715
Signal Number: 6
-------------------------------------------
<<<<< STACKTRACE START >>>>>
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/drone/src/build/bin/owncloud -s --logfile - --logdebug --logflush'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f82d0f42834 in __pthread_kill_implementation () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7f82cd32e940 (LWP 4715))]
#0  0x00007f82d0f42834 in __pthread_kill_implementation () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007f82d0ef08ee in raise () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007f82d0ed898f in abort () from /lib64/libc.so.6
No symbol table info available.
#3  0x00007f82d14aea4a in qAbort() () from /ownbuild/master/linux-gcc-x86_64-squish/lib/libQt6Core.so.6
No symbol table info available.
#4  0x00007f82d14e3a05 in ?? () from /ownbuild/master/linux-gcc-x86_64-squish/lib/libQt6Core.so.6
No symbol table info available.
#5  0x00007f82d14af6d8 in QMessageLogger::fatal(char const*, ...) const () from /ownbuild/master/linux-gcc-x86_64-squish/lib/libQt6Core.so.6
No symbol table info available.
#6  0x00007f82d14ae9c7 in qt_assert(char const*, char const*, int) () from /ownbuild/master/linux-gcc-x86_64-squish/lib/libQt6Core.so.6
No symbol table info available.
#7  0x00007f82d434c411 in OCC::AccountSettings::addModalLegacyDialog (this=0x1549820, widget=0x5441500, sizePolicy=OCC::AccountSettings::ModalWidgetSizePolicy::Expanding) at /drone/src/src/gui/accountsettings.cpp:559
        outerWidget = 0x546a470
        groupBox = 0x5459350
#8  0x00007f82d43bffbf in OCC::ownCloudGui::slotShowShareDialog (this=0x1218cf0, sharePath=..., localPath=..., startPage=OCC::ShareDialogStartPage::UsersAndGroups) at /drone/src/src/gui/owncloudgui.cpp:1078

Logs

clientlog.log stacktrace.log

Client version number

git master

erikjv commented 3 months ago

@TheOneRing So code allows for multiple sharing dialogs, but only one dialog per path. With the current UI all being in 1 window, I would like to change this to only allow for 1 "dialog", and remove any already open "dialogs". That way we only have to keep track of 1 widget: when the slot is triggered, check if there is an open "dialog", and if so, delete it. Then display the one for the latest request.

TheOneRing commented 3 months ago

Hmm as a modal dialog the behavior should probably be to raise the current modal window. Closing a dialog with unfinished actions could cause other issues. So I suggest raising the old window without creating a new page in the dialog.

erikjv commented 2 months ago

@saw-jan when this happens again, please attach a new log file

saw-jan commented 1 month ago

Similar crash: https://drone.owncloud.com/owncloud/client/19287/2/16 stacktrace.log clientlog.log Screenshot from 2024-09-09 10-11-08

erikjv commented 1 month ago

Ok, that shows that there was a previously raised dialog for the share, which is now being re-used. And at that point the delete-on-close attribute is gone, triggering the assert. @TheOneRing : we have to discuss what we do with this. I'm not a fan of that caching/re-use of dialogs.

erikjv commented 1 month ago

Show only 1 share "dialog", and don't cache others.