Bug 462408 - Skanlite cashes when trying to cancel scan
Summary: Skanlite cashes when trying to cancel scan
Status: RESOLVED FIXED
Alias: None
Product: Skanlite
Classification: Applications
Component: general (show other bugs)
Version: 22.08.3
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Kåre Särs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-11-29 19:48 UTC by Alexander Wilms
Modified: 2022-12-11 08:17 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Wilms 2022-11-29 19:48:46 UTC
Application: skanlite (22.08.3)

Qt Version: 5.15.7
Frameworks Version: 5.100.0
Operating System: Linux 6.0.8-1-default x86_64
Windowing System: Wayland
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.26.3 [KCrashBackend]

-- Information about the crash:
I was trying to cancel an in-progress scan using a MFC-J6510DW. Usually it works fine with Skanlite.

The reporter is unsure if this crash is reproducible.

-- Backtrace:
Application: Skanlite (skanlite), signal: Segmentation fault

[KCrash Handler]
#4  QImage::height (this=0x0) at image/qimage.cpp:1312
#5  0x00007fe790d3b8ad in KSaneIface::KSaneWidgetPrivate::updateProgress (this=0x561187403e40, progress=100) at /home/alexander/Development/libksane/src/ksanewidget_p.cpp:1230
#6  0x00007fe790d34342 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<int>, void, void (KSaneIface::KSaneWidgetPrivate::*)(int)>::call (f=(void (KSaneIface::KSaneWidgetPrivate::*)(KSaneIface::KSaneWidgetPrivate * const, int)) 0x7fe790d3b7ce <KSaneIface::KSaneWidgetPrivate::updateProgress(int)>, o=0x561187403e40, arg=0x7ffc9907dc20) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#7  0x00007fe790d33cc2 in QtPrivate::FunctionPointer<void (KSaneIface::KSaneWidgetPrivate::*)(int)>::call<QtPrivate::List<int>, void> (f=(void (KSaneIface::KSaneWidgetPrivate::*)(KSaneIface::KSaneWidgetPrivate * const, int)) 0x7fe790d3b7ce <KSaneIface::KSaneWidgetPrivate::updateProgress(int)>, o=0x561187403e40, arg=0x7ffc9907dc20) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#8  0x00007fe790d330b1 in QtPrivate::QSlotObject<void (KSaneIface::KSaneWidgetPrivate::*)(int), QtPrivate::List<int>, void>::impl (which=1, this_=0x561187408ec0, r=0x561187403e40, a=0x7ffc9907dc20, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#9  0x00007fe78f3132cd in QtPrivate::QSlotObjectBase::call (a=0x7ffc9907dc20, r=0x561187403e40, this=0x561187408ec0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#10 doActivate<false> (sender=0x5611873ea700, signal_index=6, argv=0x7ffc9907dc20) at kernel/qobject.cpp:3919
#11 0x00007fe78fdca35c in KSaneCore::Interface::scanProgress (this=0x5611873ea700, _t1=100) at /home/alexander/Development/ksanecore/build/src/KSaneCore_autogen/EWIEGA46WW/moc_interface.cpp:250
#12 0x00007fe78fdd84c2 in KSaneCore::InterfacePrivate::imageScanFinished (this=0x5611873f7920) at /home/alexander/Development/ksanecore/src/interface_p.cpp:340
#13 0x00007fe78fdd52c6 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KSaneCore::InterfacePrivate::*)()>::call(void (KSaneCore::InterfacePrivate::*)(), KSaneCore::InterfacePrivate*, void**) (f=(void (KSaneCore::InterfacePrivate::*)(KSaneCore::InterfacePrivate * const)) 0x7fe78fdd8492 <KSaneCore::InterfacePrivate::imageScanFinished()>, o=0x5611873f7920, arg=0x7fe760003328) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#14 0x00007fe78fdd5089 in QtPrivate::FunctionPointer<void (KSaneCore::InterfacePrivate::*)()>::call<QtPrivate::List<>, void>(void (KSaneCore::InterfacePrivate::*)(), KSaneCore::InterfacePrivate*, void**) (f=(void (KSaneCore::InterfacePrivate::*)(KSaneCore::InterfacePrivate * const)) 0x7fe78fdd8492 <KSaneCore::InterfacePrivate::imageScanFinished()>, o=0x5611873f7920, arg=0x7fe760003328) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#15 0x00007fe78fdd4abd in QtPrivate::QSlotObject<void (KSaneCore::InterfacePrivate::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x561187716b90, r=0x5611873f7920, a=0x7fe760003328, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#16 0x00007fe78f307c40 in QObject::event (this=0x5611873f7920, e=0x7fe7600032e0) at kernel/qobject.cpp:1347
#17 0x00007fe78ffa53fe in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5611873f7920, e=0x7fe7600032e0) at kernel/qapplication.cpp:3637
#18 0x00007fe78f2dc128 in QCoreApplication::notifyInternal2 (receiver=0x5611873f7920, event=0x7fe7600032e0) at kernel/qcoreapplication.cpp:1064
#19 0x00007fe78f2df0c1 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x5611871f2780) at kernel/qcoreapplication.cpp:1821
#20 0x00007fe78f334353 in postEventSourceDispatch (s=0x561187225730) at kernel/qeventdispatcher_glib.cpp:277
#21 0x00007fe78dc6aa90 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#22 0x00007fe78dc6ae48 in ?? () from /lib64/libglib-2.0.so.0
#23 0x00007fe78dc6aedc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#24 0x00007fe78f333b56 in QEventDispatcherGlib::processEvents (this=0x561187231090, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#25 0x00007fe7906256bb in KMessageBox::createKMessageBox (dialog=0x56118771ec70, buttons=0x5611875b05c0, icon=..., text=..., strlist=..., ask=..., checkboxReturn=0x0, options=..., details=..., notifyType=QMessageBox::Warning) at /usr/include/qt5/QtCore/qflags.h:121
#26 0x00007fe790626127 in KMessageBox::createKMessageBox (dialog=0x56118771ec70, buttons=0x5611875b05c0, icon=QMessageBox::Warning, text=..., strlist=..., ask=..., checkboxReturn=0x0, options=..., details=...) at /usr/src/debug/kwidgetsaddons-5.100.0/src/kmessagebox.cpp:153
#27 0x00007fe79066b968 in KMessageBox::sorryInternal(QDialog*, QString const&, QString const&, KGuiItem const&, QFlags<KMessageBox::Option>) [clone .isra.0] (dialog=dialog@entry=0x56118771ec70, text=..., buttonOk=..., options=options@entry=..., title=...) at /usr/src/debug/kwidgetsaddons-5.100.0/src/kmessagebox.cpp:1000
#28 0x00007fe790623ad3 in KMessageBox::sorry (parent=parent@entry=0x0, text=..., title=..., options=options@entry=...) at /usr/src/debug/kwidgetsaddons-5.100.0/src/kmessagebox.cpp:1007
#29 0x000056118524b71f in Skanlite::reselectScannerDevice (this=<optimized out>) at /usr/src/debug/skanlite-22.08.3/src/skanlite.cpp:299
#30 0x00007fe78f3132cd in QtPrivate::QSlotObjectBase::call (a=0x7ffc9907e590, r=0x7ffc9907f2e0, this=0x56118776a1a0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#31 doActivate<false> (sender=0x56118739ccb0, signal_index=9, argv=0x7ffc9907e590) at kernel/qobject.cpp:3919
#32 0x00007fe78f30c74f in QMetaObject::activate (sender=sender@entry=0x56118739ccb0, m=m@entry=0x7fe7904be160, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffc9907e590) at kernel/qobject.cpp:3979
#33 0x00007fe790097072 in QAbstractButton::clicked (this=this@entry=0x56118739ccb0, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
#34 0x00007fe7900972da in QAbstractButtonPrivate::emitClicked (this=0x5611873fe050) at widgets/qabstractbutton.cpp:416
#35 0x00007fe790098b78 in QAbstractButtonPrivate::click (this=0x5611873fe050) at widgets/qabstractbutton.cpp:409
#36 0x00007fe790098d97 in QAbstractButton::mouseReleaseEvent (this=0x56118739ccb0, e=0x7ffc9907eb10) at widgets/qabstractbutton.cpp:1045
#37 0x00007fe78ffe6c38 in QWidget::event (this=0x56118739ccb0, event=0x7ffc9907eb10) at kernel/qwidget.cpp:9043
#38 0x00007fe78ffa53fe in QApplicationPrivate::notify_helper (this=this@entry=0x5611871fb640, receiver=receiver@entry=0x56118739ccb0, e=e@entry=0x7ffc9907eb10) at kernel/qapplication.cpp:3637
#39 0x00007fe78ffad922 in QApplication::notify (this=<optimized out>, receiver=0x56118739ccb0, e=<optimized out>) at kernel/qapplication.cpp:3081
#40 0x00007fe78f2dc128 in QCoreApplication::notifyInternal2 (receiver=0x56118739ccb0, event=0x7ffc9907eb10) at kernel/qcoreapplication.cpp:1064
#41 0x00007fe78ffaba9e in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x56118739ccb0, event=event@entry=0x7ffc9907eb10, alienWidget=<optimized out>, nativeWidget=0x7ffc9907f2e0, buttonDown=buttonDown@entry=0x7fe7904f0330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2619
#42 0x00007fe78ffffa58 in QWidgetWindow::handleMouseEvent (this=0x561187766a30, event=0x7ffc9907edc0) at kernel/qwidgetwindow.cpp:683
#43 0x00007fe790002fb0 in QWidgetWindow::event (this=0x561187766a30, event=0x7ffc9907edc0) at kernel/qwidgetwindow.cpp:300
#44 0x00007fe78ffa53fe in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x561187766a30, e=0x7ffc9907edc0) at kernel/qapplication.cpp:3637
#45 0x00007fe78f2dc128 in QCoreApplication::notifyInternal2 (receiver=0x561187766a30, event=0x7ffc9907edc0) at kernel/qcoreapplication.cpp:1064
#46 0x00007fe78f77b9ad in QGuiApplicationPrivate::processMouseEvent (e=0x7fe77c006c00) at kernel/qguiapplication.cpp:2285
#47 0x00007fe78f74f37c in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#48 0x00007fe78d3611e0 in userEventSourceDispatch (source=<optimized out>) at qeventdispatcher_glib.cpp:74
#49 0x00007fe78dc6aa90 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#50 0x00007fe78dc6ae48 in ?? () from /lib64/libglib-2.0.so.0
#51 0x00007fe78dc6aedc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#52 0x00007fe78f333b56 in QEventDispatcherGlib::processEvents (this=0x561187231090, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#53 0x00007fe78f2dab9b in QEventLoop::exec (this=this@entry=0x7ffc9907f0f0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#54 0x00007fe78f2e2d06 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#55 0x00007fe78f76ee4c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870
#56 0x00007fe78ffa5375 in QApplication::exec () at kernel/qapplication.cpp:2829
#57 0x0000561185245e5a in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/skanlite-22.08.3/src/main.cpp:91
[Inferior 1 (process 12109) detached]

The reporter indicates this bug may be a duplicate of or related to bug 458517.

Reported using DrKonqi
Comment 1 Alexander Wilms 2022-11-29 19:57:53 UTC
The backtrace lists a path of my local development copy of libksane, but my changes shouldn't affect this crash:

https://web.archive.org/web/20221129195448/https://invent.kde.org/graphics/libksane/-/merge_requests/69/diffs
Comment 2 Kåre Särs 2022-11-30 07:15:38 UTC
Thanks for the report!

Nice to get a report once in a while that actually is a clear bug in  Skanlite/libksane and not just a buggy backend :)

Since you already have the code and are working on it. Are you interested in debugging and fixing?

BR,
  Kåre
Comment 3 Alexander Wilms 2022-11-30 12:29:46 UTC
Hi, yeah, I'll try.
Comment 4 Alexander Wilms 2022-11-30 13:01:10 UTC
Application: skanlite (22.08.3)
 (Compiled from sources)
Qt Version: 5.15.7
Frameworks Version: 5.100.0
Operating System: Linux 6.0.8-1-default x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.26.3 [KCrashBackend]

-- Information about the crash:
A different backtrace for the crash that occurs when canceling a scan. Probably the same root cause.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Skanlite (skanlite), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fc8afbe90ce in KSaneCore::ScanThread::frameStatus (this=0x0) at /home/alexander/Development/ksanecore/src/scanthread.cpp:49
#5  0x00007fc8afbf24d8 in KSaneCore::InterfacePrivate::imageScanFinished (this=0x55658de64620) at /home/alexander/Development/ksanecore/src/interface_p.cpp:341
#6  0x00007fc8afbef2c6 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KSaneCore::InterfacePrivate::*)()>::call(void (KSaneCore::InterfacePrivate::*)(), KSaneCore::InterfacePrivate*, void**) (f=(void (KSaneCore::InterfacePrivate::*)(KSaneCore::InterfacePrivate * const)) 0x7fc8afbf2492 <KSaneCore::InterfacePrivate::imageScanFinished()>, o=0x55658de64620, arg=0x7fc86c004648) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#7  0x00007fc8afbef089 in QtPrivate::FunctionPointer<void (KSaneCore::InterfacePrivate::*)()>::call<QtPrivate::List<>, void>(void (KSaneCore::InterfacePrivate::*)(), KSaneCore::InterfacePrivate*, void**) (f=(void (KSaneCore::InterfacePrivate::*)(KSaneCore::InterfacePrivate * const)) 0x7fc8afbf2492 <KSaneCore::InterfacePrivate::imageScanFinished()>, o=0x55658de64620, arg=0x7fc86c004648) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#8  0x00007fc8afbeeabd in QtPrivate::QSlotObject<void (KSaneCore::InterfacePrivate::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x55658e457b20, r=0x55658de64620, a=0x7fc86c004648, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#9  0x00007fc8ae907c40 in QObject::event (this=0x55658de64620, e=0x7fc86c004600) at kernel/qobject.cpp:1347
#10 0x00007fc8af5a53fe in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55658de64620, e=0x7fc86c004600) at kernel/qapplication.cpp:3637
#11 0x00007fc8ae8dc128 in QCoreApplication::notifyInternal2 (receiver=0x55658de64620, event=0x7fc86c004600) at kernel/qcoreapplication.cpp:1064
#12 0x00007fc8ae8df0c1 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x55658dd28780) at kernel/qcoreapplication.cpp:1821
#13 0x00007fc8ae934353 in postEventSourceDispatch (s=0x55658de0a9f0) at kernel/qeventdispatcher_glib.cpp:277
#14 0x00007fc8ad11ca90 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#15 0x00007fc8ad11ce48 in ?? () from /lib64/libglib-2.0.so.0
#16 0x00007fc8ad11cedc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#17 0x00007fc8ae933b56 in QEventDispatcherGlib::processEvents (this=0x55658de18540, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#18 0x00007fc8afd4c6bb in KMessageBox::createKMessageBox (dialog=0x55658e278c00, buttons=0x55658e2c6e70, icon=..., text=..., strlist=..., ask=..., checkboxReturn=0x0, options=..., details=..., notifyType=QMessageBox::Warning) at /usr/include/qt5/QtCore/qflags.h:121
#19 0x00007fc8afd4d127 in KMessageBox::createKMessageBox (dialog=0x55658e278c00, buttons=0x55658e2c6e70, icon=QMessageBox::Warning, text=..., strlist=..., ask=..., checkboxReturn=0x0, options=..., details=...) at /usr/src/debug/kwidgetsaddons-5.100.0/src/kmessagebox.cpp:153
#20 0x00007fc8afd92968 in KMessageBox::sorryInternal(QDialog*, QString const&, QString const&, KGuiItem const&, QFlags<KMessageBox::Option>) [clone .isra.0] (dialog=dialog@entry=0x55658e278c00, text=..., buttonOk=..., options=options@entry=..., title=...) at /usr/src/debug/kwidgetsaddons-5.100.0/src/kmessagebox.cpp:1000
#21 0x00007fc8afd4aad3 in KMessageBox::sorry (parent=parent@entry=0x0, text=..., title=..., options=options@entry=...) at /usr/src/debug/kwidgetsaddons-5.100.0/src/kmessagebox.cpp:1007
#22 0x000055658c8ac71f in Skanlite::reselectScannerDevice (this=<optimized out>) at /usr/src/debug/skanlite-22.08.3/src/skanlite.cpp:299
#23 0x00007fc8ae9132cd in QtPrivate::QSlotObjectBase::call (a=0x7fff5b146c00, r=0x7fff5b147950, this=0x55658e42ea30) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#24 doActivate<false> (sender=0x55658e035350, signal_index=9, argv=0x7fff5b146c00) at kernel/qobject.cpp:3919
#25 0x00007fc8ae90c74f in QMetaObject::activate (sender=sender@entry=0x55658e035350, m=m@entry=0x7fc8afabe160, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fff5b146c00) at kernel/qobject.cpp:3979
#26 0x00007fc8af697072 in QAbstractButton::clicked (this=this@entry=0x55658e035350, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
#27 0x00007fc8af6972da in QAbstractButtonPrivate::emitClicked (this=0x55658e03d750) at widgets/qabstractbutton.cpp:416
#28 0x00007fc8af698b78 in QAbstractButtonPrivate::click (this=0x55658e03d750) at widgets/qabstractbutton.cpp:409
#29 0x00007fc8af698d97 in QAbstractButton::mouseReleaseEvent (this=0x55658e035350, e=0x7fff5b147180) at widgets/qabstractbutton.cpp:1045
#30 0x00007fc8af5e6c38 in QWidget::event (this=0x55658e035350, event=0x7fff5b147180) at kernel/qwidget.cpp:9043
#31 0x00007fc8af5a53fe in QApplicationPrivate::notify_helper (this=this@entry=0x55658dd31640, receiver=receiver@entry=0x55658e035350, e=e@entry=0x7fff5b147180) at kernel/qapplication.cpp:3637
#32 0x00007fc8af5ad922 in QApplication::notify (this=<optimized out>, receiver=0x55658e035350, e=<optimized out>) at kernel/qapplication.cpp:3081
#33 0x00007fc8ae8dc128 in QCoreApplication::notifyInternal2 (receiver=0x55658e035350, event=0x7fff5b147180) at kernel/qcoreapplication.cpp:1064
#34 0x00007fc8af5aba9e in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x55658e035350, event=event@entry=0x7fff5b147180, alienWidget=<optimized out>, nativeWidget=0x7fff5b147950, buttonDown=buttonDown@entry=0x7fc8afaf0330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2619
#35 0x00007fc8af5ffa58 in QWidgetWindow::handleMouseEvent (this=0x55658e439640, event=0x7fff5b147430) at kernel/qwidgetwindow.cpp:683
#36 0x00007fc8af602fb0 in QWidgetWindow::event (this=0x55658e439640, event=0x7fff5b147430) at kernel/qwidgetwindow.cpp:300
#37 0x00007fc8af5a53fe in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x55658e439640, e=0x7fff5b147430) at kernel/qapplication.cpp:3637
#38 0x00007fc8ae8dc128 in QCoreApplication::notifyInternal2 (receiver=0x55658e439640, event=0x7fff5b147430) at kernel/qcoreapplication.cpp:1064
#39 0x00007fc8aed7b9ad in QGuiApplicationPrivate::processMouseEvent (e=0x55658e2ff210) at kernel/qguiapplication.cpp:2285
#40 0x00007fc8aed4f37c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#41 0x00007fc8a9f1a0fa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#42 0x00007fc8ad11ca90 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#43 0x00007fc8ad11ce48 in ?? () from /lib64/libglib-2.0.so.0
#44 0x00007fc8ad11cedc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#45 0x00007fc8ae933b56 in QEventDispatcherGlib::processEvents (this=0x55658de18540, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#46 0x00007fc8ae8dab9b in QEventLoop::exec (this=this@entry=0x7fff5b147760, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#47 0x00007fc8ae8e2d06 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#48 0x00007fc8aed6ee4c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870
#49 0x00007fc8af5a5375 in QApplication::exec () at kernel/qapplication.cpp:2829
#50 0x000055658c8a6e5a in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/skanlite-22.08.3/src/main.cpp:91
[Inferior 1 (process 11376) detached]

Reported using DrKonqi
Comment 5 Alexander Wilms 2022-11-30 13:05:35 UTC
Maybe ScanThread::ScanThread::finished is emitted too early.
Comment 6 Alexander Wilms 2022-11-30 14:02:03 UTC
I added logging and was able to reproduce the segfault every time by clicking "Preview" and then "Reselect scanner device" during the scan:

KSaneWidgetPrivate::updateProgress(progress = -1)
m_ksaneCoreInterface: 94251959516592, m_ksaneCoreInterface->scanImage(): 94251971563056
KSaneWidgetPrivate::updateProgress(progress = 100)
m_ksaneCoreInterface: 94251959516592, m_ksaneCoreInterface->scanImage(): 0
Comment 7 Alexander Wilms 2022-12-10 14:42:25 UTC
Should be fixed by https://invent.kde.org/graphics/skanlite/-/merge_requests/33

Or can you still reproduce this, Kåre?
Comment 8 Kåre Särs 2022-12-11 08:15:09 UTC
Git commit 0aab98f92ce1f05cd7f9e3d39bb170f6c3e5e3cd by Kåre Särs, on behalf of Alexander Wilms.
Committed on 11/12/2022 at 08:09.
Pushed by sars into branch 'release/22.12'.

Use lambdas for disabling and enabling 'Reselect Device' button
FIXED-IN: 22.12.1

M  +6    -13   src/skanlite.cpp
M  +0    -2    src/skanlite.h

https://invent.kde.org/graphics/skanlite/commit/0aab98f92ce1f05cd7f9e3d39bb170f6c3e5e3cd
Comment 9 Kåre Särs 2022-12-11 08:17:13 UTC
Thanks for the fix!

I just back-ported it to 22.12.1

BR,
  Kåre