Am 30.08.19 um 17:43 schrieb
ben....@snowflake.com:
> Hi all - I just upgraded MacOS to Mojave 14.6. This broke an existing tcl/tk script. Culprit is sqlite. Existing code now produces a segmentation fault on
> package require sqlite3
>
> How do I proceed here? Do I have a tcl/tk install mismatched with the sqlite3 libraries, or maybe I need to use the "package require -exact" syntax? Or something else?
>
> I'm also not sure how to detect what version of sqlite3 my tcl/tk installation is expecting.
>
> I'm using an ActiveState tcl/tk installation.
> % puts [info patchlevel]
> 8.6.9
>
> Also, run interactively:
> % package require sqlite3
> 3.24.0
After that, do "package ifneeded sqlite3 3.24.0". This will tell you
where exactly sqlite came from.
> % sqlite3 myvar ./mydb.db
> Segmentation fault: 11
Strange, because sqlite itself is typically linked statically with the
Tcl package. Try to recompile it.
> If I run "sqlite3 --version" from the MacOS command prompt, I get
> $ sqlite3 --version
> 3.24.0 2018-06-04 14:10:15 95fbac39baaab1c3a84fdfc82ccb7f42398b2e92f18a2a57bce1d4a713cbaapl
This gives you another version of sqlite3 not linked to the Tcl module.
This should not be problematic, because the on-disc format of sqlite is
very stable.
> How come from within my script, just running "package require sqlite3" causes a crash, but when run interactively, the Segmentation fault comes when trying to open a database.
That is the pleasure of memory access errors. Something gets randomly
overwritten, and the crash happens at a time when it finally goes wrong.
Christian