Bug 304727

Summary: Skanlite crashed when attempting to scan image
Product: [Frameworks and Libraries] libksane Reporter: dwhitney67
Component: generalAssignee: Kåre Särs <kare.sars>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 4.10.1
Sentry Crash Report:

Description dwhitney67 2012-08-07 13:46:34 UTC
Application: skanlite (0.7)
KDE Platform Version: 4.8.4 (4.8.4)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-24-generic x86_64
Distribution: Ubuntu 12.04 LTS

-- Information about the crash:
- What I was doing when the application crashed:
Sitting back in my chair relaxing; in other words, nothing (Firefox and LibreOffice are running, but iconified).

I have an HP Deskjet 1050 PSC, using the following driver:  HP Deskjet 1050 j410 Series, hpcups 3.12.2 (color, 2-sided printing)

The crash can be reproduced every time.

-- Backtrace:
Application: Skanlite (skanlite), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f867dedb780 (LWP 4033))]

Thread 4 (Thread 0x7f866c850700 (LWP 4034)):
#0  0x00007f867b117b03 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f8677abe036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f8677abe164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f867b898426 in QEventDispatcherGlib::processEvents (this=0x7f86680008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f867b867c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f867b867ed7 in QEventLoop::exec (this=0x7f866c84fdd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f867b766fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f867b8479ff in QInotifyFileSystemWatcherEngine::run (this=0xc10f50) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f867b769fcb in QThreadPrivate::start (arg=0xc10f50) at thread/qthread_unix.cpp:298
#9  0x00007f8677f8ae9a in start_thread (arg=0x7f866c850700) at pthread_create.c:308
#10 0x00007f867b1234bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f8658cab700 (LWP 4036)):
#0  0x00007f867b117b03 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f8658ec4a0a in ?? () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#2  0x00007f8658ec44fb in avahi_simple_poll_run () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#3  0x00007f8658ec46e8 in avahi_simple_poll_iterate () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#4  0x00007f8658ec491d in avahi_simple_poll_loop () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#5  0x00007f8658ec499c in ?? () from /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
#6  0x00007f8677f8ae9a in start_thread (arg=0x7f8658cab700) at pthread_create.c:308
#7  0x00007f867b1234bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f8667fff700 (LWP 4038)):
#0  __pthread_mutex_lock (mutex=0x7f8660065690) at pthread_mutex_lock.c:56
#1  0x00007f8677af95a1 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f8677abd851 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f8677abdf5b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f8677abe164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f867b898426 in QEventDispatcherGlib::processEvents (this=0x7f8660059640, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007f867b867c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f867b867ed7 in QEventLoop::exec (this=0x7f8667ffedd0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f867b766fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#9  0x00007f867b8479ff in QInotifyFileSystemWatcherEngine::run (this=0xb08580) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x00007f867b769fcb in QThreadPrivate::start (arg=0xb08580) at thread/qthread_unix.cpp:298
#11 0x00007f8677f8ae9a in start_thread (arg=0x7f8667fff700) at pthread_create.c:308
#12 0x00007f867b1234bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f867dedb780 (LWP 4033)):
[KCrash Handler]
#6  0x00007f867d61bcb2 in KSaneIface::KSaneWidget::toQImageSilent (this=0xc17230, data=..., width=<optimized out>, height=<optimized out>, bytes_per_line=3650, format=KSaneIface::KSaneWidget::FormatGrayScale8) at ../../libksane/ksane_widget.cpp:558
#7  0x000000000040c904 in Skanlite::imageReady (this=0xbcc830, data=..., w=<optimized out>, h=1671, bpl=3650, f=1) at /build/buildd/skanlite-0.8/src/skanlite.cpp:308
#8  0x000000000040d22f in Skanlite::qt_metacall (this=0xbcc830, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff24ea9ef0) at /build/buildd/skanlite-0.8/obj-x86_64-linux-gnu/src/skanlite.moc:92
#9  0x00007f867b87d489 in QMetaObject::activate (sender=0xc17230, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff24ea9ef0) at kernel/qobject.cpp:3566
#10 0x00007f867d6189e9 in KSaneIface::KSaneWidget::imageReady (this=<optimized out>, _t1=..., _t2=3650, _t3=1671, _t4=3650, _t5=1) at ./ksane.moc:123
#11 0x00007f867d623fbd in KSaneIface::KSaneWidgetPrivate::oneFinalScanDone (this=0xc17530) at ../../libksane/ksane_widget_private.cpp:912
#12 0x00007f867b882446 in QObject::event (this=0xc17530, e=<optimized out>) at kernel/qobject.cpp:1195
#13 0x00007f867c263894 in notify_helper (e=0x7f864c003670, receiver=0xc17530, this=0xa4c5a0) at kernel/qapplication.cpp:4559
#14 QApplicationPrivate::notify_helper (this=0xa4c5a0, receiver=0xc17530, e=0x7f864c003670) at kernel/qapplication.cpp:4531
#15 0x00007f867c268713 in QApplication::notify (this=0x7fff24eaaa50, receiver=0xc17530, e=0x7f864c003670) at kernel/qapplication.cpp:4420
#16 0x00007f867cf9d9e6 in KApplication::notify (this=0x7fff24eaaa50, receiver=0xc17530, event=0x7f864c003670) at ../../kdeui/kernel/kapplication.cpp:311
#17 0x00007f867b868e9c in QCoreApplication::notifyInternal (this=0x7fff24eaaa50, receiver=0xc17530, event=0x7f864c003670) at kernel/qcoreapplication.cpp:876
#18 0x00007f867b86cc6a in sendEvent (event=0x7f864c003670, receiver=0xc17530) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xa27ff0) at kernel/qcoreapplication.cpp:1500
#20 0x00007f867b897f93 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#21 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#22 0x00007f8677abdd53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f8677abe0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f8677abe164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f867b8983bf in QEventDispatcherGlib::processEvents (this=0xa294b0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#26 0x00007f867c30bd5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#27 0x00007f867b867c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#28 0x00007f867b867ed7 in QEventLoop::exec (this=0x7fff24eaa9e0, flags=...) at kernel/qeventloop.cpp:204
#29 0x00007f867b86cf67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#30 0x000000000040a34e in main (argc=5, argv=0x7fff24eaaea8) at /build/buildd/skanlite-0.8/src/main.cpp:84

This bug may be a duplicate of or related to bug 303867.

Possible duplicates by query: bug 303867.

Reported using DrKonqi
Comment 1 Kåre Särs 2012-08-07 18:08:35 UTC
Thanks for the report.

Can you try the same as I suggested in bug 303867 ?

(Run scaniage or skanlite with the sane debug enabled)

SANE_DEBUG_HPLIP=16 scanimage

/Kåre
Comment 2 Kåre Särs 2013-02-11 15:52:07 UTC
Git commit 61d4dca3aadfab1bf7792a363c31a5116a2eb83e by Kåre Särs.
Committed on 11/02/2013 at 16:48.
Pushed by sars into branch 'master'.

Fix crash on unexpected data and optimize QImage generation
FIXED-IN: 4.10.1

M  +41   -54   libksane/ksane_widget.cpp

http://commits.kde.org/libksane/61d4dca3aadfab1bf7792a363c31a5116a2eb83e
Comment 3 Kåre Särs 2013-02-11 16:00:53 UTC
Git commit da9a5932a29e28eea9a8c5b267cb8e6cac006797 by Kåre Särs.
Committed on 11/02/2013 at 16:48.
Pushed by sars into branch 'KDE/4.10'.

Fix crash on unexpected data and optimize QImage generation
FIXED-IN: 4.10.1

M  +41   -54   libksane/ksane_widget.cpp

http://commits.kde.org/libksane/da9a5932a29e28eea9a8c5b267cb8e6cac006797