Hi,

here is a proposed patch to fix the krecipes startup segfault (it worked for 
me). An example kcrash traceback with debugging enabled is also attached.
Note that the segfault only occurs when sqlite is configured in 
~/.kde/share/config/krecipesrc:
[DBType]
Type=SQLite

Regards,
  Bastian
--- krecqsqlitedb.cpp	2006-09-02 03:52:17.000000000 +0200
+++ /home/calvin/temp/krecipes-1.0~beta1/krecipes/src/backends/SQLite/libqsqlite/krecqsqlitedb.cpp	2009-01-06 18:08:32.000000000 +0100
@@ -106,7 +106,11 @@
 		"\t (Query: " << query << ")" << endl;
 		res.setError( errmsg );
 		res.setStatus( QSQLiteResult::Failure );
-		free( errmsg );
+#if HAVE_SQLITE
+		sqlite_free( errmsg );
+#elif HAVE_SQLITE3
+		sqlite3_free( errmsg );
+#endif
 	}
 
 	if ( lastID ) {
[Thread debugging using libthread_db enabled]
[New Thread 0x7f2e618896f0 (LWP 27759)]
[KCrash handler]
#5  0x00007f2e59bbbed5 in raise () from /lib/libc.so.6
#6  0x00007f2e59bbd3f3 in abort () from /lib/libc.so.6
#7  0x00007f2e59bf83a8 in __libc_message () from /lib/libc.so.6
#8  0x00007f2e59bfd948 in malloc_printerr () from /lib/libc.so.6
#9  0x00000000004a8ae2 in QSQLiteDB::executeQuery (this=0x1ae00f0, 
    que...@0x7fff699a5a50, lastID=0x0)
    at 
/home/calvin/temp/krecipes-1.0~beta1/./krecipes/src/backends/SQLite/libqsqlite/krecqsqlitedb.cpp:109
#10 0x00000000004a65dc in KreSQLiteResult::reset (this=0x1ae4500, 
    query=<value optimized out>)
    at 
/home/calvin/temp/krecipes-1.0~beta1/./krecipes/src/backends/SQLite/qsql_sqlite.cpp:177
#11 0x00007f2e5d72e51e in QSqlQuery::exec (this=0x7fff699a5a30, 
    que...@0x7fff699a5a50) at sql/qsqlquery.cpp:379
#12 0x00007f2e5d72e5b6 in QSqlQuery::init (this=0x7fff699a5a30, 
    que...@0x7fff699a5a50, db=0x1adf8d0) at sql/qsqlquery.cpp:295
#13 0x0000000000495fae in QSqlRecipeDB::databaseVersion (this=0x1adf770)
    at 
/home/calvin/temp/krecipes-1.0~beta1/./krecipes/src/backends/qsqlrecipedb.cpp:1995
#14 0x00000000004a2b3d in QSqlRecipeDB::connect (this=0x1adf770, 
    create_db=true, create_tables=true)
    at 
/home/calvin/temp/krecipes-1.0~beta1/./krecipes/src/backends/qsqlrecipedb.cpp:128
#15 0x000000000044e4a6 in KrecipesView::initDatabase (this=0x1acbf60, 
    config=0x1a21990)
    at /home/calvin/temp/krecipes-1.0~beta1/./krecipes/src/krecipesview.cpp:850
#16 0x000000000044f502 in KrecipesView (this=0x1acbf60, parent=0x1a34540)
    at /home/calvin/temp/krecipes-1.0~beta1/./krecipes/src/krecipesview.cpp:94
#17 0x000000000044ab1f in Krecipes (this=0x1a34540)
    at /home/calvin/temp/krecipes-1.0~beta1/./krecipes/src/krecipes.cpp:77
#18 0x0000000000447d45 in main (argc=<value optimized out>, 
    argv=<value optimized out>)
    at /home/calvin/temp/krecipes-1.0~beta1/./krecipes/src/main.cpp:72

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-kde-extras

Reply via email to