Bug 357025 - Application crash on creating new row
Summary: Application crash on creating new row
Status: CLOSED DUPLICATE of bug 356888
Alias: None
Product: KEXI
Classification: Applications
Component: Tables (show other bugs)
Version: 2.9.8
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Kexi Bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-12-22 02:54 UTC by Arseniy
Modified: 2015-12-24 22:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Buggy database (13.00 KB, application/x-kexiproject-sqlite2)
2015-12-22 02:56 UTC, Arseniy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arseniy 2015-12-22 02:54:50 UTC
Application: kexi (2.9.8)
KDE Platform Version: 4.14.10
Qt Version: 4.8.6
Operating System: Linux 4.1.12-1-default x86_64
Distribution: "openSUSE Leap 42.1 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
1) created the database
2) clicked on the green «create new row» button

The crash can be reproduced every time.

-- Backtrace:
Application: Kexi (kexi), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#6  0x00007f4677c60500 in KexiDB::TableViewColumn::isReadOnly() const () at /usr/lib64/libcalligradb.so.14
#7  0x00007f46625f43bc in KexiTableScrollArea::createEditor(int, int, QString const&, QFlags<KexiDataAwareObjectInterface::CreateEditorFlag>) () at /usr/lib64/libkexidatatable.so.14
#8  0x00007f46623a7b41 in KexiDataAwareObjectInterface::addNewRecordRequested() () at /usr/lib64/libkexidataviewcommon.so.14
#9  0x00007f46792110fa in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /usr/lib64/libQtCore.so.4
#10 0x00007f4679d8b432 in QAbstractButton::clicked(bool) () at /usr/lib64/libQtGui.so.4
#11 0x00007f4679aef7d3 in  () at /usr/lib64/libQtGui.so.4
#12 0x00007f4679af0943 in  () at /usr/lib64/libQtGui.so.4
#13 0x00007f4679af0a2c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQtGui.so.4
#14 0x00007f4679ba796a in QToolButton::mouseReleaseEvent(QMouseEvent*) () at /usr/lib64/libQtGui.so.4
#15 0x00007f4679791c5a in QWidget::event(QEvent*) () at /usr/lib64/libQtGui.so.4
#16 0x00007f467974279c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#17 0x00007f4679748e1a in QApplication::notify(QObject*, QEvent*) () at /usr/lib64/libQtGui.so.4
#18 0x00007f46772d9e1a in KApplication::notify(QObject*, QEvent*) () at /usr/lib64/libkdeui.so.5
#19 0x00007f46791fd18d in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /usr/lib64/libQtCore.so.4
#20 0x00007f4679748613 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib64/libQtGui.so.4
#21 0x00007f46797b9ceb in  () at /usr/lib64/libQtGui.so.4
#22 0x00007f46797b875c in QApplication::x11ProcessEvent(_XEvent*) () at /usr/lib64/libQtGui.so.4
#23 0x00007f46797df5f2 in  () at /usr/lib64/libQtGui.so.4
#24 0x00007f46752fdc84 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#25 0x00007f46752fded8 in  () at /usr/lib64/libglib-2.0.so.0
#26 0x00007f46752fdf7c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#27 0x00007f4679229fbe in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#28 0x00007f46797df6a6 in  () at /usr/lib64/libQtGui.so.4
#29 0x00007f46791fbd4f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#30 0x00007f46791fc045 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQtCore.so.4
#31 0x00007f4679201499 in QCoreApplication::exec() () at /usr/lib64/libQtCore.so.4
#32 0x0000000000400949 in  ()
#33 0x00007f4678cf4b05 in __libc_start_main () at /lib64/libc.so.6
#34 0x0000000000400998 in _start ()

Reported using DrKonqi
Comment 1 Arseniy 2015-12-22 02:56:16 UTC
Created attachment 96253 [details]
Buggy database
Comment 2 Jarosław Staniek 2015-12-24 14:59:30 UTC
Thanks Arseniy! I am fixing this issue already for 2.9.11. See https://bugs.kde.org/show_bug.cgi?id=356888.

*** This bug has been marked as a duplicate of bug 356888 ***
Comment 3 Arseniy 2015-12-24 15:19:12 UTC
Maybe this bug occurs because one of the fields of the table is «exists» — this is reserved word in SQLite.
Comment 4 Jarosław Staniek 2015-12-24 22:20:00 UTC
Yes, there are also related remarks in the wish https://bugs.kde.org/show_bug.cgi?id=332161.

In the context of the db posted by you, after running this:

insert into frames values (1, 0,0,0,"abc");

and this

select "exists" from frames;

-- the result will be:

0

And running this:

select "exists1" from frames;

returns:

exists1

So a dangerous combination.

Future Kexi will have support for proper identifier escaping, probably using [].
The easiest approach we can use now, for Kexi 2.9, is to raise error in Table Designer for reserved words so tables with reserved words as identifiers cannot be even created.
Comment 5 Jarosław Staniek 2015-12-24 22:24:27 UTC
Kexi 3's approach to id escaping would be:

select [exists] from frames;