Bug 338666 - Kalzium crashes when selecting >File >Export Data...
Summary: Kalzium crashes when selecting >File >Export Data...
Status: RESOLVED FIXED
Alias: None
Product: kalzium
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Kalzium Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-08-29 21:32 UTC by Martin Walch
Modified: 2014-09-15 16:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Walch 2014-08-29 21:32:09 UTC
Application: kalzium (2.4.02)
KDE Platform Version: 4.14.0 (Compiled from sources)
Qt Version: 4.8.5
Operating System: Linux 3.15.10-gentoo-gnu x86_64
Distribution: "NAME=Gentoo"

-- Information about the crash:
- What I was doing when the application crashed:
I clicked on >File >Export Data...

- Custom settings of the application:
Compiled with gcc 4.7.3 on Gentoo with these CXXFLAGS:
-O1 -pipe -g -ggdb -fno-omit-frame-pointer

Crash does not happen when turning off optimization (-O0). It also does not happen when starting Kalzium with the --sync switch. In each (compiler) configuration I tried so far, the crash either happens always or never.

The crash can be reproduced every time.

-- Backtrace:
Application: Kalzium (kalzium), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#6  show (this=0x2f34312d38302d33) at /usr/include/qt4/QtGui/qwidget.h:497
#7  Kalzium::slotShowExportDialog (this=0x19ab760) at /var/tmp/portage/kde-base/kalzium-4.14.0/work/kalzium-4.14.0/src/kalzium.cpp:551
#8  0x000000000047cb37 in Kalzium::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0x7fff8b0200e0) at /var/tmp/portage/kde-base/kalzium-4.14.0/work/kalzium-4.14.0_build/src/kalzium.moc:99
#9  0x00007fe6750d54ba in QMetaObject::activate (sender=sender@entry=0x1f0e080, m=m@entry=0x7fe6767bad60 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fff8b0200e0) at kernel/qobject.cpp:3547
#10 0x00007fe675d20831 in QAction::triggered (this=this@entry=0x1f0e080, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#11 0x00007fe675d21c49 in QAction::activate (this=this@entry=0x1f0e080, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#12 0x00007fe676147144 in QMenuPrivate::activateCausedStack (this=this@entry=0x1fa9a30, causedStack=..., action=action@entry=0x1f0e080, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1038
#13 0x00007fe67614c55d in QMenuPrivate::activateAction (this=0x1fa9a30, action=0x1f0e080, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1130
#14 0x00007fe676150089 in QMenu::mouseReleaseEvent (this=this@entry=0x1fead10, e=e@entry=0x7fff8b020cc0) at widgets/qmenu.cpp:2372
#15 0x00007fe676d5f101 in KMenu::mouseReleaseEvent (this=0x1fead10, e=0x7fff8b020cc0) at /var/tmp/portage/kde-base/kdelibs-4.14.0/work/kdelibs-4.14.0/kdeui/widgets/kmenu.cpp:464
#16 0x00007fe675d75123 in QWidget::event (this=this@entry=0x1fead10, event=event@entry=0x7fff8b020cc0) at kernel/qwidget.cpp:8376
#17 0x00007fe67614dd2b in QMenu::event (this=0x1fead10, e=0x7fff8b020cc0) at widgets/qmenu.cpp:2481
#18 0x00007fe675d26eac in QApplicationPrivate::notify_helper (this=this@entry=0x1852aa0, receiver=receiver@entry=0x1fead10, e=e@entry=0x7fff8b020cc0) at kernel/qapplication.cpp:4562
#19 0x00007fe675d2a0cb in QApplication::notify (this=this@entry=0x7fff8b0218e0, receiver=receiver@entry=0x1fead10, e=e@entry=0x7fff8b020cc0) at kernel/qapplication.cpp:4105
#20 0x00007fe676ca6016 in KApplication::notify (this=0x7fff8b0218e0, receiver=0x1fead10, event=0x7fff8b020cc0) at /var/tmp/portage/kde-base/kdelibs-4.14.0/work/kdelibs-4.14.0/kdeui/kernel/kapplication.cpp:311
#21 0x00007fe6750c0b9d in QCoreApplication::notifyInternal (this=0x7fff8b0218e0, receiver=receiver@entry=0x1fead10, event=event@entry=0x7fff8b020cc0) at kernel/qcoreapplication.cpp:949
#22 0x00007fe675d2d066 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#23 QApplicationPrivate::sendMouseEvent (receiver=0x1fead10, event=event@entry=0x7fff8b020cc0, alienWidget=0x0, nativeWidget=nativeWidget@entry=0x1fead10, buttonDown=buttonDown@entry=0x7fe6767f61e8 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3173
#24 0x00007fe675da0fb3 in QETWidget::translateMouseEvent (this=this@entry=0x1fead10, event=event@entry=0x7fff8b021410) at kernel/qapplication_x11.cpp:4451
#25 0x00007fe675d9fe3f in QApplication::x11ProcessEvent (this=0x7fff8b0218e0, event=event@entry=0x7fff8b021410) at kernel/qapplication_x11.cpp:3640
#26 0x00007fe675dc8fb2 in x11EventSourceDispatch (s=0x18535e0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#27 0x00007fe6707d48ec in g_main_dispatch (context=0x1850e60) at /var/tmp/portage/dev-libs/glib-2.40.0-r1/work/glib-2.40.0/glib/gmain.c:3064
#28 0x00007fe6707d5670 in g_main_context_dispatch (context=0x1850e60) at /var/tmp/portage/dev-libs/glib-2.40.0-r1/work/glib-2.40.0/glib/gmain.c:3663
#29 0x00007fe6707d5860 in g_main_context_iterate (context=0x1850e60, block=1, dispatch=1, self=0x1855c00) at /var/tmp/portage/dev-libs/glib-2.40.0-r1/work/glib-2.40.0/glib/gmain.c:3734
#30 0x00007fe6707d5924 in g_main_context_iteration (context=0x1850e60, may_block=1) at /var/tmp/portage/dev-libs/glib-2.40.0-r1/work/glib-2.40.0/glib/gmain.c:3795
#31 0x00007fe6750ef6a6 in QEventDispatcherGlib::processEvents (this=0x1851680, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#32 0x00007fe675dc90a2 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007fe6750bf775 in QEventLoop::processEvents (this=this@entry=0x7fff8b021820, flags=...) at kernel/qeventloop.cpp:149
#34 0x00007fe6750bfa26 in QEventLoop::exec (this=this@entry=0x7fff8b021820, flags=...) at kernel/qeventloop.cpp:204
#35 0x00007fe6750c4e5a in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#36 0x00007fe675d257c9 in QApplication::exec () at kernel/qapplication.cpp:3823
#37 0x0000000000484313 in main (argc=1, argv=0x7fff8b022108) at /var/tmp/portage/kde-base/kalzium-4.14.0/work/kalzium-4.14.0/src/main.cpp:116

Reported using DrKonqi
Comment 1 Martin Walch 2014-09-15 16:39:36 UTC
Git commit 287791bb40d416e4d6eb3f4b45fa40f89fbe883f by Martin Walch.
Committed on 15/09/2014 at 14:21.
Pushed by martinwalch into branch 'master'.

Fix bug #338666: "Kalzium crashes when selecting >File >Export Data..."

Problem is easy to spot with valgrind:
The private ExportDialog *m_exportDialog is not explicitely initialized
with 0, so later calling "if (!m_exportDialog)" may fail.

This accidentally slipped in with a header cleanup (commit d36687d50...)

Easy fix: initialize the pointer with 0 just like all the others.
FIXED-IN: 4.14.2

M  +1    -0    src/kalzium.cpp

http://commits.kde.org/kalzium/287791bb40d416e4d6eb3f4b45fa40f89fbe883f