Bug 494993

Summary: Digikam crashes immediately upon trying to access Configuration panel (under Wayland)
Product: [Applications] digikam Reporter: martinlaird
Component: Portability-RuntimeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles, finnh.spam, krinpaus, metzpinguin
Priority: NOR    
Version: 8.4.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=492191
Latest Commit: Version Fixed In:
Sentry Crash Report: 8.5.0
Attachments: Requested GDB-backtrace
Updated Stacktrace after potential fix
digikam log
Current window size

Description martinlaird 2024-10-18 13:48:17 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY


STEPS TO REPRODUCE
1. Open Digikam in a Wayland Session
2. Open Settings menu -> Configure Digikam
3. Crash

OBSERVED RESULT
Instant gui crash. Active Digikam process still showing in System Monitor. Starting Digikam from terminal gives the following error message.

qt.qpa.wayland: eglSwapBuffers failed with 0x300d, surface: 0x0
wp_linux_drm_syncobj_surface_v1#51: error 4: explicit sync is used, but no acquire point is set
qt.qpa.wayland: eglSwapBuffers failed with 0x3000, surface: 0x6188e138cf40
qt.qpa.wayland: eglSwapBuffers failed with 0x3000, surface: 0x6188e138cf40


EXPECTED RESULT
Access Configuration panel (it works under an X11 session)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: EndeavourOS Kernel 6.11.3-arch1-1 (64-bit)
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.70
Qt Version: 6.8.0

ADDITIONAL INFORMATION
Backtrace via gdb:

Thread 53 (Thread 0x7fff4e0006c0 (LWP 10069) "Thread (pooled)"):
#0  0x00007ffff409fa19 in __futex_abstimed_wait_common64 (private=0, futex_word=0x5555619d0930, expected=0, op=137, abstime=0x7fff4dffed40, cancel=true) at futex-internal.c:57
        sc_cancel_oldtype = 0
        __arg6 = <optimized out>
        __arg3 = <optimized out>
        _a5 = <optimized out>
        _a2 = <optimized out>
        sc_ret = <optimized out>
        __arg4 = <optimized out>
        __arg1 = <optimized out>
        _a6 = <optimized out>
        _a3 = <optimized out>
        resultvar = <optimized out>
        __arg5 = <optimized out>
        __arg2 = <optimized out>
        _a4 = <optimized out>
        _a1 = <optimized out>
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x5555619d0930, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x7fff4dffed40, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
        err = <optimized out>
        clockbit = 0
        op = 137
#2  0x00007ffff409fa9f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x5555619d0930, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x7fff4dffed40, private=private@entry=0) at futex-internal.c:139
No locals.
#3  0x00007ffff40a27e2 in __pthread_cond_wait_common (cond=0x5555619d0908, mutex=<optimized out>, clockid=1, abstime=0x7fff4dffed40) at pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7ffff40a21b0 <__condvar_cleanup_waiting>, __arg = 0x7fff4dffecc0, __canceltype = 1308617984, __prev = 0x0}
        cbuffer = {wseq = 0, cond = 0x5555619d0908, mutex = 0x5555619d08e0, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        maxspin = 0
        signals = <optimized out>
        result = 0
        wseq = 0
        seq = 0
        private = 0
        maxspin = <optimized out>
        err = <optimized out>
        result = <optimized out>
        wseq = <optimized out>
        g = <optimized out>
        seq = <optimized out>
        flags = <optimized out>
        private = <optimized out>
        signals = <optimized out>
        done = <optimized out>
        g1_start = <optimized out>
        spin = <optimized out>
        buffer = <optimized out>
        cbuffer = <optimized out>
        s = <optimized out>
#4  ___pthread_cond_timedwait64 (cond=0x5555619d0908, mutex=<optimized out>, abstime=0x7fff4dffed40) at pthread_cond_wait.c:643
        flags = <optimized out>
        clockid = 1
#5  0x00007ffff48dcfc8 in QWaitConditionPrivate::wait_relative (this=0x5555619d08e0, deadline=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:92
        ti = {tv_sec = 3979, tv_nsec = 750681019}
        ti = <optimized out>
#6  QWaitConditionPrivate::wait (this=0x5555619d08e0, deadline=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:100
        code = <optimized out>
        code = <optimized out>
#7  QWaitCondition::wait (this=this@entry=0x5555619d05f0, mutex=mutex@entry=0x555555c00b58, deadline=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qwaitcondition_unix.cpp:180
        returnValue = <optimized out>
#8  0x00007ffff48de9d5 in QThreadPoolThread::run (this=0x5555619d05e0) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthreadpool.cpp:116
        r = <optimized out>
        locker = {m_mutex = 0x555555c00b58, m_isLocked = true}
#9  0x00007ffff48d840f in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:335
        thr = 0x5555619d05e0
        data = <optimized out>
        arg = <optimized out>
        arg = <optimized out>
        thr = <optimized out>
        data = <optimized out>
        locker = <optimized out>
#10 (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > (t=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:263
No locals.
#11 QThreadPrivate::start (arg=0x5555619d05e0) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:294
        cleanup = {m_func = {__arg = 0x5555619d05e0}, m_invoke = true}
#12 0x00007ffff40a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
        ret = <optimized out>
        pd = <optimized out>
        out = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140734502012608, 2398129314502480885, 140734502012608, -352, 2, 140737488340720, 2398129314548618229, 2397795219846665205}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#13 0x00007ffff412849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
No locals.

Thread 52 (Thread 0x7fff4fe006c0 (LWP 10066) "CPMMListener"):
#0  0x00007ffff411a63d in __GI___poll (fds=0x7fff4fdfee68, nfds=1, timeout=300000) at ../sysdeps/unix/sysv/linux/poll.c:29
        sc_ret = -516
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
#1  0x00007fffb69ff3a7 in ?? () from /usr/lib/libnvidia-eglcore.so.560.35.03
No symbol table info available.
#2  0x00007fffb69fd8fa in ?? () from /usr/lib/libnvidia-eglcore.so.560.35.03
No symbol table info available.
#3  0x00007ffff40a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
        ret = <optimized out>
        pd = <optimized out>
        out = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140734533469888, 2398124641578062837, 140734533469888, -352, 14, 140737488338656, 2398124641624200181, 2397795219846665205}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#4  0x00007ffff412849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
No locals.

Thread 51 (Thread 0x7fff4f4006c0 (LWP 10065) "digikam"):
#0  0x00007ffff409fa19 in __futex_abstimed_wait_common64 (private=0, futex_word=0x555558617df4, expected=0, op=393, abstime=0x0, cancel=true) at futex-internal.c:57
        sc_cancel_oldtype = 0
        __arg6 = <optimized out>
        __arg3 = <optimized out>
        _a5 = <optimized out>
        _a2 = <optimized out>
        sc_ret = <optimized out>
        __arg4 = <optimized out>
        __arg1 = <optimized out>
        _a6 = <optimized out>
        _a3 = <optimized out>
        resultvar = <optimized out>
        __arg5 = <optimized out>
        __arg2 = <optimized out>
        _a4 = <optimized out>
        _a1 = <optimized out>
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x555558617df4, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007ffff409fa9f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x555558617df4, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
No locals.
#3  0x00007ffff40a2479 in __pthread_cond_wait_common (cond=0x555558617dc8, mutex=<optimized out>, clockid=0, abstime=0x0) at pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7ffff40a21b0 <__condvar_cleanup_waiting>, __arg = 0x7fff4f3fed20, __canceltype = 0, __prev = 0x0}
        cbuffer = {wseq = 371, cond = 0x555558617dc8, mutex = 0x5555557dc2e0, private = 0}
        err = <optimized out>
        g = 1
        flags = <optimized out>
        g1_start = <optimized out>
        maxspin = 0
        signals = <optimized out>
        result = 0
        wseq = 371
        seq = 185
        private = 0
        maxspin = <optimized out>
        err = <optimized out>
        result = <optimized out>
        wseq = <optimized out>
        g = <optimized out>
        seq = <optimized out>
        flags = <optimized out>
        private = <optimized out>
        signals = <optimized out>
        done = <optimized out>
        g1_start = <optimized out>
        spin = <optimized out>
        buffer = <optimized out>
        cbuffer = <optimized out>
        s = <optimized out>
#4  ___pthread_cond_wait (cond=0x555558617dc8, mutex=<optimized out>) at pthread_cond_wait.c:618
No locals.
#5  0x00007fffbccbbf38 in ?? () from /usr/lib/libEGL_nvidia.so.0
No symbol table info available.
#6  0x00007fffbcc8aef1 in ?? () from /usr/lib/libEGL_nvidia.so.0
No symbol table info available.
#7  0x00007fffbccc1fce in ?? () from /usr/lib/libEGL_nvidia.so.0
No symbol table info available.
#8  0x00007ffff40a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
        ret = <optimized out>
        pd = <optimized out>
        out = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140734522984128, 2398123267188528117, 140734522984128, -352, 14, 140737488340688, 2398123267234665461, 2397795219846665205}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#9  0x00007ffff412849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
No locals.

Thread 42 (Thread 0x7fff712006c0 (LWP 10050) "ThreadPoolSingl"):
#0  0x00007ffff409fa19 in __futex_abstimed_wait_common64 (private=0, futex_word=0x7fff711feb18, expected=0, op=393, abstime=0x0, cancel=true) at futex-internal.c:57
        sc_cancel_oldtype = 0
        __arg6 = <optimized out>
        __arg3 = <optimized out>
        _a5 = <optimized out>
        _a2 = <optimized out>
        sc_ret = <optimized out>
        __arg4 = <optimized out>
        __arg1 = <optimized out>
        _a6 = <optimized out>
        _a3 = <optimized out>
        resultvar = <optimized out>
        __arg5 = <optimized out>
        __arg2 = <optimized out>
        _a4 = <optimized out>
        _a1 = <optimized out>
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fff711feb18, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007ffff409fa9f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fff711feb18, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
No locals.
#3  0x00007ffff40a2479 in __pthread_cond_wait_common (cond=0x7fff711feaf0, mutex=<optimized out>, clockid=0, abstime=0x0) at pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7ffff40a21b0 <__condvar_cleanup_waiting>, __arg = 0x7fff711fe980, __canceltype = 1897916848, __prev = 0x0}
        cbuffer = {wseq = 0, cond = 0x7fff711feaf0, mutex = 0x7fff711feac8, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        maxspin = 0
        signals = <optimized out>
        result = 0
        wseq = 0
        seq = 0
        private = 0
        maxspin = <optimized out>
        err = <optimized out>
        result = <optimized out>
        wseq = <optimized out>
        g = <optimized out>
        seq = <optimized out>
        flags = <optimized out>
        private = <optimized out>
        signals = <optimized out>
        done = <optimized out>
        g1_start = <optimized out>
        spin = <optimized out>
        buffer = <optimized out>
        cbuffer = <optimized out>
        s = <optimized out>
#4  ___pthread_cond_wait (cond=0x7fff711feaf0, mutex=<optimized out>) at pthread_cond_wait.c:618
No locals.
#5  0x00007fffede889ae in base::ConditionVariable::Wait () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/synchronization/condition_variable_posix.cc:105
No locals.
#6  0x00007fffedeb6b48 in base::WaitableEvent::TimedWaitImpl () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/synchronization/waitable_event_posix.cc:193
No locals.
#7  0x00007fffede35d4b in base::WaitableEvent::TimedWait () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/synchronization/waitable_event.cc:39
No locals.
#8  0x00007fffede6b0c6 in base::internal::WorkerThread::RunWorker () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/task/thread_pool/worker_thread.cc:400
No locals.
#9  0x00007fffede6ba1d in base::internal::WorkerThread::RunSharedWorker () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/task/thread_pool/worker_thread.cc:325
No locals.
#10 0x00007fffede6bbd0 in base::internal::WorkerThread::ThreadMain () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/task/thread_pool/worker_thread.cc:298
No locals.
#11 0x00007fffede88d5f in ThreadFunc () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/threading/platform_thread_posix.cc:103
No locals.
#12 0x00007ffff40a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
        ret = <optimized out>
        pd = <optimized out>
        out = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140735091312320, 2398065817705976821, 140735091312320, -352, 2, 140735317794928, 2398065817752114165, 2397795219846665205}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#13 0x00007ffff412849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
No locals.

Thread 41 (Thread 0x7fff72a006c0 (LWP 10049) "VizCompositorTh"):
#0  0x00007ffff409fa19 in __futex_abstimed_wait_common64 (private=0, futex_word=0x7fff729fea08, expected=0, op=393, abstime=0x0, cancel=true) at futex-internal.c:57
        sc_cancel_oldtype = 0
        __arg6 = <optimized out>
        __arg3 = <optimized out>
        _a5 = <optimized out>
        _a2 = <optimized out>
        sc_ret = <optimized out>
        __arg4 = <optimized out>
        __arg1 = <optimized out>
        _a6 = <optimized out>
        _a3 = <optimized out>
        resultvar = <optimized out>
        __arg5 = <optimized out>
        __arg2 = <optimized out>
        _a4 = <optimized out>
        _a1 = <optimized out>
#1  __futex_abstimed_wait_common (futex_word=futex_word@entry=0x7fff729fea08, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0, cancel=cancel@entry=true) at futex-internal.c:87
        err = <optimized out>
        clockbit = 256
        op = 393
#2  0x00007ffff409fa9f in __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fff729fea08, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at futex-internal.c:139
No locals.
#3  0x00007ffff40a2479 in __pthread_cond_wait_common (cond=0x7fff729fe9e0, mutex=<optimized out>, clockid=0, abstime=0x0) at pthread_cond_wait.c:503
        spin = 0
        buffer = {__routine = 0x7ffff40a21b0 <__condvar_cleanup_waiting>, __arg = 0x7fff729fe870, __canceltype = 0, __prev = 0x0}
        cbuffer = {wseq = 0, cond = 0x7fff729fe9e0, mutex = 0x7fff729fe9b8, private = 0}
        err = <optimized out>
        g = 0
        flags = <optimized out>
        g1_start = <optimized out>
        maxspin = 0
        signals = <optimized out>
        result = 0
        wseq = 0
        seq = 0
        private = 0
        maxspin = <optimized out>
        err = <optimized out>
        result = <optimized out>
        wseq = <optimized out>
        g = <optimized out>
        seq = <optimized out>
        flags = <optimized out>
        private = <optimized out>
        signals = <optimized out>
        done = <optimized out>
        g1_start = <optimized out>
        spin = <optimized out>
        buffer = <optimized out>
        cbuffer = <optimized out>
        s = <optimized out>
#4  ___pthread_cond_wait (cond=0x7fff729fe9e0, mutex=<optimized out>) at pthread_cond_wait.c:618
No locals.
#5  0x00007fffede889ae in base::ConditionVariable::Wait () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/synchronization/condition_variable_posix.cc:105
No locals.
#6  0x00007fffedeb6b48 in base::WaitableEvent::TimedWaitImpl () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/synchronization/waitable_event_posix.cc:193
No locals.
#7  0x00007fffede35d4b in base::WaitableEvent::TimedWait () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/synchronization/waitable_event.cc:39
No locals.
#8  0x00007fffeddeaa8d in base::MessagePumpDefault::Run () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/message_loop/message_pump_default.cc:56
No locals.
#9  0x00007fffede51e4d in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:646
No locals.
#10 0x00007fffede14320 in base::RunLoop::Run () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/run_loop.cc:134
No locals.
#11 base::RunLoop::Run () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/run_loop.cc:106
No locals.
#12 0x00007fffede7525c in base::Thread::Run () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/threading/thread.cc:337
No locals.
#13 base::Thread::ThreadMain () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/threading/thread.cc:409
No locals.
#14 0x00007fffede88d5f in ThreadFunc () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/threading/platform_thread_posix.cc:103
No locals.
#15 0x00007ffff40a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
        ret = <optimized out>
        pd = <optimized out>
        out = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140735116478144, 2398064718194349045, 140735116478144, -352, 2, 140735317796208, 2398064718240486389, 2397795219846665205}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
#16 0x00007ffff412849c in __GI___clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
No locals.

Thread 40 (Thread 0x7fff734006c0 (LWP 10047) "ThreadPoolSingl"):
Quit
Comment 1 caulier.gilles 2024-10-18 14:29:26 UTC
Maik,

In the backtrace we can see :

#4  ___pthread_cond_wait (cond=0x7fff729fe9e0, mutex=<optimized out>) at pthread_cond_wait.c:618
No locals.
#5  0x00007fffede889ae in base::ConditionVariable::Wait () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/synchronization/condition_variable_posix.cc:105
No locals.
#6  0x00007fffedeb6b48 in base::WaitableEvent::TimedWaitImpl () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/synchronization/waitable_event_posix.cc:193
No locals.
#7  0x00007fffede35d4b in base::WaitableEvent::TimedWait () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/synchronization/waitable_event.cc:39
No locals.
#8  0x00007fffeddeaa8d in base::MessagePumpDefault::Run () at ./../../../../../qtwebengine/src/3rdparty/chromium/base/message_loop/message_pump_default.cc:56

Sounds like a QtWebEngine crash. Right ?

Gilles
Comment 2 Maik Qualmann 2024-10-18 18:50:36 UTC
Hi Gilles,

the question is whether it actually crashes in QWebEngine, the backtrace looks strange. I also see NVidia in the backtrace. I didn't know that QWebEngine was used in the setup dialog. We already have a bug report in connection with the setup dialog under Wayland (flickering problems). But there's nothing special about the setup dialog. I can't reproduce the crash here under Wayland and openSUSE either.

Maik
Comment 3 caulier.gilles 2024-10-18 20:07:53 UTC
No there is no webengine in the setup dialog, but perhaps the crash appears when the dialog must be show on the screen and the webengine trace is just a side effect.

A real GDB backtrace will help here...

Gilles
Comment 4 martinlaird 2024-10-18 20:19:56 UTC
It's my first time using gdb or submitting a bug report like this. I followed the guide at https://wiki.archlinux.org/title/Debugging/Getting_traces#Getting_the_trace. Unsure what I might have missed but happy to try again if there's anything else I can do. Appreciate you guys looking into this so quickly.

Up until this week Wayland has been too unstable for me to use, but as of now this is the only issue I'm having with it.
Comment 5 Maik Qualmann 2024-10-19 18:22:59 UTC
Git commit 05d03762a74032b42cb11c587c3ec14fa87d066b by Maik Qualmann.
Committed on 19/10/2024 at 18:22.
Pushed by mqualmann into branch 'master'.

try an additional check on wayland

M  +1    -1    core/libs/dimg/filters/icc/iccsettings_p_desktop.cpp

https://invent.kde.org/graphics/digikam/-/commit/05d03762a74032b42cb11c587c3ec14fa87d066b
Comment 6 Finn 2024-10-29 19:23:16 UTC
Just cloned the repo and created a local build from dev. The error still persist: 
```
wp_linux_drm_syncobj_surface_v1#69: error 4: explicit sync is used, but no acquire point is set
qt.qpa.wayland: eglSwapBuffers failed with 0x3000, surface: 0x59d8065b89a0
qt.qpa.wayland: eglSwapBuffers failed with 0x3000, surface: 0x59d8065b89a0
```
My system has the following specs: 
Operating System: EndeavourOS 
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 31,3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3070/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
System Version: 6.0
Comment 7 Maik Qualmann 2024-10-29 19:34:51 UTC
I see a bug report for KInfocenter with the same error message, probably a Qt or driver problem. Can you please create a GDB backtrace.

Maik
Comment 8 Finn 2024-10-29 19:48:18 UTC
I tried the following steps: 
1. gdb digikam
2. (gdb) run
3. reproduce the bug. 

But I did not get any additional output to the one I posted before. If you need more debug logs or something like that, I would be glad if you could provide some instructions.
Comment 9 Maik Qualmann 2024-10-29 19:53:05 UTC
After the crash you have to type "bt" + enter to output the backtrace.

Maik
Comment 10 Finn 2024-10-29 21:05:59 UTC
Created attachment 175345 [details]
Requested GDB-backtrace
Comment 11 Maik Qualmann 2024-10-29 21:23:10 UTC
It crashes really deep inside Qt, in the QtWaylandClient. I'm just wondering why in the setup dialog. We change the Windows flags, I'll undo this change for testing purposes.

Maik
Comment 12 Maik Qualmann 2024-10-29 21:31:44 UTC
Git commit 5dc2c7f78cbd99d9af506f3c96a0f61d7d0954c5 by Maik Qualmann.
Committed on 29/10/2024 at 21:31.
Pushed by mqualmann into branch 'master'.

do not change the window flags from the setup dialog

M  +2    -1    core/utilities/setup/setup.cpp

https://invent.kde.org/graphics/digikam/-/commit/5dc2c7f78cbd99d9af506f3c96a0f61d7d0954c5
Comment 13 Maik Qualmann 2024-10-29 21:33:23 UTC
Please recompile the current git/master version to test it.

Maik
Comment 14 Finn 2024-10-29 22:07:47 UTC
Created attachment 175346 [details]
Updated Stacktrace after potential fix

Hi, 
thanks for the quick response. I made a clean build and the bug still occurs. 

Best, 
Finn
Comment 15 Maik Qualmann 2024-10-30 07:21:04 UTC
I don't think we can fix it, ultimately it crashes in libEGL_nvidia.so.0 ==> libdrm-2.4.123/xf86drm.

Maik
Comment 16 caulier.gilles 2024-10-30 07:26:37 UTC
I agree with Maik. This crash is located in Nvidia libraries. You must report this dysfunction to your distro packager with all details to reproduce.
Comment 17 Maik Qualmann 2024-10-30 07:38:02 UTC
Git commit 30e93f6ecf3ccd6bcf70317a0c279af0b405f161 by Maik Qualmann.
Committed on 30/10/2024 at 07:37.
Pushed by mqualmann into branch 'master'.

first check the platform name on Wayland

M  +1    -1    core/libs/dimg/filters/icc/iccsettings_p_desktop.cpp
M  +1    -2    core/utilities/setup/setup.cpp

https://invent.kde.org/graphics/digikam/-/commit/30e93f6ecf3ccd6bcf70317a0c279af0b405f161
Comment 18 Maik Qualmann 2024-10-30 07:40:44 UTC
If you enable Qt debug with:

export QT_LOGGING_RULES="digikam*=true"

Do you see these messages when you run the setup?  ==> Desktop platform is not X11

Maik
Comment 19 Finn 2024-10-30 08:17:48 UTC
Created attachment 175357 [details]
digikam log
Comment 20 Finn 2024-10-30 08:25:06 UTC
Hi, 

I added a log file. But to me it looks like the message `Desktop platform is not X11` is logged where you expect it. In the meantime, I have also checked if the error occurs in older versions (8.3 and 8.4), because I am sure that I was able to run it on my hardware in 8.3, but now the error occurs in this older version as well. I also checked if the error occurs on my laptop running the same distribution. Here the error does not occur, even though the machine is also using the wayland protocol on qt6.8.0, reinforcing the assumption that this error is related to my NVIDIA GPU being used in a wayland session. 
I will now try to find the root cause and keep you updated on my findings. 

Thanks for your help so far. 

Finn
Comment 21 martinlaird 2024-11-01 00:15:59 UTC
(In reply to caulier.gilles from comment #16)
> I agree with Maik. This crash is located in Nvidia libraries. You must
> report this dysfunction to your distro packager with all details to
> reproduce.

Ok I've opened a topic at the EndeavourOS forum. I imagine this needs to be reported to the Arch packager really but I'll try EndeavourOS first as past experience suggests it will take a regular Arch user to report it before they will look at it. 

Thank you both for investigating this.

https://forum.endeavouros.com/t/nvidia-wayland-bug-libegl-nvidia-so-0-libdrm-2-4-123-xf86drm/62482
Comment 22 Finn 2024-11-01 22:08:23 UTC
This bug seems to be a duplicate of 492191. The suggested fix (using the current app image) does not work for me as it does not launch. The dev branch build still does not fix the bug. Maybe other people that experience the bug can share what there experience with the app image was.
Comment 23 Finn 2024-11-01 23:57:08 UTC
Hi,
just want to share my findings.
Other pop-ups that lead to a crash are:
- Tools->Maintenance
- Help -> OnlineHandbook 
Other pop-ups that do not lead to a crash are:
- Other settings (change language. keyboard shortcuts, toolbars, notifications, database migration)
- All other menus in tools 
- tag manager 

I have not looked for similarities among these components
Comment 24 Finn 2024-11-02 00:27:08 UTC
Hi there, 
Sorry for the spam, but I was able to narrow it down a bit. 
Both `Setup::Setup(QWidget* const parent)` and `void MaintenanceDlg::readSettings()` (called by `MaintenanceDlg::MaintenanceDlg(QWidget* const parent)`) 
contains the following lines: 
```C++
winId();
DXmlGuiWindow::setGoodDefaultWindowSize(windowHandle());
DXmlGuiWindow::restoreWindowSize(windowHandle(), group);
resize(windowHandle()->size());
```
When I comment these lines out of the code, both dialogs (maintenance and configure digikam) are displayed without errors. 

As I have never worked with Qt nor am I a native C++ programmer, I do not know what this means. Nor do I know how to proceed with this bug / who to contact for further investigation. 

Best, 
Finn
Comment 25 Maik Qualmann 2024-11-02 09:38:20 UTC
OK, thanks, that's interesting. The code is actually valid and is used with WinId() in other KDE programs. The WinId() function forces a window handler to be created in the constructor. Depending on the driver, this may cause problems under Wayland. But we can change that.

Maik
Comment 26 Finn 2024-11-02 10:18:13 UTC
That sounds good. 
One more input from my side is that the code is also present in `TagsManager* TagsManager::instance()` and executed without any problems. Which seems kind of weird.

If I can test anything or help in any other way, please let me know. Otherwise, I've reached the end of my abilities and don't know how I can help on my own. 

Best, 
Finn
Comment 27 Maik Qualmann 2024-11-02 17:14:22 UTC
Git commit 0cd12b2b9d0b8354a44467e9da13104bc4085df4 by Maik Qualmann.
Committed on 02/11/2024 at 17:12.
Pushed by mqualmann into branch 'master'.

trying to fix crashes with dialogs under Wayland
Related: bug 468980

M  +40   -0    core/libs/dialogs/dconfigdlg.cpp
M  +10   -0    core/libs/dialogs/dconfigdlg.h
M  +13   -9    core/libs/dialogs/webbrowserdlg.cpp
M  +1    -0    core/libs/dialogs/webbrowserdlg.h
M  +1    -7    core/showfoto/setup/showfotosetup.cpp
M  +12   -0    core/utilities/maintenance/main/maintenancedlg.cpp
M  +4    -0    core/utilities/maintenance/main/maintenancedlg.h
M  +0    -5    core/utilities/maintenance/main/maintenancedlg_settings.cpp
M  +1    -10   core/utilities/setup/setup.cpp

https://invent.kde.org/graphics/digikam/-/commit/0cd12b2b9d0b8354a44467e9da13104bc4085df4
Comment 28 Maik Qualmann 2024-11-02 17:38:28 UTC
Git commit 2ceffbea84bcb2d6efc7309285d1b3b450fa227f by Maik Qualmann.
Committed on 02/11/2024 at 17:37.
Pushed by mqualmann into branch 'master'.

port more possible dialogs
Related: bug 468980

M  +13   -8    core/libs/album/widgets/albumselectdialog.cpp
M  +4    -0    core/libs/album/widgets/albumselectdialog.h
M  +2    -2    core/libs/dialogs/dconfigdlg.cpp
M  +13   -8    core/libs/dialogs/deletedialog.cpp
M  +2    -1    core/libs/dialogs/deletedialog.h
M  +4    -4    core/libs/dialogs/webbrowserdlg.cpp
M  +6    -10   core/libs/dplugins/widgets/dplugindialog.cpp
M  +2    -5    core/libs/dplugins/widgets/dplugindialog.h
M  +2    -2    core/utilities/maintenance/main/maintenancedlg.cpp

https://invent.kde.org/graphics/digikam/-/commit/2ceffbea84bcb2d6efc7309285d1b3b450fa227f
Comment 29 Maik Qualmann 2024-11-02 18:37:03 UTC
Git commit 39ebada65b3d1e2f9f966b216c87c8d6895c3422 by Maik Qualmann.
Committed on 02/11/2024 at 18:36.
Pushed by mqualmann into branch 'master'.

port all possible dialogs
Related: bug 468980

M  +11   -5    core/dplugins/generic/tools/expoblending/blendingdlg/expoblendingdlg.cpp
M  +4    -0    core/dplugins/generic/tools/expoblending/blendingdlg/expoblendingdlg.h
M  +0    -1    core/libs/dialogs/dconfigdlg.cpp
M  +0    -1    core/libs/dialogs/deletedialog.cpp
M  +11   -27   core/libs/dplugins/widgets/dwizarddlg.cpp
M  +4    -0    core/libs/dplugins/widgets/dwizarddlg.h
M  +13   -8    core/libs/tags/manager/tagsmanager.cpp
M  +12   -4    core/libs/timeadjust/clockphotodialog.cpp
M  +4    -0    core/libs/timeadjust/clockphotodialog.h
M  +16   -11   core/showfoto/stackview/showfotostackviewfavoriteitemdlg.cpp
M  +4    -0    core/showfoto/stackview/showfotostackviewfavoriteitemdlg.h
M  +12   -5    core/utilities/geolocation/geoiface/bookmark/bookmarksdlg.cpp
M  +1    -0    core/utilities/geolocation/geoiface/bookmark/bookmarksdlg.h
M  +14   -7    core/utilities/import/dialogs/capturedlg.cpp
M  +1    -0    core/utilities/import/dialogs/capturedlg.h

https://invent.kde.org/graphics/digikam/-/commit/39ebada65b3d1e2f9f966b216c87c8d6895c3422
Comment 30 Finn 2024-11-02 19:34:44 UTC
Hi, 
thanks for the quick fix. 
I built it locally and so far I did not experience any crashes. The only notable difference is that the window size now does not seem to be optimal though this is a small nitpick. Nonetheless I will attach a Screenshot to show what I mean. 

Once again thank you for the quick fix. 
Best, 
Finn
Comment 31 Finn 2024-11-02 19:36:18 UTC
Created attachment 175476 [details]
Current window size
Comment 32 Maik Qualmann 2024-11-02 19:46:56 UTC
I assume it was saved that small, if you enlarge it, what will it look like the next time you open it?

Maik
Comment 33 Maik Qualmann 2024-11-02 19:52:33 UTC
A quick test here under a Wayland session shows no difference to X11. The calculation of a good window size only works until the user has changed the size himself, then the user size is always restored.

Maik
Comment 34 Finn 2024-11-02 20:03:59 UTC
Ups thats on me. Forgot to issue `make install/fast` therefore I was using my locally patched version. Sorry for. That now I can surely confirm that it works. 

Sorry for that. 
Finn
Comment 35 Maik Qualmann 2024-11-02 20:18:00 UTC
Great, thanks for your effort and feedback, I close the bug now.

Maik