Bug 494065 - Coredump on exiting gwenview annotate-tool
Summary: Coredump on exiting gwenview annotate-tool
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 24.08.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-03 20:21 UTC by Michael Hamilton
Modified: 2025-03-26 19:56 UTC (History)
2 users (show)

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


Attachments
coredumpctl/gdb log with a backtrace, (22.17 KB, text/x-log)
2024-10-03 20:21 UTC, Michael Hamilton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Hamilton 2024-10-03 20:21:19 UTC
Created attachment 174381 [details]
coredumpctl/gdb log with a backtrace,

SUMMARY

On exiting the gwenview annotate tool, gwenview core-dumps.  Happens every time.

STEPS TO REPRODUCE
1. Open a jpeg (doesn't appear to matter what file I try)
2. Choose to Annotate
3. Annotate with a line or arrow (don't think it matters what you do)
4. Press OK in the Annotate window

OBSERVED RESULT

Gwenview disappears and coredumpctl lists a new coredump

EXPECTED RESULT

Annotate window closes and gwenview shows the annotated result.


SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20241002
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.10.7-1-default (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1650 SUPER/PCIe/SSE2

ADDITIONAL INFORMATION
Attached a coredumpctl/gdb log with a backtrace, but only one line number is reported  
/usr/src/debug/gwenview-24.08.1/app/main.cpp:218
Comment 1 Michael Hamilton 2024-10-03 20:32:38 UTC
This appears in the systemd journal prior to but in the same second as each coredump:

org.kde.kdegraphics.gwenview.lib: Gwenview cannot apply color profile on QImage::Format_ARGB32_Premultiplied images
Comment 2 Michael Hamilton 2024-10-03 20:42:30 UTC
If I perform an operation, such as resize, before using annotate, then I can successfully exit the annotate and save the result.

But sometimes a resize or crop will also cause a coredump - not sure if it's the same issue though.
Comment 3 Michael Hamilton 2024-10-03 20:50:16 UTC
Here is a coredump from when I did a crop, crop/resize/...  

These other operations often work, but sometimes dump core.  There were no message in the journal in this instance, just the report of a core dump.

(gdb) bt
#0  0x00007fd5f2bd0180 in QObjectPrivate::isSignalConnected(unsigned int, bool) const () at /lib64/libQt6Core.so.6
#1  0x00007fd5f2ce1efe in ??? () at /lib64/libQt6Core.so.6
#2  0x00007fd5f2cd770a in QAbstractAnimation::setCurrentTime(int) () at /lib64/libQt6Core.so.6
#3  0x00007fd5f2cd78d9 in ??? () at /lib64/libQt6Core.so.6
#4  0x00007fd5f2cd13f1 in QUnifiedTimer::updateAnimationTimers() () at /lib64/libQt6Core.so.6
#5  0x00007fd5f2cd66d1 in QAnimationDriver::advanceAnimation() () at /lib64/libQt6Core.so.6
#6  0x00007fd5f2bd1dd6 in QObject::event(QEvent*) () at /lib64/libQt6Core.so.6
#7  0x00007fd5f3dc2f6e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt6Widgets.so.6
#8  0x00007fd5f2b8ec30 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt6Core.so.6
#9  0x00007fd5f2ceca5a in QTimerInfoList::activateTimers() () at /lib64/libQt6Core.so.6
#10 0x00007fd5f2dc2e04 in ??? () at /lib64/libQt6Core.so.6
#11 0x00007fd5efcc1fb8 in ??? () at /lib64/libglib-2.0.so.0
#12 0x00007fd5efcc3d38 in ??? () at /lib64/libglib-2.0.so.0
#13 0x00007fd5efcc43ec in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#14 0x00007fd5f2dc1adc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /lib64/libQt6Core.so.6
#15 0x00007fd5f2b993db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt6Core.so.6
#16 0x00007fd5f2b92bb6 in QCoreApplication::exec() () at /lib64/libQt6Core.so.6
#17 0x00005616b027d80c in main (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/gwenview-24.08.1/app/main.cpp:218
Comment 4 Michael Hamilton 2024-10-03 20:54:25 UTC
I was altering jpegs from a Samsung phone, I just tried images from a different camera (very old Olympus E-M5) with the same result.
Comment 5 Pedro 2025-03-25 04:21:07 UTC
Thank you for the bug report. I couldn't replicate this problem in Gwenview 24.12.2. May we ask you to test in more recent software?
Comment 6 Michael Hamilton 2025-03-25 05:03:49 UTC
(In reply to Pedro from comment #5)
> Thank you for the bug report. I couldn't replicate this problem in Gwenview
> 24.12.2. May we ask you to test in more recent software?

Happens every time.  I just tried 

     find ~/.kde ~/.cache ~/.local ~/.config -name '*gwenv*' | xargs rm -rf

That didn't help.  Current backtrace appended.  Will try as another user and report back.

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007f50a289b453 in __pthread_kill_internal (threadid=<optimized out>, signo=11) at pthread_kill.c:89
#2  0x00007f50a2841cb6 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
#3  0x00007f50a5c83a37 in KCrash::defaultCrashHandler (sig=11) at /usr/src/debug/kcrash-6.12.0/src/kcrash.cpp:605
#4  0x00007f50a2841e00 in <signal handler called> () at /lib64/libc.so.6
#5  std::__atomic_base<QObjectPrivate::SignalVector*>::load (this=0x454545454545454d, __m=std::memory_order_relaxed)
    at /usr/include/c++/14/bits/atomic_base.h:831
#6  std::atomic<QObjectPrivate::SignalVector*>::load (this=0x454545454545454d, __m=std::memory_order_relaxed)
    at /usr/include/c++/14/atomic:582
#7  QAtomicOps<QObjectPrivate::SignalVector*>::loadRelaxed<QObjectPrivate::SignalVector*>
    (_q_value=<error reading variable: Cannot access memory at address 0x454545454545454d>)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/thread/qatomic_cxx11.h:202
#8  QBasicAtomicPointer<QObjectPrivate::SignalVector>::loadRelaxed (this=0x454545454545454d)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/thread/qbasicatomic.h:170
#9  QObjectPrivate::isSignalConnected (this=0x55d77e453260, signalIndex=7, checkDeclarative=<optimized out>)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qobject.cpp:428
#10 0x00007f50a331219e in QVariantAnimationPrivate::setCurrentValueForProgress (this=0x55d77e453260, progress=<optimized out>)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/animation/qvariantanimation.cpp:262
#11 QVariantAnimationPrivate::recalculateCurrentInterval (this=0x55d77e453260, force=<optimized out>)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/animation/qvariantanimation.cpp:239
#12 0x00007f50a3308916 in QAbstractAnimation::setCurrentTime (this=0x55d77e5d6060, msecs=<optimized out>)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/animation/qabstractanimation.cpp:1341
#13 0x00007f50a32fdc19 in QAnimationTimer::updateAnimationsTime (this=0x55d77d2885e0, delta=51)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/animation/qabstractanimation.cpp:575
#14 0x00007f50a32fd1c1 in QUnifiedTimer::updateAnimationTimers (this=this@entry=0x55d77d21d9d0)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/animation/qabstractanimation.cpp:288
#15 0x00007f50a3301405 in QAnimationDriver::advanceAnimation (this=<optimized out>)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/animation/qabstractanimation.cpp:755
#16 0x00007f50a31f5139 in QObject::event (this=0x55d77d21d9e8, e=0x7ffe85600da0)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qobject.cpp:1393
#17 0x00007f50a43dee35 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55d77d21d9e8, e=0x7ffe85600da0)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/widgets/kernel/qapplication.cpp:3296
#18 0x00007f50a31adaf0 in QCoreApplication::notifyInternal2 (receiver=0x55d77d21d9e8, event=0x7ffe85600da0)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qcoreapplication.cpp:1172
#19 0x00007f50a331ee8f in QTimerInfoList::activateTimers (this=0x55d77ca46c70)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qtimerinfo_unix.cpp:426
#20 0x00007f50a3407c3c in timerSourceDispatch (source=source@entry=0x55d77ca46c10)
    at /usr/src/debug/qtbase-everywhere-src-6.8.2/src/corelib/kernel/qeventdispatcher_glib.cpp:152
Comment 7 Michael Hamilton 2025-03-25 07:11:32 UTC
(In reply to Pedro from comment #5)
> Thank you for the bug report. I couldn't replicate this problem in Gwenview
> 24.12.2. May we ask you to test in more recent software?

Thanks for looking into this for me.  I'm running quite a recent gwenview:

    rpm -q  gwenview 
    gwenview-24.12.3-1.2.x86_64

It's still happening.  I tried logging in as a different user, but encountered the same problem.  When I say the same, it's hard to recall if its exactly the same.  What I see today is that if I enter the annotation tool and then click OK to leave, then the main gwenview window remains visible for about 1 to 2 seconds, then gwenview crashes.

What I've just discovered is that  if I 
1. go into the adjust-colors tool, change the contrast, exit the tool, on the main screen, click Undo on the Current Image Modified header, 
2. go back and do an annotation, exit the tool, and the main screen header allows me to undo or save-as.

Although, the above is an improvement, gwenview still may crash when I navigate around the tools, but not that often.  When it does crash. the main screen doesn't show the header offering undo, save, save-as.

When it does crash I see the following when running it in a konsole:
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/hej2k"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/vnd.radiance"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-epson-erf"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-hasselblad-3fr"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-hasselblad-fff"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-leaf-mos"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-mamiya-mef"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-minolta-mdc"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-mng"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-pfm"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-phaseone-iiq"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-phm"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-pxr"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-samsung-srw"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-sct"
org.kde.kdegraphics.gwenview.lib: Unresolved mime type  "image/x-sinar-sti"
org.kde.kdegraphics.gwenview.lib: Unresolved raw mime type  "image/x-samsung-srw"
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setOpacity: Painter not active
QPainter::end: Painter not active, aborted
KCrash: Application 'gwenview' crashing... crashRecursionCounter = 2
[1]    178342 segmentation fault (core dumped)  gwenview

Operating System: openSUSE Tumbleweed 20250319
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.5-1-default (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1650 SUPER
Manufacturer: ASUS
Comment 8 John Kizer 2025-03-26 18:40:29 UTC
Just an idea to maybe help narrow down the circumstances here - does the issue occur in a Wayland session? And does the issue occur if you're using the Nouveau graphics drivers? Thanks!
Comment 9 Pedro 2025-03-26 19:37:11 UTC
I just tried in X11 session and still can't reproduce it. I used two versions:

  Gwenview v25.07.70 (compiled from source)
  KDE Frameworks 6.13.0
  Qt 6.8.2

  Gwenview v24.12.3 (flatpak)
  KDE Frameworks 6.12.0
  Qt 6.8.2

The steps I'm doing are
  1. Open Gwenview
  2. Select a jpg image from the Recent Files tab
  3. I have the left side bar shown (F4) and the thumbnails active while in View mode.
  4. Shft+A to display the Annotate tool
  5. Draw a line suing the Pen (P) tool
  6. Press Ok button on the Annotate window

Observed: The annotate tool closes and the current image is modified with the line I draw.
Expected: Same as observed.
Comment 10 Pedro 2025-03-26 19:38:54 UTC
I forgot to mention that I'm using proprietary drivers for my Nvidia GTX 1050 Ti card
Comment 11 Michael Hamilton 2025-03-26 19:52:03 UTC
(In reply to Pedro from comment #10)
> I forgot to mention that I'm using proprietary drivers for my Nvidia GTX
> 1050 Ti card

I'm using nvidia 550.144, I haven't been able to move to the more recent 570 series drivers due to issues with them.

Perhaps this only happens on the 550 driver.  Maybe this is due to something specific I've set on my desktop.   

We could park this until I'm able to update to 570, maybe it will go away.
Comment 12 Pedro 2025-03-26 19:56:47 UTC
(In reply to Michael Hamilton from comment #11)
> (In reply to Pedro from comment #10)
> > I forgot to mention that I'm using proprietary drivers for my Nvidia GTX
> > 1050 Ti card
> 
> I'm using nvidia 550.144, I haven't been able to move to the more recent 570
> series drivers due to issues with them.
> 
> Perhaps this only happens on the 550 driver.  Maybe this is due to something
> specific I've set on my desktop.   
> 
> We could park this until I'm able to update to 570, maybe it will go away.


OK. As a reference, I'm using the driver 560.35.03.