Re: Received fatal signal 11 using a prosqlite predicate
Nicos Angelopoulos (Univ of York) <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <20130926230655.027fde44@naga> |
Dear Bob, On Thu, 26 Sep 2013 08:47:43 -0500 "Bob Ly" <[email protected]> wrote: > I tried calling this predicate from prosqlite on the moz_places table > from places.sqlite file. > ?- sqlite_query('SELECT id, title, visit_count FROM moz_places',Row). > > I got the following value. > Row = row(2, 'Web Search - CrunchBang', 185) ; > > Then I got the following error message. > SWI-Prolog [thread 1]: received fatal signal 11 (segv) > Stack trace labeled "crash": > [0] crashHandler+0x36 > [1] dispatch_signal+0x44a > [2] __restore_rt+(nil) > [3] __strerror_r+0x171 > [4] PL_put_atom_chars+0x32 > [5] unify_row_term+0x124 > [6] c_sqlite_query+0x25a > [7] PL_next_solution+0x5818 > [8] query_loop+0x11f > [9] prologToplevel+0x4f > Aborted > > Am I not understanding the prosqlite_query predicate or is there a > better predicate to obtain selected rows of table? > This is certainly a supported way to access the sqlite table. For instance, on a linux computer the following works with the example database uniprot.sqlite ?- [library(prosqlite)]. % library(debug) compiled into prolog_debug 0.00 sec, 54 clauses % library(prosqlite) compiled into prosqlite 0.03 sec, 335 clauses true. ?- sqlite_connect( 'examples/uniprot.sqlite', uniprot ). Using database at: examples/uniprot.sqlite true. ?- sqlite_table_column( uniprot, Tbl, Column ), write( Tbl-Column ), nl, fail. secondary_accessions-secondary_accession secondary_accessions-primary_accession identifier_mapping-uniprot_accession identifier_mapping-identifier_type identifier_mapping-target_identifier false. ?- sqlite_query'Select primary_accession, secondary_accession from secondary_accessions', Row ). Row = row('P64943', 'A0A111') ; Row = row('P64941', 'A0A112') ; Row = row('Q10704', 'A0A113') ; Row = row('O90631', 'A0A131') ; Row = row('Q6NUJ1', 'A0A184') ; Row = row('A0A189', 'A0A1A0') ; Row = row('A0A194', 'A0A1A5') ; Row = row('A0A1C3', 'A0A1D3') . Would you be able to share your sqlite database ? Are you on Windows ? Regards, Nicos Angelopoulos