https://bugs.kde.org/show_bug.cgi?id=469919

            Bug ID: 469919
           Summary: Spectacle: crash on second launch after pressing Enter
                    in text annotation tool
    Classification: Applications
           Product: Spectacle
           Version: 23.04.1
          Platform: Neon
                OS: Linux
            Status: REPORTED
          Keywords: drkonqi
          Severity: crash
          Priority: NOR
         Component: General
          Assignee: noaha...@gmail.com
          Reporter: rybak....@gmail.com
                CC: k...@david-redondo.de
  Target Milestone: ---

Application: spectacle (23.04.1)

Qt Version: 5.15.9
Frameworks Version: 5.106.0
Operating System: Linux 5.19.0-41-generic x86_64
Windowing System: X11
Distribution: KDE neon 5.27
DrKonqi: 5.27.5 [KCrashBackend]

-- Information about the crash:
SUMMARY
If a user closes Spectacle by pressing Enter, Shift+Enter, or Ctrl+Enter, the
application closes and notification "A screenshot was saved to your clipboard"
appears. However, if Enter, Shift+Enter, or Ctrl+Enter was pressed during text
input, then the next launch of Spectacle crashes.


STEPS TO REPRODUCE
1. Launch "Capture Rectangular Region" (default shortcut is Meta+Shift+Print)
2. Click on the button for the "Text" annotation tool
3. Click somewhere to start the "Text" annotation tool
4. Press button "Enter" on the keyboard (or Shift+Enter, or Ctrl+Enter)
5. Launch "Capture Rectangular Region" a second time

OBSERVED RESULT
After step 3, notification "A screenshot was saved to your clipboard" appears.
After step 5, notification about Spectacle crashing appears.

I will also attach a screen recording demostrating the crash.

EXPECTED RESULT
The crash after step 5 shouldn't happen. Maybe the behavior after step 4 should
be changed as well (e.g. to just close the text input instead of closing
Spectacle).

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.27
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 5.19.0-41-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: Dell Inc.
Product Name: Inspiron 5570

The crash can be reproduced every time.

-- Backtrace:
Application: Spectacle (spectacle), signal: Segmentation fault

[KCrash Handler]
#4  0x0000560d82653a1f in SelectedActionWrapper::setEditAction
(this=0x560d83da1c50, action=0x0) at
./src/Gui/Annotations/AnnotationDocument.cpp:561
#5  0x0000560d8265a7b4 in AnnotationDocument::deselectAction
(this=0x560d83dd0c60) at ./src/Gui/Annotations/AnnotationDocument.cpp:1436
#6  AnnotationDocument::clearAnnotations (this=0x560d83dd0c60) at
./src/Gui/Annotations/AnnotationDocument.cpp:928
#7  0x0000560d8264a201 in AnnotationDocument::clear (this=0x560d83dd0c60) at
./src/Gui/Annotations/AnnotationDocument.cpp:842
#8  operator() (screenImages=..., __closure=0x560d83dd9330) at
./src/SpectacleCore.cpp:129
#9  QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<const
QVector<CanvasImage>&>, void,
SpectacleCore::SpectacleCore(QObject*)::<lambda(const QVector<CanvasImage>&)>
>::call (arg=<optimized out>, f=...) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:146
#10 QtPrivate::Functor<SpectacleCore::SpectacleCore(QObject*)::<lambda(const
QVector<CanvasImage>&)>, 1>::call<QtPrivate::List<QVector<CanvasImage> const&>,
void> (arg=<optimized out>, f=...) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:256
#11
QtPrivate::QFunctorSlotObject<SpectacleCore::SpectacleCore(QObject*)::<lambda(const
QVector<CanvasImage>&)>, 1, QtPrivate::List<const QVector<CanvasImage>&>,
void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *)
(which=<optimized out>, this_=0x560d83dd9320, r=<optimized out>, a=<optimized
out>, ret=<optimized out>) at
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:443
#12 0x00007fb22e8f41e4 in QtPrivate::QSlotObjectBase::call (a=0x7fffea53c7c0,
r=0x7fffea53cd20, this=0x560d83dd9320) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#13 doActivate<false> (sender=0x560d83da1bf0, signal_index=6,
argv=0x7fffea53c7c0) at kernel/qobject.cpp:3923
#14 0x00007fb22e8ed287 in QMetaObject::activate
(sender=sender@entry=0x560d83da1bf0, m=m@entry=0x560d826b2640
<Platform::staticMetaObject>, local_signal_index=local_signal_index@entry=3,
argv=argv@entry=0x7fffea53c7c0) at kernel/qobject.cpp:3983
#15 0x0000560d82670917 in Platform::newScreensScreenshotTaken (_t1=...,
this=0x560d83da1bf0) at
./obj-x86_64-linux-gnu/src/spectacle_autogen/UWYFJWVAJO/moc_Platform.cpp:298
#16 PlatformXcb::doGrabNow (this=0x560d83da1bf0, theGrabMode=<optimized out>,
theIncludePointer=<optimized out>, theIncludeDecorations=<optimized out>) at
./src/Platforms/PlatformXcb.cpp:713
#17 0x00007fb22e8f8306 in QtPrivate::QSlotObjectBase::call (a=0x7fffea53c830,
r=<optimized out>, this=<optimized out>) at
../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#18 QSingleShotTimer::timerEvent (this=0x560d85b8f2b0) at kernel/qtimer.cpp:320
#19 0x00007fb22e8e9b0f in QObject::event (this=0x560d85b8f2b0,
e=0x7fffea53c9a0) at kernel/qobject.cpp:1369
#20 0x00007fb23016c793 in QApplicationPrivate::notify_helper (this=<optimized
out>, receiver=0x560d85b8f2b0, e=0x7fffea53c9a0) at
kernel/qapplication.cpp:3640
#21 0x00007fb22e8bc18a in QCoreApplication::notifyInternal2
(receiver=0x560d85b8f2b0, event=0x7fffea53c9a0) at
kernel/qcoreapplication.cpp:1064
#22 0x00007fb22e914f1b in QTimerInfoList::activateTimers (this=0x560d83c23260)
at kernel/qtimerinfo_unix.cpp:643
#23 0x00007fb22e91581c in timerSourceDispatch (source=<optimized out>) at
kernel/qeventdispatcher_glib.cpp:183
#24 0x00007fb22c31bd3b in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007fb22c3706c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007fb22c3193e3 in g_main_context_iteration () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007fb22e915be8 in QEventDispatcherGlib::processEvents
(this=0x560d83c26ae0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#28 0x00007fb22e8baaab in QEventLoop::exec (this=this@entry=0x7fffea53cbe0,
flags=..., flags@entry=...) at
../../include/QtCore/../../src/corelib/global/qflags.h:69
#29 0x00007fb22e8c3044 in QCoreApplication::exec () at
../../include/QtCore/../../src/corelib/global/qflags.h:121
#30 0x00007fb22ed36540 in QGuiApplication::exec () at
kernel/qguiapplication.cpp:1870
#31 0x00007fb23016c709 in QApplication::exec () at kernel/qapplication.cpp:2832
#32 0x0000560d8261c8d7 in main (argc=<optimized out>, argv=<optimized out>) at
./src/Main.cpp:127
[Inferior 1 (process 9827) detached]

Reported using DrKonqi

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to