Bug 285917 - crash when printing is started
Summary: crash when printing is started
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-06 17:47 UTC by Steffen Michalek
Modified: 2011-12-03 17:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
valgrind log (69.68 KB, text/plain)
2011-11-08 18:04 UTC, Steffen Michalek
Details
New crash information added by DrKonqi (9.69 KB, text/plain)
2011-12-03 14:49 UTC, Friedrich Teichmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Michalek 2011-11-06 17:47:44 UTC
Application: korganizer (4.7.2- ())
KDE Platform Version: 4.7.2 (4.7.2)
Qt Version: 4.7.4
Operating System: Linux 3.0.0-12-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
I wanted to print,
1 week, landscape, with colors, ...
Choosing the printers' properties was o.k.,
crash immediately after pressing the print-button.

The crash can be reproduced every time.

-- Backtrace:
Application: KOrganizer (korganizer), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fec720137a0 (LWP 16933))]

Thread 4 (Thread 0x7fec55d66700 (LWP 16936)):
#0  0x00007fec6e62b773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fec6832ef68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fec6832f429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fec6efa9f3e in QEventDispatcherGlib::processEvents (this=0x7fec500008b0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fec6ef7dcf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fec6ef7def7 in QEventLoop::exec (this=0x7fec55d65db0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fec6ee9527f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#7  0x00007fec6ef60cbf in QInotifyFileSystemWatcherEngine::run (this=0x27a3fe0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fec6ee97d05 in QThreadPrivate::start (arg=0x27a3fe0) at thread/qthread_unix.cpp:331
#9  0x00007fec68800efc in start_thread (arg=0x7fec55d66700) at pthread_create.c:304
#10 0x00007fec6e63789d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fec4f3b0700 (LWP 17110)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fec6ee981ab in wait (time=18446744073709551615, this=0x33a4b20) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x33b0db8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fec6fe6e7d4 in QFileInfoGatherer::run (this=0x33b0da8) at dialogs/qfileinfogatherer.cpp:214
#4  0x00007fec6ee97d05 in QThreadPrivate::start (arg=0x33b0da8) at thread/qthread_unix.cpp:331
#5  0x00007fec68800efc in start_thread (arg=0x7fec4f3b0700) at pthread_create.c:304
#6  0x00007fec6e63789d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fec4ebaf700 (LWP 17111)):
#0  0x00007fec6e62b773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fec6832ef68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fec6832f429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fec6efa9f3e in QEventDispatcherGlib::processEvents (this=0x3367a80, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fec6ef7dcf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fec6ef7def7 in QEventLoop::exec (this=0x7fec4ebaedb0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fec6ee9527f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#7  0x00007fec6ef60cbf in QInotifyFileSystemWatcherEngine::run (this=0x33a4c20) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fec6ee97d05 in QThreadPrivate::start (arg=0x33a4c20) at thread/qthread_unix.cpp:331
#9  0x00007fec68800efc in start_thread (arg=0x7fec4ebaf700) at pthread_create.c:304
#10 0x00007fec6e63789d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fec720137a0 (LWP 16933)):
[KCrash Handler]
#6  ref (this=0x49) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121
#7  ref (this=<optimized out>) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:336
#8  ExternalRefCount (other=..., this=0x7fff06adc6f0) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:399
#9  QSharedPointer (other=..., this=0x7fff06adc6f0) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:475
#10 CalPrintPluginBase::drawAllDayBox (this=0x2abcb60, p=..., eventList_=<optimized out>, qd=<optimized out>, expandable=false, box=..., excludeConfidential=false, excludePrivate=false) at ../../korganizer/printing/calprintpluginbase.cpp:802
#11 0x00007fec7098820f in CalPrintPluginBase::drawTimeTable (this=0x2abcb60, p=..., fromDate=<optimized out>, toDate=..., fromTime=..., toTime=..., box=..., includeDescription=false, excludeTime=true, excludeConfidential=false, excludePrivate=false) at ../../korganizer/printing/calprintpluginbase.cpp:1411
#12 0x00007fec70994907 in CalPrintWeek::print (this=0x2abcb60, p=..., width=1063, height=31) at ../../korganizer/printing/calprintdefaultplugins.cpp:1130
#13 0x00007fec709801d0 in CalPrintPluginBase::doPrint (this=0x2abcb60, printer=<optimized out>) at ../../korganizer/printing/calprintpluginbase.cpp:169
#14 0x00007fec7097c7cc in CalPrinter::doPrint (this=0x32982e0, selectedStyle=0x2abcb60, dlgorientation=CalPrinter::eOrientLandscape, preview=false) at ../../korganizer/printing/calprinter.cpp:158
#15 0x00007fec7097e592 in CalPrinter::print (this=0x32982e0, type=300, fd=..., td=..., selectedIncidences=<optimized out>, preview=false) at ../../korganizer/printing/calprinter.cpp:115
#16 0x00007fec70931d96 in CalendarView::print (this=0x2281ef0) at ../../korganizer/calendarview.cpp:1959
#17 0x00007fec7093587d in CalendarView::qt_metacall (this=0x2281ef0, _c=QMetaObject::InvokeMetaMethod, _id=112, _a=0x7fff06add300) at ./calendarview.moc:533
#18 0x00007fec6ef91eba in QMetaObject::activate (sender=0x242c030, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff06add300) at kernel/qobject.cpp:3278
#19 0x00007fec6f978b62 in QAction::triggered (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#20 0x00007fec6f978d4f in QAction::activate (this=0x242c030, event=<optimized out>) at kernel/qaction.cpp:1257
#21 0x00007fec6fdb3609 in QMenuPrivate::activateCausedStack (this=0x2801560, causedStack=..., action=0x242c030, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1005
#22 0x00007fec6fdb9252 in QMenuPrivate::activateAction (this=0x2801560, action=0x242c030, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1097
#23 0x00007fec71adfcb0 in KMenu::mouseReleaseEvent (this=0x27fc3b0, e=0x7fff06addd10) at ../../kdeui/widgets/kmenu.cpp:464
#24 0x00007fec6f9cfc9a in QWidget::event (this=0x27fc3b0, event=0x7fff06addd10) at kernel/qwidget.cpp:8295
#25 0x00007fec6fdba7fb in QMenu::event (this=0x27fc3b0, e=0x7fff06addd10) at widgets/qmenu.cpp:2405
#26 0x00007fec6f97f424 in notify_helper (e=0x7fff06addd10, receiver=0x27fc3b0, this=0x217c5b0) at kernel/qapplication.cpp:4486
#27 QApplicationPrivate::notify_helper (this=0x217c5b0, receiver=0x27fc3b0, e=0x7fff06addd10) at kernel/qapplication.cpp:4458
#28 0x00007fec6f984c6b in QApplication::notify (this=<optimized out>, receiver=0x27fc3b0, e=0x7fff06addd10) at kernel/qapplication.cpp:4047
#29 0x00007fec71a1e126 in KApplication::notify (this=0x7fff06ade950, receiver=0x27fc3b0, event=0x7fff06addd10) at ../../kdeui/kernel/kapplication.cpp:311
#30 0x00007fec6ef7eafc in QCoreApplication::notifyInternal (this=0x7fff06ade950, receiver=0x27fc3b0, event=0x7fff06addd10) at kernel/qcoreapplication.cpp:787
#31 0x00007fec6f9803f2 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#32 QApplicationPrivate::sendMouseEvent (receiver=0x27fc3b0, event=0x7fff06addd10, alienWidget=0x0, nativeWidget=0x27fc3b0, buttonDown=0x0, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3146
#33 0x00007fec6fa00001 in QETWidget::translateMouseEvent (this=0x27fc3b0, event=<optimized out>) at kernel/qapplication_x11.cpp:4502
#34 0x00007fec6f9fe8be in QApplication::x11ProcessEvent (this=0x7fff06ade950, event=0x7fff06ade530) at kernel/qapplication_x11.cpp:3690
#35 0x00007fec6fa27412 in x11EventSourceDispatch (s=0x217ced0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#36 0x00007fec6832ea5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007fec6832f258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007fec6832f429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007fec6efa9ed6 in QEventDispatcherGlib::processEvents (this=0x2148170, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#40 0x00007fec6fa2707e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#41 0x00007fec6ef7dcf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#42 0x00007fec6ef7def7 in QEventLoop::exec (this=0x7fff06ade900, flags=...) at kernel/qeventloop.cpp:201
#43 0x00007fec6ef82789 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#44 0x0000000000407e46 in main (argc=<optimized out>, argv=<optimized out>) at ../../korganizer/main.cpp:67

Reported using DrKonqi
Comment 1 Sergio Martins 2011-11-06 22:47:47 UTC
Can't reproduce.

Please attach a valgrind report.

$ valgrind korganizer --nofork &> valgrind.log
Comment 2 Steffen Michalek 2011-11-08 18:04:17 UTC
Created attachment 65405 [details]
valgrind log

Did some other things (check a calendars' properties ,..)
then wanted to print two weeks.

Today morning, printing one single page with one week
was successful, printing two weeks wasn't.
Comment 3 Friedrich Teichmann 2011-12-03 14:49:05 UTC
Created attachment 66339 [details]
New crash information added by DrKonqi

korganizer (4.7.2- ()) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed: After choosing "print" and choosing the correct printer: crash

-- Backtrace (Reduced):
#9  ExternalRefCount (other=<optimized out>, this=<optimized out>) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:399
#10 QSharedPointer (other=<optimized out>, this=<optimized out>) at /usr/include/qt4/QtCore/qsharedpointer_impl.h:475
#11 CalPrintPluginBase::drawAllDayBox (this=0xa6f9b70, p=..., eventList_=..., qd=..., expandable=false, box=..., excludeConfidential=false, excludePrivate=false) at ../../korganizer/printing/calprintpluginbase.cpp:802
#12 0x0087f0ca in CalPrintPluginBase::drawTimeTable (this=0xa6f9b70, p=..., fromDate=..., toDate=..., fromTime=..., toTime=..., box=..., includeDescription=false, excludeTime=false, excludeConfidential=false, excludePrivate=false) at ../../korganizer/printing/calprintpluginbase.cpp:1411
#13 0x0088ce30 in CalPrintWeek::print (this=0xa6f9b70, p=..., width=1092, height=768) at ../../korganizer/printing/calprintdefaultplugins.cpp:1130
Comment 4 Sergio Martins 2011-12-03 16:45:47 UTC
Managed to reproduce it finally.

Next time, please report all options you used, or post a print-screen of the dialog.
Comment 5 Sergio Martins 2011-12-03 17:47:15 UTC
Git commit 071a240287477c9009f7bbe40c8d16c6280c2959 by Sergio Martins.
Committed on 03/12/2011 at 18:38.
Pushed by smartins into branch 'master'.

Fix crash when printing.

Don't ignore the return value of erase and/or don't assume
vector.end() never changes.

BUG: 285917

M  +3    -3    korganizer/printing/calprintpluginbase.cpp

http://commits.kde.org/kdepim/071a240287477c9009f7bbe40c8d16c6280c2959
Comment 6 Sergio Martins 2011-12-03 17:51:12 UTC
Git commit c28216b085c97f6ce4a4900cb9495b043659b0b0 by Sergio Martins.
Committed on 03/12/2011 at 18:38.
Pushed by smartins into branch 'KDE/4.7'.

Fix crash when printing.

Don't ignore the return value of erase and/or don't assume
vector.end() never changes.

BUG: 285917

M  +3    -3    korganizer/printing/calprintpluginbase.cpp

http://commits.kde.org/kdepim/c28216b085c97f6ce4a4900cb9495b043659b0b0