Bug 334293 - Kexi reports crash when opening in data view
Summary: Kexi reports crash when opening in data view
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: Reports and Printouts (show other bugs)
Version: 2.9 Alpha
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Jarosław Staniek
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-05-03 19:17 UTC by Adam Pigg
Modified: 2014-05-12 08:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Pigg 2014-05-03 19:17:59 UTC
Application: kexi (2.9 Pre-Alpha)
KDE Platform Version: 4.13.0 (Compiled from sources)
Qt Version: 4.8.5
Operating System: Linux 3.14.2-25.g1474ea5-desktop x86_64
Distribution: "openSUSE 13.1 (Bottle) (x86_64)"

-- Information about the crash:
Opening a report in data view, or switching from design to data view.

The crash can be reproduced every time.

-- Backtrace:
Application: Kexi (kexi), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f43496ff880 (LWP 10970))]

Thread 2 (Thread 0x7f433151a700 (LWP 10989)):
#0  0x00007f43444ce560 in __pthread_mutex_unlock_usercnt () from /lib64/libpthread.so.0
#1  0x00007f433d6ad2c1 in g_mutex_unlock () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f433d66cca0 in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f433d66d523 in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f433d66d70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f434488ed76 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007f4344860d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#7  0x00007f4344861005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#8  0x00007f434475ffef in QThread::exec() () from /usr/lib64/libQtCore.so.4
#9  0x00007f4344842513 in ?? () from /usr/lib64/libQtCore.so.4
#10 0x00007f434476268f in ?? () from /usr/lib64/libQtCore.so.4
#11 0x00007f43444cb0db in start_thread () from /lib64/libpthread.so.0
#12 0x00007f434284190d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f43496ff880 (LWP 10970)):
[KCrash Handler]
#5  0x00007f433bad8500 in Q3ScrollView::bottomMargin() const () from /usr/lib64/libQt3Support.so.4
#6  0x00007f4341dc5a38 in KexiRecordNavigator::KexiRecordNavigator (this=0x1c05b40, parent=0x1bd3a30, parentView=0x0) at /home/piggz/src/calligra/kexi/widget/utils/kexirecordnavigator.cpp:123
#7  0x00007f4330366630 in KexiReportView::KexiReportView (this=0x1bd3a30, parent=<optimized out>) at /home/piggz/src/calligra/kexi/plugins/reports/kexireportview.cpp:70
#8  0x00007f4330363860 in KexiReportPart::createView (this=<optimized out>, parent=0x1bcf1d0, window=<optimized out>, item=..., viewMode=<optimized out>) at /home/piggz/src/calligra/kexi/plugins/reports/kexireportpart.cpp:92
#9  0x00007f4348a17e45 in KexiWindow::switchToViewMode (this=this@entry=0x1bcf1d0, newViewMode=newViewMode@entry=Kexi::DataViewMode, staticObjectArgs=staticObjectArgs@entry=0x0, proposeOpeningInTextViewModeBecauseOfProblems=@0x7fffde41028e: false) at /home/piggz/src/calligra/kexi/core/KexiWindow.cpp:499
#10 0x00007f4348a23a8d in KexiPart::Part::openInstance (this=this@entry=0x18df240, parent=0x1bb8410, item=..., viewMode=viewMode@entry=Kexi::DataViewMode, staticObjectArgs=staticObjectArgs@entry=0x0) at /home/piggz/src/calligra/kexi/core/kexipart.cpp:284
#11 0x00007f4348a0a927 in KexiProject::openObject (this=0x190b4d0, parent=parent@entry=0x1bb8410, item=..., viewMode=viewMode@entry=Kexi::DataViewMode, staticObjectArgs=staticObjectArgs@entry=0x0) at /home/piggz/src/calligra/kexi/core/kexiproject.cpp:863
#12 0x00007f4348cd61df in KexiMainWindow::openObject (this=0x173bb30, item=0x1a076e0, viewMode=Kexi::DataViewMode, openingCancelled=<optimized out>, staticObjectArgs=0x0, errorMessage=<optimized out>) at /home/piggz/src/calligra/kexi/main/KexiMainWindow.cpp:3100
#13 0x00007f4348cd5a4c in KexiMainWindow::openObjectFromNavigator (this=0x173bb30, item=0x1a076e0, viewMode=Kexi::DataViewMode, openingCancelled=@0x7fffde41063f: false) at /home/piggz/src/calligra/kexi/main/KexiMainWindow.cpp:3201
#14 0x00007f4348cd5b3e in KexiMainWindow::openObjectFromNavigator (this=<optimized out>, item=<optimized out>, viewMode=<optimized out>) at /home/piggz/src/calligra/kexi/main/KexiMainWindow.cpp:3161
#15 0x00007f4348cdc236 in KexiMainWindow::qt_static_metacall (_o=0x173bb30, _id=29178416, _a=0x7fffde4107c0, _c=<optimized out>) at /home/piggz/src/calligra-build/kexi/main/KexiMainWindow.moc:468
#16 0x00007f4344875d68 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#17 0x00007f434200f950 in KexiProjectNavigator::openOrActivateItem (this=this@entry=0x18692f0, _t1=0x1a076e0, _t2=_t2@entry=Kexi::DataViewMode) at /home/piggz/src/calligra-build/kexi/widget/moc_KexiProjectNavigator.cpp:198
#18 0x00007f434201960e in KexiProjectNavigator::slotExecuteItem (this=0x18692f0, vitem=...) at /home/piggz/src/calligra/kexi/widget/navigator/KexiProjectNavigator.cpp:345
#19 0x00007f4344875d68 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#20 0x00007f4343c53b75 in QAbstractItemView::doubleClicked(QModelIndex const&) () from /usr/lib64/libQtGui.so.4
#21 0x00007f4343c9a033 in QTreeView::mouseDoubleClickEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#22 0x00007f43437b107e in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#23 0x00007f4343b4dcae in QFrame::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#24 0x00007f4343c5cf33 in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib64/libQtGui.so.4
#25 0x00007f4343c9be50 in QTreeView::viewportEvent(QEvent*) () from /usr/lib64/libQtGui.so.4
#26 0x00007f4344862216 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#27 0x00007f43437619cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#28 0x00007f43437680ed in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#29 0x00007f43452c847a in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#30 0x00007f43448620ad in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#31 0x00007f43437678a3 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQtGui.so.4
#32 0x00007f43437d90bb in ?? () from /usr/lib64/libQtGui.so.4
#33 0x00007f43437d7b2c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#34 0x00007f43437fe9c2 in ?? () from /usr/lib64/libQtGui.so.4
#35 0x00007f433d66d316 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#36 0x00007f433d66d668 in ?? () from /usr/lib64/libglib-2.0.so.0
#37 0x00007f433d66d70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#38 0x00007f434488ed55 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#39 0x00007f43437fea76 in ?? () from /usr/lib64/libQtGui.so.4
#40 0x00007f4344860d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#41 0x00007f4344861005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#42 0x00007f434486613b in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#43 0x0000000000400b31 in main (argc=<optimized out>, argv=0x7fffde411978) at /home/piggz/src/calligra/kexi/main.cpp:36

Reported using DrKonqi
Comment 1 Jarosław Staniek 2014-05-03 19:46:13 UTC
Confirmed, recent port to Qt4 completely ignored reports.
Comment 2 Adam Pigg 2014-05-03 19:48:22 UTC
Yes, i looked at the backtrace and instantly blamed you :)

Sooner tableview is ported the better, then there is no confusing q3 code!
Comment 3 Jarosław Staniek 2014-05-03 20:30:30 UTC
Thanks for the deep analysis guys.

@Adam regarding opened views, maybe there's something wrong with this hack: KexiWindow::isDesignModePreloadedForTextModeHackUsed() - happens only for queries since only queries use Text mode.
Comment 4 Jarosław Staniek 2014-05-03 20:31:35 UTC
@Adam yeah, we have time before 2.9.0. This crash shall be fixed quickly and temporarily though since it's similar case to the table view.
Comment 5 Jarosław Staniek 2014-05-09 23:25:17 UTC
Git commit 1cff375660e7d42df3e5740964049baae128dbdd by Jaroslaw Staniek.
Committed on 08/05/2014 at 08:19.
Pushed by staniek into branch 'master'.

Fix crash introduced in reports after porting forms to Qt4

(that was commit 1c53aa8b9e09681)

Put the page navigator is put aside of the report area's horizontal
scroll bar like we do in table and form views.

REVIEW:118046

M  +1    -7    kexi/plugins/forms/kexiformscrollview.cpp
M  +7    -2    kexi/plugins/reports/kexireportview.cpp
M  +14   -4    kexi/widget/utils/kexirecordnavigator.cpp
M  +7    -3    kexi/widget/utils/kexirecordnavigator.h

http://commits.kde.org/calligra/1cff375660e7d42df3e5740964049baae128dbdd
Comment 6 Ian Balchin 2014-05-12 08:12:46 UTC
I was about to submit same bug this morning, but caught it as a recently fixed bug. Did git pull and rebuilt, confirm also appears fixed.

Ian