Bug 245030 - Kexi crash while trying to open a file in Ark
Summary: Kexi crash while trying to open a file in Ark
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: KexiDB (show other bugs)
Version: 2.2.0 (KOffice 2.2.0)
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Jarosław Staniek
URL:
Keywords:
: 249038 250497 251797 251798 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-18 12:08 UTC by Cyril
Modified: 2014-02-08 21:55 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Possible fix for crash (3.24 KB, patch)
2010-07-18 17:17 UTC, Jarosław Staniek
Details
The file that crashes Kexi (26.00 KB, application/octet-stream)
2010-07-20 10:37 UTC, Cyril
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cyril 2010-07-18 12:08:59 UTC
Application: kexi (2.2.0 (KOffice 2.2.0))
KDE Platform Version: 4.4.4 (KDE 4.4.4)
Qt Version: 4.6.3
Operating System: Linux 2.6.32-5-amd64 x86_64
Distribution: Debian GNU/Linux testing (squeeze)

-- Information about the crash:
I have an zip archive with a file called ".apps.doNotDelete.db" which is a sqlite3 database.
When trying to open it, it crashes with the attached backtrace.

The crash can be reproduced some of the time.

 -- Backtrace:
Application: Kexi (kexi), signal: Aborted
The current source language is "auto; currently asm".
[KCrash Handler]
#5  0x00007f6adf577175 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#6  0x00007f6adf579f80 in *__GI_abort () at abort.c:92
#7  0x00007f6adf5ad2bb in __libc_message (do_abort=<value optimized out>, fmt=<value optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#8  0x00007f6adf5b6b16 in malloc_printerr (action=3, str=0x7f6adf66ab75 "free(): invalid pointer", ptr=<value optimized out>) at malloc.c:6267
#9  0x00007f6adf5bb88c in *__GI___libc_free (mem=<value optimized out>) at malloc.c:3739
#10 0x00007f6ace81fa82 in ~SQLiteConnectionInternal (this=0x18ea100, __in_chrg=<value optimized out>) at ../../../../../kexi/kexidb/drivers/sqlite/sqliteconnection.cpp:58
#11 0x00007f6ace81f5a0 in ~SQLiteConnection (this=0x18ea050, __in_chrg=<value optimized out>) at ../../../../../kexi/kexidb/drivers/sqlite/sqliteconnection.cpp:90
#12 0x00007f6adf03321d in KexiProject::closeConnection (this=0x18e1c10) at ../../../kexi/core/kexiproject.cpp:527
#13 0x00007f6adf03b503 in KexiProject::openInternal (this=0x18e1c10, incompatibleWithKexi=0x7fff8c5d82c0) at ../../../kexi/core/kexiproject.cpp:226
#14 0x00007f6adf03bca9 in KexiProject::open (this=0xf2e, incompatibleWithKexi=@0xf2e) at ../../../kexi/core/kexiproject.cpp:177
#15 0x00007f6ae0a567a5 in KexiMainWindow::openProject (this=0x1713970, projectData=...) at ../../../kexi/main/KexiMainWindow.cpp:1549
#16 0x00007f6ae0a62ac9 in KexiMainWindow::startup (this=0x1713970) at ../../../kexi/main/KexiMainWindow.cpp:1503
#17 0x00007f6ae0a67f0a in KexiMainWindow::create (argc=<value optimized out>, argv=0x7fff8c5d8758, aboutdata=<value optimized out>) at ../../../kexi/main/KexiMainWindow.cpp:285
#18 0x00000000004008e8 in main (argc=3886, argv=0xf2e) at ../../kexi/main.cpp:30

Reported using DrKonqi
Comment 1 Jarosław Staniek 2010-07-18 16:18:19 UTC
Could you email me example file to staniek(@)kde.org so I can investigate the crash? You can remove sensitive data if you want.
Comment 2 Jarosław Staniek 2010-07-18 17:10:19 UTC
SVN commit 1151238 by staniek:

KexiDB
*SQLite Driver
**remove all sqlite_* macros, use sqlite3_* functions directly since we only support version 3
**use sqlite3_close() on sqlite3 structure instead of free(3)
***possible fix of crash in bug #245030

CCBUG:245030



 M  +5 -9      sqliteconnection.cpp  
 M  +2 -17     sqliteconnection_p.h  
 M  +1 -1      sqlitedriver.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1151238
Comment 3 Jarosław Staniek 2010-07-18 17:11:52 UTC
SVN commit 1151239 by staniek:

Port of r1151238
*SQLite Driver: use sqlite3_close() on sqlite3 structure instead of free(3)
***possible fix of crash in bug #245030

CCBUG:245030



 M  +1 -5      SqliteConnection.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1151239
Comment 4 Jarosław Staniek 2010-07-18 17:17:38 UTC
Created attachment 49291 [details]
Possible fix for crash

For testing. This fix attempts to remove the crash. Please apply it using:

cd koffice/
patch -p0 < 2010-07-18-fix_crash_on_closing_sqlite.patch

Then rebuild directory koffice/kexi/kexidb and install it.
Comment 5 Jarosław Staniek 2010-07-18 17:19:48 UTC
Please test if you can.
The bug probably affects only architectures "bigger" than 32-bit.

Thanks for your help!
Comment 6 Cyril 2010-07-20 10:37:28 UTC
Created attachment 49330 [details]
The file that crashes Kexi

If you zip this file and try to open it, it crashed. If you can reproduce the bug, please try to open this file, and see if it works for you
Comment 7 Jarosław Staniek 2010-09-07 23:03:43 UTC
SVN commit 1172694 by staniek:

KexiDB
*SQLite Driver
*backport of r1151239: possible fix of crash in bug #245030

CCBUG:245030



 M  +1 -1      sqliteconnection.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1172694
Comment 8 Jarosław Staniek 2010-09-07 23:08:23 UTC
*** Bug 249038 has been marked as a duplicate of this bug. ***
Comment 9 Jarosław Staniek 2010-09-07 23:08:59 UTC
*** Bug 250497 has been marked as a duplicate of this bug. ***
Comment 10 Jarosław Staniek 2010-09-20 21:48:18 UTC
*** Bug 251797 has been marked as a duplicate of this bug. ***
Comment 11 Jarosław Staniek 2010-09-20 21:48:34 UTC
*** Bug 251798 has been marked as a duplicate of this bug. ***
Comment 12 Jarosław Staniek 2014-02-08 21:55:25 UTC
At the moment Kexi does not support SQLite files created using other tools.

2.7 and newer displays message like presented below and gently exits:


""Database project "apps.doNotDelete.db" does not appear to have been created using Kexi and cannot be opened.

It is an SQLite file created using other tools.""

Closing the bug for now as fixed. Please let me know if you have any further requests. Thanks!