Bug 456808

Summary: Crash when changing scan source or color option
Product: [Applications] Skanlite Reporter: Jaco Krüger <elrinv>
Component: generalAssignee: Kåre Särs <kare.sars>
Status: REPORTED ---    
Severity: crash CC: f.gruber, john
Priority: NOR Keywords: drkonqi
Version First Reported In: 22.04.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Jaco Krüger 2022-07-16 17:26:03 UTC
Application: skanlite (22.04.3)

Qt Version: 5.15.5
Frameworks Version: 5.96.0
Operating System: Linux 5.18.6-1-default x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.25.3 [KCrashBackend]

-- Information about the crash:
Crashes every time when clicking on the selection in the drop-down menu.

The crash can be reproduced every time.

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

[KCrash Handler]
#4  0x00007fde8c7175aa in sane_epson2_control_option () from /usr/lib64/sane/libsane-epson2.so.1
#5  0x00007fde9b9748fd in ?? () from /lib64/libKF5Sane.so.5
#6  0x00007fde9b9758fe in ?? () from /lib64/libKF5Sane.so.5
#7  0x00007fde9a0ffe6f in ?? () from /lib64/libQt5Core.so.5
#8  0x00007fde9b949d04 in ?? () from /lib64/libKF5Sane.so.5
#9  0x00007fde9a0ffe6f in ?? () from /lib64/libQt5Core.so.5
#10 0x00007fde9ad7b1b1 in QComboBox::activated(int) () from /lib64/libQt5Widgets.so.5
#11 0x00007fde9ad7c95e in ?? () from /lib64/libQt5Widgets.so.5
#12 0x00007fde9a0ffe9c in ?? () from /lib64/libQt5Core.so.5
#13 0x00007fde9ad7b502 in QComboBoxPrivateContainer::itemSelected(QModelIndex const&) () from /lib64/libQt5Widgets.so.5
#14 0x00007fde9ad7be4e in QComboBoxPrivateContainer::eventFilter(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#15 0x00007fde9a0c8d3b in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#16 0x00007fde9ac7740e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#17 0x00007fde9ac7f942 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#18 0x00007fde9a0c8fb8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#19 0x00007fde9ac7dabe in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib64/libQt5Widgets.so.5
#20 0x00007fde9acd1ed5 in ?? () from /lib64/libQt5Widgets.so.5
#21 0x00007fde9acd4fe0 in ?? () from /lib64/libQt5Widgets.so.5
#22 0x00007fde9ac7741e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#23 0x00007fde9a0c8fb8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#24 0x00007fde9a5299b5 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib64/libQt5Gui.so.5
#25 0x00007fde9a4fd33c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Gui.so.5
#26 0x00007fde955157fa in ?? () from /lib64/libQt5XcbQpa.so.5
#27 0x00007fde9873eea0 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#28 0x00007fde9873f258 in ?? () from /lib64/libglib-2.0.so.0
#29 0x00007fde9873f2ec in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#30 0x00007fde9a120456 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#31 0x00007fde9a0c7a2b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#32 0x00007fde9a0cfb96 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#33 0x000055d116d3fe5a in ?? ()
#34 0x00007fde999d05b0 in __libc_start_call_main () from /lib64/libc.so.6
#35 0x00007fde999d0679 in __libc_start_main_impl () from /lib64/libc.so.6
#36 0x000055d116d40655 in ?? ()
[Inferior 1 (process 25301) detached]

Reported using DrKonqi
Comment 1 Kåre Särs 2022-07-16 20:33:09 UTC
Thanks for the report!

Can you install the debug symbol package for libsane/sane-backends and for libksane and then reproduce the crash?

BR,
  Kåre
Comment 2 Jaco Krüger 2022-07-16 23:41:12 UTC
(In reply to Kåre Särs from comment #1)
> Thanks for the report!
> 
> Can you install the debug symbol package for libsane/sane-backends and for
> libksane and then reproduce the crash?
> 
> BR,
>   Kåre

Hi there,

Yes, I installed libsane-devel package and the same happens. 

Trace:
Application: Skanlite (skanlite), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fac6a8654e3 in sane_epson2_control_option () from /usr/lib64/sane/libsane-epson2.so.1
#5  0x00007fac79ac98fd in ?? () from /lib64/libKF5Sane.so.5
#6  0x00007fac79aca8fe in ?? () from /lib64/libKF5Sane.so.5
#7  0x00007fac78254e6f in ?? () from /lib64/libQt5Core.so.5
#8  0x00007fac79a9ed04 in ?? () from /lib64/libKF5Sane.so.5
#9  0x00007fac78254e6f in ?? () from /lib64/libQt5Core.so.5
#10 0x00007fac78ed01b1 in QComboBox::activated(int) () from /lib64/libQt5Widgets.so.5
#11 0x00007fac78ed195e in ?? () from /lib64/libQt5Widgets.so.5
#12 0x00007fac78254e9c in ?? () from /lib64/libQt5Core.so.5
#13 0x00007fac78ed0502 in QComboBoxPrivateContainer::itemSelected(QModelIndex const&) () from /lib64/libQt5Widgets.so.5
#14 0x00007fac78ed0e4e in QComboBoxPrivateContainer::eventFilter(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#15 0x00007fac7821dd3b in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#16 0x00007fac78dcc40e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#17 0x00007fac78dd4942 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#18 0x00007fac7821dfb8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#19 0x00007fac78dd2abe in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib64/libQt5Widgets.so.5
#20 0x00007fac78e26ed5 in ?? () from /lib64/libQt5Widgets.so.5
#21 0x00007fac78e29fe0 in ?? () from /lib64/libQt5Widgets.so.5
#22 0x00007fac78dcc41e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#23 0x00007fac7821dfb8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#24 0x00007fac7867e9b5 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib64/libQt5Gui.so.5
#25 0x00007fac7865233c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Gui.so.5
#26 0x00007fac7366a7fa in ?? () from /lib64/libQt5XcbQpa.so.5
#27 0x00007fac76893ea0 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#28 0x00007fac76894258 in ?? () from /lib64/libglib-2.0.so.0
#29 0x00007fac768942ec in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#30 0x00007fac78275456 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#31 0x00007fac7821ca2b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#32 0x00007fac78224b96 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#33 0x000055873727ee5a in ?? ()
#34 0x00007fac77b255b0 in __libc_start_call_main () from /lib64/libc.so.6
#35 0x00007fac77b25679 in __libc_start_main_impl () from /lib64/libc.so.6
#36 0x000055873727f655 in ?? ()
[Inferior 1 (process 21152) detached]
Comment 3 Jaco Krüger 2022-07-16 23:46:17 UTC
Other applications using sane scanner interface seems to do OK (skanpage, simple-scan).
Comment 4 Kåre Särs 2022-07-19 05:13:13 UTC
Thanks,

Unfortunately that package you installed was not the debug symbols. I think the package name should end in "debuginfo"

Maybe sane-backends-debuginfo or libsane-debuginfo (or something similar). 
It would be good to also get the debuginfo pacakage also for libksane.

Thanks,
   Kåre
Comment 5 Jaco Krüger 2022-07-21 03:52:58 UTC
(In reply to Kåre Särs from comment #4)
> Thanks,
> 
> Unfortunately that package you installed was not the debug symbols. I think
> the package name should end in "debuginfo"
> 
> Maybe sane-backends-debuginfo or libsane-debuginfo (or something similar). 
> It would be good to also get the debuginfo pacakage also for libksane.
> 
> Thanks,
>    Kåre

Hi Kåre,

I believe I finally managed to install them - my debug repositories were disabled so I didn't see them.

I ran it again and did the same thing, but I'm not sure if I need to do something different when running it to get more information. The output seems to be pretty much the same as before. 
My apologies - I've never worked on debugging a KDE app, so forgive me if I'm being dense.

Thanks,

Jaco
Comment 6 Jaco Krüger 2022-07-21 03:57:06 UTC
Ah! I think I got it - here is the output:

Application: Skanlite (skanlite), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fce9128ed3b in esci_reset (s=s@entry=0x5616ee0811c0) at /usr/src/debug/sane-backends-1.1.1-1.6.x86_64/backend/epson2-commands.c:964
#5  0x00007fce9128f950 in change_source (value=0x7fce9129a46e "Automatic Document Feeder", optindex=1, s=0x5616ee0811c0) at /usr/src/debug/sane-backends-1.1.1-1.6.x86_64/backend/epson2.c:1740
#6  setvalue (info=0x7ffd546785fc, value=0x7fce9129a46e, option=33, handle=0x5616ee0811c0) at /usr/src/debug/sane-backends-1.1.1-1.6.x86_64/backend/epson2.c:1910
#7  sane_epson2_control_option (handle=0x5616ee0811c0, option=33, action=<optimized out>, value=0x7fce9129a46e, info=0x7ffd546785fc) at /usr/src/debug/sane-backends-1.1.1-1.6.x86_64/backend/epson2.c:2034
#8  0x00007fcea04ec8fd in KSaneIface::KSaneBaseOption::writeData (this=this@entry=0x5616ed8680a0, data=0x7fce9129a46e) at /usr/src/debug/libksane-22.04.3-1.1.x86_64/src/options/ksanebaseoption.cpp:110
#9  0x00007fcea04ed8fe in KSaneIface::KSaneListOption::setValue (value=..., this=0x5616ed8680a0) at /usr/src/debug/libksane-22.04.3-1.1.x86_64/src/options/ksanelistoption.cpp:281
#10 KSaneIface::KSaneListOption::setValue (value=..., this=0x5616ed8680a0) at /usr/src/debug/libksane-22.04.3-1.1.x86_64/src/options/ksanelistoption.cpp:126
#11 KSaneIface::KSaneListOption::setValue (this=0x5616ed8680a0, value=...) at /usr/src/debug/libksane-22.04.3-1.1.x86_64/src/options/ksanelistoption.cpp:122
#12 0x00007fce9ec77e6f in QtPrivate::QSlotObjectBase::call (a=0x7ffd546787f0, r=0x5616ed868100, this=0x5616eda16420) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#13 doActivate<false> (sender=0x5616ed84aa20, signal_index=8, argv=0x7ffd546787f0) at kernel/qobject.cpp:3886
#14 0x00007fce9ec7122f in QMetaObject::activate (sender=sender@entry=0x5616ed84aa20, m=m@entry=0x7fcea0503780 <KSaneIface::LabeledCombo::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffd546787f0) at kernel/qobject.cpp:3946
#15 0x00007fcea04c1d04 in KSaneIface::LabeledCombo::valueChanged (_t1=..., this=0x5616ed84aa20) at /usr/src/debug/libksane-22.04.3-1.1.x86_64/build/src/KF5Sane_autogen/IMAN36LHMA/moc_labeledcombo.cpp:184
#16 KSaneIface::LabeledCombo::emitChangedValue (this=0x5616ed84aa20) at /usr/src/debug/libksane-22.04.3-1.1.x86_64/src/widgets/labeledcombo.cpp:128
#17 0x00007fce9ec77e6f in QtPrivate::QSlotObjectBase::call (a=0x7ffd54678900, r=0x5616ed84aa20, this=0x5616ed79d400) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#18 doActivate<false> (sender=0x5616ed79d0a0, signal_index=8, argv=0x7ffd54678900) at kernel/qobject.cpp:3886
#19 0x00007fce9ec7122f in QMetaObject::activate (sender=sender@entry=0x5616ed79d0a0, m=m@entry=0x7fce9fd0b5c0, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffd54678900) at kernel/qobject.cpp:3946
#20 0x00007fce9f8f31b1 in QComboBox::activated (this=this@entry=0x5616ed79d0a0, _t1=<optimized out>) at .moc/moc_qcombobox.cpp:510
#21 0x00007fce9f8f495e in QComboBoxPrivate::emitActivated (this=<optimized out>, index=...) at ../../include/QtCore/../../src/corelib/itemmodels/qabstractitemmodel.h:62
#22 0x00007fce9ec77e9c in doActivate<false> (sender=0x5616edcc7bb0, signal_index=7, argv=0x7ffd54678a20) at kernel/qobject.cpp:3898
#23 0x00007fce9ec7122f in QMetaObject::activate (sender=sender@entry=0x5616edcc7bb0, m=m@entry=0x7fce9fd0b500 <QComboBoxPrivateContainer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffd54678a20) at kernel/qobject.cpp:3946
#24 0x00007fce9f8f3502 in QComboBoxPrivateContainer::itemSelected (this=this@entry=0x5616edcc7bb0, _t1=...) at .moc/moc_qcombobox_p.cpp:348
#25 0x00007fce9f8f3e4e in QComboBoxPrivateContainer::eventFilter (this=0x5616edcc7bb0, o=0x5616ed64bf70, e=0x7ffd54678f60) at widgets/qcombobox.cpp:824
#26 0x00007fce9ec40d3b in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x5616ed64bf70, event=event@entry=0x7ffd54678f60) at kernel/qcoreapplication.cpp:1190
#27 0x00007fce9f7ef40e in QApplicationPrivate::notify_helper (this=this@entry=0x5616ed0bcad0, receiver=receiver@entry=0x5616ed64bf70, e=e@entry=0x7ffd54678f60) at kernel/qapplication.cpp:3631
#28 0x00007fce9f7f7942 in QApplication::notify (this=<optimized out>, receiver=0x5616ed64bf70, e=<optimized out>) at kernel/qapplication.cpp:3081
#29 0x00007fce9ec40fb8 in QCoreApplication::notifyInternal2 (receiver=0x5616ed64bf70, event=0x7ffd54678f60) at kernel/qcoreapplication.cpp:1064
#30 0x00007fce9f7f5abe in QApplicationPrivate::sendMouseEvent (receiver=0x5616ed64bf70, event=event@entry=0x7ffd54678f60, alienWidget=<optimized out>, nativeWidget=0x5616edcc7bb0, buttonDown=buttonDown@entry=0x7fce9fd3b330 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2619
#31 0x00007fce9f849ed5 in QWidgetWindow::handleMouseEvent (this=0x5616ed3fe2b0, event=0x7ffd54679210) at kernel/qwidgetwindow.cpp:580
#32 0x00007fce9f84cfe0 in QWidgetWindow::event (this=0x5616ed3fe2b0, event=0x7ffd54679210) at kernel/qwidgetwindow.cpp:300
#33 0x00007fce9f7ef41e in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x5616ed3fe2b0, e=0x7ffd54679210) at kernel/qapplication.cpp:3637
#34 0x00007fce9ec40fb8 in QCoreApplication::notifyInternal2 (receiver=0x5616ed3fe2b0, event=0x7ffd54679210) at kernel/qcoreapplication.cpp:1064
#35 0x00007fce9f0a19b5 in QGuiApplicationPrivate::processMouseEvent (e=0x5616ed45f8f0) at kernel/qguiapplication.cpp:2282
#36 0x00007fce9f07533c in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#37 0x00007fce9a08d7fa in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#38 0x00007fce9d2b6ea0 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#39 0x00007fce9d2b7258 in ?? () from /lib64/libglib-2.0.so.0
#40 0x00007fce9d2b72ec in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#41 0x00007fce9ec98456 in QEventDispatcherGlib::processEvents (this=0x5616ed202510, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#42 0x00007fce9ec3fa2b in QEventLoop::exec (this=this@entry=0x7ffd54679540, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#43 0x00007fce9ec47b96 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#44 0x00007fce9f094e0c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#45 0x00007fce9f7ef395 in QApplication::exec () at kernel/qapplication.cpp:2829
#46 0x00005616ec513e5a in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/skanlite-22.04.3-1.1.x86_64/src/main.cpp:91
[Inferior 1 (process 15399) detached]
Comment 7 Kåre Särs 2022-07-24 21:00:47 UTC
Thanks for the back-trace! 

Now there are file and line numbers that can help in finding the issue. This is quite probably a back-end/driver issue, but I'll have a look what we can do.

/Kåre
Comment 8 Kåre Särs 2022-07-26 15:51:22 UTC
Hi,

I checked this a bit and it does look like a back-end/driver issue in the epson2 back-end, but It would help to get a bit more info. 
What scanner do you have? 
Does it have automatic document feeder?

Does the problem go away if you click on the "Revert scanner options to default values" in the configure dialog?

Regards,
  Kåre
Comment 9 Ferdinand Gruber 2022-08-05 08:41:06 UTC
Same problem since upgrade from openSUSE 15.3 to openSUSE 15.4
SkanLite Version is 21.12.3
Comment 10 Ferdinand Gruber 2022-08-05 08:51:21 UTC
(In reply to Ferdinand Gruber from comment #9)
> Same problem since upgrade from openSUSE 15.3 to openSUSE 15.4
> SkanLite Version is 21.12.3

I was able to solve the problem(s) by unplugging the Epson Scanner from USB.
Then I restartet the computer and reconnected the USB cable.

Now skanlite works as expected.
Comment 11 Bug Janitor Service 2022-08-20 04:35:27 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Ferdinand Gruber 2022-08-20 09:13:12 UTC
Created attachment 151442 [details]
New crash information added by DrKonqi

skanlite (21.12.3) using Qt 5.15.2

- What I was doing when the application crashed:
I tried to change the ScanMode in the skcanlite main Window.
After trying to start a scan process I get the message "Invalid argument" (my own translation from german).

The Scanner is an Epson 1240U
The crash does not occor in the application xsane.

-- Backtrace (Reduced):
#4  0x00007f1af52f3265 in setvalue (info=0x7ffd315cb56c, value=<optimized out>, option=<optimized out>, handle=0x563dc2fdd2c0) at epson2.c:1929
#5  sane_epson2_control_option (handle=0x563dc2fdd2c0, option=<optimized out>, action=<optimized out>, value=<optimized out>, info=0x7ffd315cb56c) at epson2.c:2040
#6  0x00007f1b1d03baed in KSaneIface::KSaneBaseOption::writeData (this=0x563dc2c9d050, data=0x7f1af53005a0) at /usr/src/debug/libksane-21.12.3-bp154.1.162.x86_64/src/options/ksanebaseoption.cpp:110
#7  0x00007f1b1d040017 in KSaneIface::KSaneListOption::setValue (this=this@entry=0x563dc2c9d050, value=...) at /usr/src/debug/libksane-21.12.3-bp154.1.162.x86_64/src/options/ksanelistoption.cpp:280
#8  0x00007f1b1d0400cb in KSaneIface::KSaneListOption::setValue (this=0x563dc2c9d050, value=...) at /usr/src/debug/libksane-21.12.3-bp154.1.162.x86_64/src/options/ksanelistoption.cpp:125
Comment 13 John A. Ward 2024-12-28 03:14:42 UTC
I found a solution, the device wasn't scaned by the scanning program, when I called it from Libreoffice it worked fine.