Bug 92563 - kexi crash when creating new sql3lite database
Summary: kexi crash when creating new sql3lite database
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Jarosław Staniek
URL:
Keywords:
: 94280 100159 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-02 10:53 UTC by Emmeran Seehuber
Modified: 2005-02-24 14:05 UTC (History)
3 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 Emmeran Seehuber 2004-11-02 10:53:40 UTC
Version:           0.1beta5 (using KDE KDE 3.3.1)
Installed from:    Gentoo Packages
Compiler:          gcc-Version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
 
OS:                Linux

Konsole output:
[...]
KexiDB: Object ERROR: 0:
KexiDB: Object ERROR: 0:
KexiDB: Object ERROR: 0:
kexi: WARNING: KexiConnSelector::KexiConnSelector(): no driver found for 'postgr
esql'!
kexi: ********** sender() QPushButton
kexi: ********** sender()==finishButton() ********
kexi: selectedURL() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi:  filter == *.kexi
kexi: KexiStartupFileDialog::currentFileName() == /tmp/t/kexi-0.1beta5/New_datab
ase.kexi
kexi: KexiStartupFileDialog::checkURL() path: /tmp/t/kexi-0.1beta5/New_database.
kexi
kexi: selectedURL() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi:  filter == *.kexi
kexi: KexiStartupFileDialog::currentFileName() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi: selectedURL() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi:  filter == *.kexi
kexi: KexiStartupFileDialog::currentFileName() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi: selectedURL() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi:  filter == *.kexi
kexi: KexiStartupFileDialog::currentFileName() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi: Manager::lookup(): kexi/table
kexi: Manager::lookup(): kexi/form
kexi: Manager::lookup(): kexi/query
kexi: Manager::lookup(): kexi/relation
kexi: Manager::lookup(): inserting info to kexi/table
kexi: Manager::lookup(): inserting info to kexi/query
kexi: Manager::lookup(): inserting info to kexi/form
kexi: Manager::lookup(): inserting info to kexi/relation
kexi: btree.c:1043: sqlite3BtreeOpen: Zusicherung »sizeof(ptr)==sizeof(char*)« nicht erfüllt.


BackTrace:

[New Thread 16384 (LWP 31888)]
[KCrash handler]
#4  0x405777b1 in kill () from /lib/libc.so.6
#5  0x404e4751 in pthread_kill () from /lib/libpthread.so.0
#6  0x404e4aa5 in raise () from /lib/libpthread.so.0
#7  0x40577404 in raise () from /lib/libc.so.6
#8  0x40578a58 in abort () from /lib/libc.so.6
#9  0x40570cb9 in __assert_fail () from /lib/libc.so.6
#10 0x40b017a2 in sqlite3BtreeOpen () from /usr/kde/3.3/lib/libkexisql3.so.3
#11 0x40b195d6 in sqlite3BtreeFactory () from /usr/kde/3.3/lib/libkexisql3.so.3
#12 0x40b19fb7 in openDatabase () from /usr/kde/3.3/lib/libkexisql3.so.3
#13 0x40aecc8e in KexiDB::SQLiteConnection::drv_useDatabase(QString const&) ()
   from /usr/kde/3.3/lib/kde3/kexidb_sqlite3driver.so
#14 0x40aecc18 in KexiDB::SQLiteConnection::drv_createDatabase(QString const&)
    () from /usr/kde/3.3/lib/kde3/kexidb_sqlite3driver.so
#15 0x40278f1f in KexiDB::Connection::createDatabase(QString const&) ()
   from /usr/kde/3.3/lib/libkexidb.so.0
#16 0x401dc375 in KexiProject::create(bool) ()
   from /usr/kde/3.3/lib/libkexicore.so.0
#17 0x4005bcf6 in KexiMainWindowImpl::createBlankProject() ()
   from /usr/kde/3.3/lib/libkeximain.so.0
#18 0x400545f0 in KexiMainWindowImpl::startup() ()
   from /usr/kde/3.3/lib/libkeximain.so.0
#19 0x40019dba in kdemain () from /usr/kde/3.3/lib/libkdeinit_kexi.so
#20 0x0804886b in main ()
#21 0x40564460 in __libc_start_main () from /lib/libc.so.6
Comment 1 Jarosław Staniek 2004-11-02 11:05:51 UTC
Could you insert this line:

kdDebug() << "drv_useDatabase(): " << m_data->fileName() << endl;

at line 124 of kexidb/drivers/sqlite/sqliteconnection.cpp 

and compile, try again and show me the backtrace?

Also, could you do configure with --enable-debug=full option?
Comment 2 Emmeran Seehuber 2004-11-02 12:23:29 UTC
Ok, did this. Here is the console output:
[...]
KexiDB: Object ERROR: 0:
KexiDB: Object ERROR: 0:
KexiDB: Object ERROR: 0:
kexi: WARNING: KexiConnSelector::KexiConnSelector(): no driver found for 'postgresql'!
kexi: ********** sender() QPushButton
kexi: ********** sender()==finishButton() ********
kexi: selectedURL() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi:  filter == *.kexi
kexi: KexiStartupFileDialog::currentFileName() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi: KexiStartupFileDialog::checkURL() path: /tmp/t/kexi-0.1beta5/New_database.kexi
kexi: selectedURL() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi:  filter == *.kexi
kexi: KexiStartupFileDialog::currentFileName() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi: selectedURL() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi:  filter == *.kexi
kexi: KexiStartupFileDialog::currentFileName() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi: selectedURL() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi:  filter == *.kexi
kexi: KexiStartupFileDialog::currentFileName() == /tmp/t/kexi-0.1beta5/New_database.kexi
kexi: Manager::lookup(): kexi/table
kexi: Manager::lookup(): kexi/form
kexi: Manager::lookup(): kexi/query
kexi: Manager::lookup(): kexi/relation
kexi: Manager::lookup(): inserting info to kexi/table
kexi: Manager::lookup(): inserting info to kexi/query
kexi: Manager::lookup(): inserting info to kexi/form
kexi: Manager::lookup(): inserting info to kexi/relation
kexi: drv_useDatabase(): /tmp/t/kexi-0.1beta5/New_database.kexi
kexi: btree.c:1043: sqlite3BtreeOpen: Zusicherung »sizeof(ptr)==sizeof(char*)« nicht erfüllt.
KCrash: Application 'kexi' crashing...


And the crash report:
[New Thread 16384 (LWP 7364)]
[KCrash handler]
#4  0x405b37b1 in kill () from /lib/libc.so.6
#5  0x40520751 in pthread_kill () from /lib/libpthread.so.0
#6  0x40520aa5 in raise () from /lib/libpthread.so.0
#7  0x405b3404 in raise () from /lib/libc.so.6
#8  0x405b4a58 in abort () from /lib/libc.so.6
#9  0x405accb9 in __assert_fail () from /lib/libc.so.6
#10 0x40b41c1c in sqlite3BtreeOpen (
    zFilename=0x82ba478 "/tmp/t/kexi-0.1beta5/New_database.kexi", 
    ppBtree=0x81e7b84, flags=0) at btree.c:1043
#11 0x40b5cb08 in sqlite3BtreeFactory (db=0x81e7b78, 
    zFilename=0x82ba478 "/tmp/t/kexi-0.1beta5/New_database.kexi", 
    omitJournal=0, nCache=2000, ppBtree=0x81e7b84) at main.c:846
#12 0x40b5d62c in openDatabase (
    zFilename=0x82ba478 "/tmp/t/kexi-0.1beta5/New_database.kexi", 
    ppDb=0x8156a30) at main.c:1124
#13 0x40b5d782 in sqlite3_open (
    zFilename=0x82ba478 "/tmp/t/kexi-0.1beta5/New_database.kexi", 
    ppDb=0x8156a30) at main.c:1167
#14 0x40b2b000 in KexiDB::SQLiteConnection::drv_useDatabase(QString const&) (
    this=0x8289aa0) at sqliteconnection.cpp:132
#15 0x40b2aec1 in KexiDB::SQLiteConnection::drv_createDatabase(QString const&)
    (this=0x8289aa0, dbName=@0xbffff060) at sqliteconnection.cpp:113
#16 0x402c1487 in KexiDB::Connection::createDatabase(QString const&) (
    this=0x8289aa0, dbName=@0xbffff060) at connection.cpp:364
#17 0x40213a74 in KexiProject::create(bool) (this=0x827fb70, 
    forceOverwrite=true) at kexiproject.cpp:138
#18 0x40061826 in KexiMainWindowImpl::createBlankProject() (this=0x81e9e48)
    at keximainwindowimpl.cpp:1683
#19 0x4005c540 in KexiMainWindowImpl::startup() (this=0x81e9e48)
    at keximainwindowimpl.cpp:755
#20 0x4001a39c in kdemain (argc=1, argv=0xbffff304) at main.cpp:169
#21 0x08048866 in main (argc=1, argv=0xbffff304) at kexi.la.cpp:2
#22 0x405a0460 in __libc_start_main () from /lib/libc.so.6
Comment 3 Jarosław Staniek 2004-11-02 12:30:50 UTC
HMm. The crash is due to failed assertion (kexi/3rdparty/kexisql3/src/btree.c, line 1043):

  assert( sizeof(ptr)==sizeof(char*) );

What's your hardware architecture? 64 bit?

Comment 4 Emmeran Seehuber 2004-11-02 12:39:50 UTC
I thought I've got a Pentium 4 with 32 Bit ...

kexi: Manager::lookup(): inserting info to kexi/form
kexi: Manager::lookup(): inserting info to kexi/relation
kexi: drv_useDatabase(): /tmp/t/kexi-0.1beta5/New_database.kexi
sizeof(ptr)= 8, sizeof(char*) = 4
kexi: btree.c:1044: sqlite3BtreeOpen: Zusicherung »sizeof(ptr)==sizeof(char*)« nicht erfüllt.
KCrash: Application 'kexi' crashing...

It seems that ptr gets defined wrong. Why is it 8 byte big ?
Comment 5 Jarosław Staniek 2004-11-02 12:44:08 UTC
I reported this to sqlite authors. Patches will be applied soon.
Comment 6 Jarosław Staniek 2004-11-03 12:19:04 UTC
Commited fix to kexi/3rdparty/. please recompile this directory.

kexi/../config.h file is reused, I am curious if SIZEOF_CHAR_P (see config.h) is defined as 8 on your platform? If so, everything could work now.

Comment 7 Emmeran Seehuber 2004-11-03 17:28:24 UTC
SIZEOF_CHAR_P is 4 on my platform. But the current CVS HEAD of Kexi works for me now. So I think this bug is fixed and can be closed.
Comment 8 Jarosław Staniek 2004-11-03 17:31:33 UTC
Looks fixed.
Comment 9 Jarosław Staniek 2004-11-11 22:06:50 UTC
*** Bug 93123 has been marked as a duplicate of this bug. ***
Comment 10 Jarosław Staniek 2004-12-02 15:36:50 UTC
*** Bug 94280 has been marked as a duplicate of this bug. ***
Comment 11 Jarosław Staniek 2005-02-24 14:05:15 UTC
*** Bug 100159 has been marked as a duplicate of this bug. ***