Your email subject is somewhat misleading, and it's not April 1 yet in this part of the universe :) As you expained it yourself, it's rather "Fossil crashes on opening an invalid repository file (PDF)"
As for the issue: This is not really about PDF, just about an invalid non-fossil repository. It is a corner case indeed, yet it does pinpoint a logical dependency in the db error reporting. The problem stems from db.c::db_database_slot() function that is called in the context of db.c::db_force_rollback(), as part of reporting the fossil db error (SQLITE_NOTADB) from db.c::db_err(). So the logical dependency is in fact that main error is thrown from db.c::db_vprepare(), yet the db error handling appears to depend on a valid repository db -- db_database_slot() needs a valid db to process a query (PRAGMA database_list), thus calling db_vprepare() too. See, a full call-stack at the bottom. I'm not sure what is the best way to untie such a corner case. Perhaps db_database_slot() could be made aware of the outstanding db.errCode==SQLITE_NOTADB to prevent further queries. Better yet this corner case should be caught earlier (at db_close() ??). Of course the firstmost question is how much priority this issue has? --------------- > fossil.exe!db_vprepare(Stmt * pStmt=0x0012fd90, int errOk=0, const char * > zFormat=0x0070b66c, char * ap=0x0012fd8c) Line 249 C fossil.exe!db_prepare(...) Line 269 + 0x13 bytes C fossil.exe!db_database_slot(...) Line 1143 + 0xe bytes C fossil.exe!db_close_config() Line 1172 + 0xa bytes C fossil.exe!db_close(int reportErrors=0) Line 1673 C fossil.exe!db_force_rollback() Line 209 + 0x7 bytes C fossil.exe!db_err(const char * zFormat=0x0070b3a0, ...) Line 100 C fossil.exe!db_vprepare(Stmt * pStmt=0x0012fe4c, int errOk=0, const char * zFormat=0x0070caf8, char * ap=0x00000000) Line 259 + 0x1e bytes C fossil.exe!db_text(...) Line 683 + 0x13 bytes C fossil.exe!db_get(...) Line 2291 + 0x10 bytes C fossil.exe!db_get_boolean(const char * zName=0x0070bb28, int dflt=0) Line 2399 + 0x23 bytes C fossil.exe!db_open_repository(const char * zDbName=0x003632f0) Line 1474 + 0x10 bytes C fossil.exe!db_find_and_open_repository(int bFlags=0, int nArgUsed=0) Line 1535 + 0x9 bytes C fossil.exe!process_sync_args(...) Line 159 + 0xf bytes C fossil.exe!pull_cmd() Line 233 + 0xf bytes C fossil.exe!wmain(int argc=4, unsigned short * * argv=0x00365208) Line 760 C fossil.exe!__tmainCRTStartup() Line 318 + 0x19 bytes C fossil.exe!wmainCRTStartup() Line 187 C kernel32.dll!7c817067() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ---------------- On Sun, Jan 8, 2017 at 3:49 AM, Tony Papadimitriou <to...@acm.org> wrote: > When I attempted to PULL with the command FOSSIL PULL –R FILE > but (by mistake of course) I pointed it instead to a PDF file, I got an > endless loop that ends with a crash. (Win7 machine.) > It happens with any recent version of FOSSIL I tried. > > And it seems pretty much any PDF file will cause this behavior. With other > non DB files I simply get a ‘no database’ error message. > > Here’s some of the output: > > SQLITE_NOTADB: file is encrypted or is not a database > fossil: file is encrypted or is not a database > SELECT value FROM config WHERE name='allow-symlinks' > SQLITE_NOTADB: file is encrypted or is not a database > fossil: file is encrypted or is not a database > PRAGMA database_list > SQLITE_NOTADB: file is encrypted or is not a database > fossil: file is encrypted or is not a database > PRAGMA database_list > SQLITE_NOTADB: file is encrypted or is not a database > fossil: file is encrypted or is not a database > PRAGMA database_list > SQLITE_NOTADB: file is encrypted or is not a database > fossil: file is encrypted or is not a database > PRAGMA database_list > > _______________________________________________ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users