Hi, David; 2012/4/28 David Pirotte <da...@altosw.be> > > Best would be to send us an small, complete and concise example of you > consider > reproducible, could you d that ? >
I mean a example code of Joonas Sarajärvi, http://paste.pocoo.org/show/587676/ , produces a Segmentation fault on Guile 2.0.5 too. I though what if a integer. In the integer case, there is no Segmentation fault. Here is a diff of my test code from Joonas's: --- ex0.scm.old 2012-04-28 04:41:23.545825725 +0900 +++ ex0.scm 2012-04-28 04:51:47.065231945 +0900 @@ -16,16 +16,16 @@ (sqlite-finalize stmt)) (display "creating\n") -(let* ((sql "CREATE TABLE foos(dbid INTEGER PRIMARY KEY, name TEXT);") +(let* ((sql "CREATE TABLE foos(dbid INTEGER PRIMARY KEY, name INTEGER);") (stmt (sqlite-prepare db sql))) (sqlite-step stmt) (sqlite-finalize stmt)) ;; Insert some rows of data. (display "inserting\n") -(let ((name "myfoo") +(let ((name 10) (stmt (sqlite-prepare db "INSERT INTO foos(name) VALUES(?);"))) - (display (string-append "for \"" name "\":\n")) + (display (string-append "for " (number->string name) ":\n")) (display "binding\n") (sqlite-bind stmt 1 name) (display "stepping\n") @@ -34,7 +34,7 @@ ;; This finalize call in particular seems to break things (sqlite-finalize stmt) ;; This seems to be never reached. - (display "finalized\n"))) + (display "finalized\n")) (display "closing\n") (sqlite-close db) \ No newline at end of file The differences are only string to integer but Joonas's code produces a Segmentation fault. Why? So, I read the sqlite3.scm, Andy's Guile-SQLite3. And then, I realized sqlite-bind will call different functions; bind-int64 and bind-text. Joonas asked the insight on why this is happening. It would be best if I be able to solve that for Joonas.