Bug 283300 - Klipper crashes when creating barcode for empty entry.
Summary: Klipper crashes when creating barcode for empty entry.
Status: RESOLVED FIXED
Alias: None
Product: klipper
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Sune Vuorela
URL:
Keywords:
: 291529 291614 332218 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-04 09:05 UTC by Thomas Dreibholz
Modified: 2014-03-16 16:41 UTC (History)
7 users (show)

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


Attachments
New crash information added by DrKonqi (10.01 KB, text/plain)
2011-11-30 20:55 UTC, arrenlex
Details
New crash information added by DrKonqi (10.01 KB, text/plain)
2011-11-30 20:55 UTC, arrenlex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Dreibholz 2011-10-04 09:05:42 UTC
Application: klipper (v0.9.7)
KDE Platform Version: 4.7.1 (4.7.1)
Qt Version: 4.7.2
Operating System: Linux 3.0.0dreibholz x86_64
Distribution: Ubuntu 11.04

-- Information about the crash:
- What I was doing when the application crashed:
Klipper (KDE 4.7.1, Kubuntu, 64-bit) has crashed when using menu in control bar.

-- Backtrace:
Application: Klipper (klipper), signal: Segmentation fault
[KCrash Handler]
#6  0x00007fcb73b7c2f5 in prison::DataMatrixBarcode::toImage(QSizeF const&) () from /usr/lib/libprison.so.0
#7  0x00007fcb73b7b501 in prison::AbstractBarcode::paint(QPainter*, QRectF const&) () from /usr/lib/libprison.so.0
#8  0x00007fcb73b7bb01 in prison::BarcodeWidget::paintEvent(QPaintEvent*) () from /usr/lib/libprison.so.0
#9  0x00007fcb7250ac7a in QWidget::event (this=0x1ac8760, event=0x7fff19fdc6a0) at kernel/qwidget.cpp:8405
#10 0x00007fcb724b99f4 in QApplicationPrivate::notify_helper (this=0x173c690, receiver=0x1ac8760, e=0x7fff19fdc6a0) at kernel/qapplication.cpp:4462
#11 0x00007fcb724be3ba in QApplication::notify (this=<value optimized out>, receiver=0x1ac8760, e=0x7fff19fdc6a0) at kernel/qapplication.cpp:4341
#12 0x00007fcb746ffb86 in KApplication::notify (this=0x7fff19fdfac0, receiver=0x1ac8760, event=0x7fff19fdc6a0) at ../../kdeui/kernel/kapplication.cpp:311
#13 0x00007fcb730fc49c in QCoreApplication::notifyInternal (this=0x7fff19fdfac0, receiver=0x1ac8760, event=0x7fff19fdc6a0) at kernel/qcoreapplication.cpp:731
#14 0x00007fcb72507acd in sendSpontaneousEvent (this=0x1ac4d40, pdev=0x18f3868, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x18f3950) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#15 QWidgetPrivate::drawWidget (this=0x1ac4d40, pdev=0x18f3868, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x18f3950) at kernel/qwidget.cpp:5492
#16 0x00007fcb725086e2 in QWidgetPrivate::paintSiblingsRecursive (this=0x1ac3000, pdev=0x18f3868, siblings=..., index=<value optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x18f3950) at kernel/qwidget.cpp:5699
#17 0x00007fcb7250780c in QWidgetPrivate::drawWidget (this=0x1ac3000, pdev=0x18f3868, rgn=..., offset=..., flags=<value optimized out>, sharedPainter=0x0, backingStore=0x18f3950) at kernel/qwidget.cpp:5545
#18 0x00007fcb725086e2 in QWidgetPrivate::paintSiblingsRecursive (this=0x1ac3580, pdev=0x18f3868, siblings=..., index=<value optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x18f3950) at kernel/qwidget.cpp:5699
#19 0x00007fcb7250780c in QWidgetPrivate::drawWidget (this=0x1ac3580, pdev=0x18f3868, rgn=..., offset=..., flags=<value optimized out>, sharedPainter=0x0, backingStore=0x18f3950) at kernel/qwidget.cpp:5545
#20 0x00007fcb726ce9eb in QWidgetBackingStore::sync (this=0x18f3950) at painting/qbackingstore.cpp:1333
#21 0x00007fcb726ced39 in QWidgetBackingStore::sync (this=0x18f3950, exposedWidget=0x7fff19fddfa0, exposedRegion=...) at painting/qbackingstore.cpp:1130
#22 0x00007fcb72539e92 in QETWidget::translatePaintEvent (this=0x7fff19fddfa0, event=<value optimized out>) at kernel/qapplication_x11.cpp:5457
#23 0x00007fcb7253aedb in QApplication::x11ProcessEvent (this=0x7fff19fdfac0, event=0x7fff19fddc40) at kernel/qapplication_x11.cpp:3580
#24 0x00007fcb72563842 in x11EventSourceDispatch (s=0x17401d0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#25 0x00007fcb6eefdbcd in g_main_dispatch (context=0x173f0e0) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:2440
#26 g_main_context_dispatch (context=0x173f0e0) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:3013
#27 0x00007fcb6eefe3a8 in g_main_context_iterate (context=0x173f0e0, block=<value optimized out>, dispatch=1, self=<value optimized out>) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:3091
#28 0x00007fcb6eefe639 in g_main_context_iteration (context=0x173f0e0, may_block=1) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:3154
#29 0x00007fcb731273ef in QEventDispatcherGlib::processEvents (this=0x16ef490, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#30 0x00007fcb725634de in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#31 0x00007fcb730fb882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#32 0x00007fcb730fbabc in QEventLoop::exec (this=0x7fff19fddf40, flags=...) at kernel/qeventloop.cpp:201
#33 0x00007fcb7297afd6 in QDialog::exec (this=0x7fff19fddfa0) at dialogs/qdialog.cpp:552
#34 0x00007fcb74edc1b4 in Klipper::slotShowBarcode (this=<value optimized out>) at ../../klipper/klipper.cpp:1160
#35 0x00007fcb74ede2ad in Klipper::qt_metacall (this=0x185a4d0, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0x7fff19fde1c0) at ./klipper.moc:213
#36 0x00007fcb731115f8 in QMetaObject::activate (sender=0x18c7550, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fff19fde1c0) at kernel/qobject.cpp:3287
#37 0x00007fcb724b3122 in QAction::triggered (this=<value optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#38 0x00007fcb724b330f in QAction::activate (this=0x18c7550, event=<value optimized out>) at kernel/qaction.cpp:1257
#39 0x00007fcb728f79f3 in QMenuPrivate::activateCausedStack (this=0x185b560, causedStack=..., action=0x18c7550, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:993
#40 0x00007fcb728fd9aa in QMenuPrivate::activateAction (this=0x185b560, action=0x18c7550, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1085
#41 0x00007fcb747bf520 in KMenu::mouseReleaseEvent (this=0x1858af0, e=0x7fff19fdee00) at ../../kdeui/widgets/kmenu.cpp:464
#42 0x00007fcb7250acc8 in QWidget::event (this=0x1858af0, event=0x7fff19fdee00) at kernel/qwidget.cpp:8259
#43 0x00007fcb728feb8b in QMenu::event (this=0x1858af0, e=0x7fff19fdee00) at widgets/qmenu.cpp:2415
#44 0x00007fcb724b99f4 in QApplicationPrivate::notify_helper (this=0x173c690, receiver=0x1858af0, e=0x7fff19fdee00) at kernel/qapplication.cpp:4462
#45 0x00007fcb724bedc3 in QApplication::notify (this=<value optimized out>, receiver=0x1858af0, e=0x7fff19fdee00) at kernel/qapplication.cpp:4023
#46 0x00007fcb746ffb86 in KApplication::notify (this=0x7fff19fdfac0, receiver=0x1858af0, event=0x7fff19fdee00) at ../../kdeui/kernel/kapplication.cpp:311
#47 0x00007fcb730fc49c in QCoreApplication::notifyInternal (this=0x7fff19fdfac0, receiver=0x1858af0, event=0x7fff19fdee00) at kernel/qcoreapplication.cpp:731
#48 0x00007fcb724baa1d in sendEvent (receiver=0x1858af0, event=0x7fff19fdee00, alienWidget=0x0, nativeWidget=0x1858af0, buttonDown=0x7fcb72f9d218, lastMouseReceiver=..., spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#49 QApplicationPrivate::sendMouseEvent (receiver=0x1858af0, event=0x7fff19fdee00, alienWidget=0x0, nativeWidget=0x1858af0, buttonDown=0x7fcb72f9d218, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3122
#50 0x00007fcb7253c190 in QETWidget::translateMouseEvent (this=0x1858af0, event=<value optimized out>) at kernel/qapplication_x11.cpp:4558
#51 0x00007fcb7253aab7 in QApplication::x11ProcessEvent (this=0x7fff19fdfac0, event=0x7fff19fdf750) at kernel/qapplication_x11.cpp:3680
#52 0x00007fcb72563842 in x11EventSourceDispatch (s=0x17401d0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#53 0x00007fcb6eefdbcd in g_main_dispatch (context=0x173f0e0) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:2440
#54 g_main_context_dispatch (context=0x173f0e0) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:3013
#55 0x00007fcb6eefe3a8 in g_main_context_iterate (context=0x173f0e0, block=<value optimized out>, dispatch=1, self=<value optimized out>) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:3091
#56 0x00007fcb6eefe639 in g_main_context_iteration (context=0x173f0e0, may_block=1) at /build/buildd/glib2.0-2.28.6/./glib/gmain.c:3154
#57 0x00007fcb731273ef in QEventDispatcherGlib::processEvents (this=0x16ef490, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#58 0x00007fcb725634de in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#59 0x00007fcb730fb882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#60 0x00007fcb730fbabc in QEventLoop::exec (this=0x7fff19fdfa50, flags=...) at kernel/qeventloop.cpp:201
#61 0x00007fcb730ffecb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#62 0x00007fcb74ef2e58 in kdemain (argc=<value optimized out>, argv=<value optimized out>) at ../../klipper/main.cpp:52
#63 0x00007fcb74b4beff in __libc_start_main (main=0x400740 <main(int, char**)>, argc=1, ubp_av=0x7fff19fdfc08, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff19fdfbf8) at libc-start.c:226
#64 0x0000000000400669 in _start ()

Reported using DrKonqi
Comment 1 Sune Vuorela 2011-10-04 14:16:30 UTC
Hi

Can you try install libprison-dbg and reproduce and provide the stacktrace?

/Sune
 - prison hacker
Comment 2 arrenlex 2011-11-30 20:55:55 UTC
Created attachment 66237 [details]
New crash information added by DrKonqi

klipper (v0.9.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed:

Klipper had three entries, one of which was seemingly empty (perhaps whitespace or some weird problem with klipper?)

The empty entry was the active item.

I opened the menu and clicked 'create barcode'. At this point, klipper crashed.

I installed libprison-dbg as was requested so hopefully my backtrace will be useful.

-- Backtrace (Reduced):
#7  0x003e2224 in prison::DataMatrixBarcode::toImage (this=0x8a87e00, size=...) at ../../../lib/prison/datamatrixbarcode.cpp:64
#8  0x003e1136 in prison::AbstractBarcode::paint (this=0x8a87e00, painter=0x8bab9c0, targetrect=...) at ../../../lib/prison/abstractbarcode.cpp:59
#9  0x003e1a0d in prison::BarcodeWidget::paintEvent (this=0x892d3f0, event=0xbf86bd14) at ../../../lib/prison/barcodewidget.cpp:68
#10 0x011aff3e in QWidget::event (this=0x892d3f0, event=0xbf86bd14) at kernel/qwidget.cpp:8441
#11 0x01155d54 in notify_helper (e=0xbf86bd14, receiver=0x892d3f0, this=0x869b158) at kernel/qapplication.cpp:4486
Comment 3 arrenlex 2011-11-30 20:55:55 UTC
Created attachment 66238 [details]
New crash information added by DrKonqi

klipper (v0.9.7) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed:

Klipper had three entries, one of which was seemingly empty (perhaps whitespace or some weird problem with klipper?)

The empty entry was the active item.

I opened the menu and clicked 'create barcode'. At this point, klipper crashed.

I installed libprison-dbg as was requested so hopefully my backtrace will be useful.

-- Backtrace (Reduced):
#7  0x003e2224 in prison::DataMatrixBarcode::toImage (this=0x8a87e00, size=...) at ../../../lib/prison/datamatrixbarcode.cpp:64
#8  0x003e1136 in prison::AbstractBarcode::paint (this=0x8a87e00, painter=0x8bab9c0, targetrect=...) at ../../../lib/prison/abstractbarcode.cpp:59
#9  0x003e1a0d in prison::BarcodeWidget::paintEvent (this=0x892d3f0, event=0xbf86bd14) at ../../../lib/prison/barcodewidget.cpp:68
#10 0x011aff3e in QWidget::event (this=0x892d3f0, event=0xbf86bd14) at kernel/qwidget.cpp:8441
#11 0x01155d54 in notify_helper (e=0xbf86bd14, receiver=0x892d3f0, this=0x869b158) at kernel/qapplication.cpp:4486
Comment 4 auxsvr 2011-12-05 20:14:19 UTC
In my case, the empty entry was a carriage return, because I had selected a line by accident.
Comment 5 Jekyll Wu 2011-12-19 16:10:43 UTC
I can reproduce the crash every time. Just copy one empty line which only contains spaces, then ask klipper to create barcode for it.

Both klipper and libprison are built from master code.
Comment 6 Sune Vuorela 2011-12-19 17:04:38 UTC
Git commit d9ccb1df62bb8ecfc1f6a6dc6b4574d2e55fa743 by Sune Vuorela.
Committed on 19/12/2011 at 17:57.
Pushed by sune into branch 'master'.

Don't crash on empty strings in DataMatrixBarcode

BUG: 283300

M  +6    -2    lib/prison/datamatrixbarcode.cpp

http://commits.kde.org/prison/d9ccb1df62bb8ecfc1f6a6dc6b4574d2e55fa743
Comment 7 Jekyll Wu 2012-01-16 03:22:24 UTC
*** Bug 291614 has been marked as a duplicate of this bug. ***
Comment 8 Jekyll Wu 2012-01-16 03:22:31 UTC
*** Bug 291529 has been marked as a duplicate of this bug. ***
Comment 9 Martin Koller 2014-03-16 16:41:31 UTC
*** Bug 332218 has been marked as a duplicate of this bug. ***