Bug 342371 - Kexi crashed after attempt to change alignment in a text field
Summary: Kexi crashed after attempt to change alignment in a text field
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: Forms (show other bugs)
Version: 2.8.5
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Jarosław Staniek
URL:
Keywords: drkonqi
: 281246 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-31 14:06 UTC by zwerg8_thorin
Modified: 2017-08-05 22:02 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.0.2


Attachments
attachment-4185-0.html (2.38 KB, text/html)
2015-01-02 21:33 UTC, zwerg8_thorin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zwerg8_thorin 2014-12-31 14:06:48 UTC
Application: kexi (2.8.5)
KDE Platform Version: 4.14.3
Qt Version: 4.8.6
Operating System: Linux 3.16.7-7-desktop x86_64
Distribution: "openSUSE 13.2 (Harlequin) (x86_64)"

-- Information about the crash:
I tried to edit a text field in a 2nd form, from alignment left to alignment right, when Kexi crashed.

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 0x7f5200ab97c0 (LWP 10560))]

Thread 2 (Thread 0x7f51cc3d7700 (LWP 10582)):
#0  0x00007f51fb5758e9 in g_mutex_lock () at /usr/lib64/libglib-2.0.so.0
#1  0x00007f51fb533299 in g_main_context_prepare () at /usr/lib64/libglib-2.0.so.0
#2  0x00007f51fb533b03 in  () at /usr/lib64/libglib-2.0.so.0
#3  0x00007f51fb533cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#4  0x00007f51fee580de in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#5  0x00007f51fee29e6f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#6  0x00007f51fee2a165 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#7  0x00007f51fed270bf in QThread::exec() () at /usr/lib64/libQtCore.so.4
#8  0x00007f51fee0b783 in  () at /usr/lib64/libQtCore.so.4
#9  0x00007f51fed2979f in  () at /usr/lib64/libQtCore.so.4
#10 0x00007f51fb8000a4 in start_thread () at /lib64/libpthread.so.0
#11 0x00007f51fe9e57fd in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f5200ab97c0 (LWP 10560)):
[KCrash Handler]
#5  0x00007f51fed2afef in qstrcmp(QByteArray const&, char const*) () at /usr/lib64/libQtCore.so.4
#6  0x00007f51cb0bb30d in KFormDesigner::Form::saveAlignProperty(QString const&) () at /usr/lib64/libkformdesigner.so.13
#7  0x00007f51cb0c0229 in KFormDesigner::Form::slotPropertyChanged(KoProperty::Set&, KoProperty::Property&) () at /usr/lib64/libkformdesigner.so.13
#8  0x00007f51cb0c6c58 in  () at /usr/lib64/libkformdesigner.so.13
#9  0x00007f51fee3f1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /usr/lib64/libQtCore.so.4
#10 0x00007f51fe1c5d07 in KoProperty::Set::propertyChanged(KoProperty::Set&, KoProperty::Property&) () at /usr/lib64/libkoproperty.so.13
#11 0x00007f51fe1c094c in KoProperty::Property::emitPropertyChanged() () at /usr/lib64/libkoproperty.so.13
#12 0x00007f51fe1c2538 in KoProperty::Property::setValue(QVariant const&, bool, bool) () at /usr/lib64/libkoproperty.so.13
#13 0x00007f51fe1d0e7a in KoProperty::EditorDataModel::setData(QModelIndex const&, QVariant const&, int) () at /usr/lib64/libkoproperty.so.13
#14 0x00007f51ffd834e3 in QItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const () at /usr/lib64/libQtGui.so.4
#15 0x00007f51ffd376de in QAbstractItemView::commitData(QWidget*) () at /usr/lib64/libQtGui.so.4
#16 0x00007f51fe1d07f1 in KoProperty::EditorView::commitData(QWidget*) () at /usr/lib64/libkoproperty.so.13
#17 0x00007f51fe1cfcc0 in  () at /usr/lib64/libkoproperty.so.13
#18 0x00007f51fee3f1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /usr/lib64/libQtCore.so.4
#19 0x00007f51ffe95c1f in QAbstractItemDelegate::commitData(QWidget*) () at /usr/lib64/libQtGui.so.4
#20 0x00007f51fee3f1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /usr/lib64/libQtCore.so.4
#21 0x00007f51fe1d51ef in KoProperty::ComboBox::commitData(QWidget*) () at /usr/lib64/libkoproperty.so.13
#22 0x00007f51fee3f1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /usr/lib64/libQtCore.so.4
#23 0x00007f51ffc09b71 in QComboBox::activated(int) () at /usr/lib64/libQtGui.so.4
#24 0x00007f51ffc09bee in  () at /usr/lib64/libQtGui.so.4
#25 0x00007f51ffc0a1d9 in  () at /usr/lib64/libQtGui.so.4
#26 0x00007f51fee3f1fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /usr/lib64/libQtCore.so.4
#27 0x00007f51ffe8fac2 in  () at /usr/lib64/libQtGui.so.4
#28 0x00007f51ffc05a94 in  () at /usr/lib64/libQtGui.so.4
#29 0x00007f51fee2b416 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib64/libQtCore.so.4
#30 0x00007f51ff84574c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#31 0x00007f51ff84bdea in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#32 0x00007f51fc68cbaa in KApplication::notify(QObject*, QEvent*) () at /usr/lib64/libkdeui.so.5
#33 0x00007f51fee2b2ad in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQtCore.so.4
#34 0x00007f51ff84b5e3 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib64/libQtGui.so.4
#35 0x00007f51ff8bcfcc in  () at /usr/lib64/libQtGui.so.4
#36 0x00007f51ff8bb70c in QApplication::x11ProcessEvent(_XEvent*) () at /usr/lib64/libQtGui.so.4
#37 0x00007f51ff8e25c2 in  () at /usr/lib64/libQtGui.so.4
#38 0x00007f51fb533a04 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#39 0x00007f51fb533c48 in  () at /usr/lib64/libglib-2.0.so.0
#40 0x00007f51fb533cec in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#41 0x00007f51fee580be in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#42 0x00007f51ff8e2676 in  () at /usr/lib64/libQtGui.so.4
#43 0x00007f51fee29e6f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#44 0x00007f51fee2a165 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#45 0x00007f51fee2f5b9 in QCoreApplication::exec() () at /usr/lib64/libQtCore.so.4
#46 0x0000000000400941 in  ()
#47 0x00007f51fe921b05 in __libc_start_main () at /lib64/libc.so.6
#48 0x000000000040098f in _start ()

Reported using DrKonqi
Comment 1 Jarosław Staniek 2015-01-01 17:42:07 UTC
Created attachment 90198 [details]
attachment-4185-0.html

Hi, thanks for the report!
By a text field do you mean "Text Box"?

Is your environment Plasma KDE or some other? And what is your widget style?
So far I failed to reproduce (oxygen or breeze or cleanlooks widget style).

It would help if you send a small .kexi file containing form that crashes in explained scenario.
Comment 2 zwerg8_thorin 2015-01-02 21:33:48 UTC
On 01.01.2015 18:42, Jarosław Staniek wrote:
> https://bugs.kde.org/show_bug.cgi?id=342371
>
> Jarosław Staniek <staniek@kde.org> changed:
>
>            What    |Removed                     |Added
>
----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |NEEDSINFO
>          Resolution|---                         |WAITINGFORINFO
>                  CC|                            |staniek@kde.org
>
> --- Comment #1 from Jarosław Staniek <staniek@kde.org> ---
> Hi, thanks for the report!
> By a text field do you mean "Text Box"?
>
> Is your environment Plasma KDE or some other? And what is your widget
style?
> So far I failed to reproduce (oxygen or breeze or cleanlooks widget
style).
>
> It would help if you send a small .kexi file containing form that
crashes in
> explained scenario.
>
> Hi,
thanks for the reply!
Yes, I meant a "text box". I have KDE, with Breeze as widget style.
For clarification: I had a form open in kexi, based on a data sheet for
fictional characters I created. Then I wanted to create another form,
based on a query using that same data sheet, specifically for characters
with a certain occupation title. I managed to place the text boxes
*somewhere* on the blank space, but when I wanted to bring them into the
order I wanted, and attempted to change the text alignment in them, KEXI
crashed. Every time.
Comment 3 Jarosław Staniek 2015-01-02 21:41:55 UTC
Reproduced! At least two text boxes have to be inserted...

Thanks!
Comment 4 Jarosław Staniek 2015-02-02 07:58:47 UTC
*** Bug 281246 has been marked as a duplicate of this bug. ***
Comment 5 Jarosław Staniek 2015-02-11 08:17:34 UTC
More info: the crash manifests also for the image box widget's horizontalAlignment property.

[KCrash Handler]
#5  0x00007fef7e22bbdc in QByteArray::QByteArray (this=0x7fff1893bbf0, a=...) at /usr/include/qt4/QtCore/qbytearray.h:439
#6  0x00007fef7e26754f in KFormDesigner::PropertyCommand::propertyName (this=0x3312ec0) at dev/src/calligra-2.9/kexi/formeditor/commands.cpp:276
#7  0x00007fef7e242e6d in KFormDesigner::Form::saveAlignProperty (this=0x2d37170, property=...) at dev/src/calligra-2.9/kexi/formeditor/form.cpp:2254
#8  0x00007fef7e23c93e in KFormDesigner::Form::slotPropertyChanged (this=0x2d37170, set=..., p=...) at dev/src/calligra-2.9/kexi/formeditor/form.cpp:1254
#9  0x00007fef7e245fa7 in KFormDesigner::Form::qt_static_metacall (_o=0x2d37170, _c=QMetaObject::InvokeMetaMethod, _id=57, _a=0x7fff1893bf60) at dev/build/calligra-2.9/kexi/formeditor/form.moc:217
#10 0x00007fefb6c8c87a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007fefb5fd204f in KoProperty::Set::propertyChanged (this=0x2d37830, _t1=..., _t2=...) at dev/build/calligra-2.9/libs/koproperty/Set.moc:112
#12 0x00007fefb5fcb68a in KoProperty::Property::emitPropertyChanged (this=0x315c5d0) at dev/src/calligra-2.9/libs/koproperty/Property.cpp:757
#13 0x00007fefb5fca14b in KoProperty::Property::setValue (this=0x315c5d0, value=..., rememberOldValue=true, useComposedProperty=true) at dev/src/calligra-2.9/libs/koproperty/Property.cpp:407
#14 0x00007fefb5fe1c60 in KoProperty::EditorDataModel::setData (this=0x31cdc60, index=..., value=..., role=2) at dev/src/calligra-2.9/libs/koproperty/EditorDataModel.cpp:245
#15 0x00007fefb76eccb3 in QItemDelegate::setModelData(QWidget*, QAbstractItemModel*, QModelIndex const&) const () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#16 0x00007fefb76a0e4e in QAbstractItemView::commitData(QWidget*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#17 0x00007fefb5fdfbe3 in KoProperty::EditorView::commitData (this=0x27cf800, editor=0x34c0d10) at dev/src/calligra-2.9/libs/koproperty/EditorView.cpp:492
#18 0x00007fefb5fe047b in KoProperty::EditorView::qt_static_metacall (_o=0x27cf800, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7fff1893c3a0) at dev/build/calligra-2.9/libs/koproperty/EditorView.moc:89
#19 0x00007fefb6c8c87a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#20 0x00007fefb77ff13f in QAbstractItemDelegate::commitData(QWidget*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#21 0x00007fefb6c8c87a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#22 0x00007fefb5fe7e57 in KoProperty::ComboBox::commitData (this=0x34c0d10, _t1=0x34c0d10) at dev/build/calligra-2.9/libs/koproperty/combobox.moc:136
#23 0x00007fefb5fe77ba in KoProperty::ComboBox::slotValueChanged (this=0x34c0d10) at dev/src/calligra-2.9/libs/koproperty/editors/combobox.cpp:218
#24 0x00007fefb5fe7c24 in KoProperty::ComboBox::qt_static_metacall (_o=0x34c0d10, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fff1893c660) at dev/build/calligra-2.9/libs/koproperty/combobox.moc:60
#25 0x00007fefb6c8c87a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#26 0x00007fefb7573531 in QComboBox::activated(int) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007fefb75735ae in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#28 0x00007fefb7573b99 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
Comment 6 Jarosław Staniek 2015-06-10 14:21:29 UTC
Please someone confirm if this has been fixed in 2.9.0 because there were related changes.
Comment 7 Jarosław Staniek 2015-06-10 14:23:02 UTC
*** Bug 348976 has been marked as a duplicate of this bug. ***
Comment 8 Jarosław Staniek 2017-06-01 20:35:48 UTC
Git commit e0bf198257421eef3a8e615f89219d17ee0a642c by Jaroslaw Staniek.
Committed on 01/06/2017 at 20:35.
Pushed by staniek into branch '3.0'.

Fix possible crashes in form undo/redo, make it properly work with alignment properties of widgets

Summary:
Undo/redo alignment fixes
+ limit image set of available alignments in widgets depending on widget class (image box is special)
Related: bug 380175, bug 348976
FIXED-IN:3.0.2

Test Plan: See https://bugs.kde.org/show_bug.cgi?id=380175#c0

Reviewers: piggz

Reviewed By: piggz

Tags: #kexi

Differential Revision: https://phabricator.kde.org/D5969

M  +12   -2    src/formeditor/WidgetInfo.cpp
M  +18   -1    src/formeditor/WidgetInfo.h
M  +54   -49   src/formeditor/form.cpp
M  +1    -1    src/formeditor/form.h
M  +3    -0    src/formeditor/form_p.cpp
M  +14   -4    src/kexiutils/utils.cpp
M  +4    -1    src/kexiutils/utils.h
M  +2    -0    src/plugins/forms/kexidbfactory.cpp

https://commits.kde.org/kexi/e0bf198257421eef3a8e615f89219d17ee0a642c