Root Cause Analysis on recent CL2 Database shenanigans...
Okay so, a lot of the crashes in Captain's Log is because it's a Python program built as a Windows application.
When it's built as a Windows GUI application, standard output messages, and standard error messages, which would normally get sent to a text console, have nowhere to go.
So in Captain's Log's case, whenever something gets sent to
stdout or
stderr, and because it's been turned into a Windows GUI EXE, you'll get those horrible
cx_Freeze dialogue windows with the error messages that were meant to go to the console, and the program just basically crashes out.
The solution - and something I should have put in place a
long time ago - is to divert
stdout and
stderr to some kind of GUI text widget.
I've done this now.
In addition, I've started using Python's Logging functionality (again, something I should have used a long time ago), which will also send logging messages to this text widget I've added.
The result, is this...
The above is what happens whilst checking and migrating the GALAXY.db from the CL2 2.0.0 schema, to the 2.1.3 schema.
Notice the
Code:
C:\Python34\lib\site-packages\alembic\util\messaging.py:69: UserWarning: Skipping unsupported ALTER for creation of implicit constraint
warnings.warn(msg)
That was being sent from the
alembic library, which is the package responsible for database schema versioning and migration.
That's what is causing CL2 2.1.3 to crash during the migration from the 2.0.0 GALAXY schema to the current schema. It's being sent to
stdout (or
stderr), there was nowhere for it to go, so a cx_Freeze dialog window is created.
In the act of doing so, alembic is prevented from
stamping the current/HEAD version number into the GALAXY database, and from then on, unless you manually stamp it with the correct number as outlined in the procedure I posted above , you'll get another lovely cx_Freeze dialogue window from alembic, because it's trying to add the
navbeaconscan column to the galaxy table in the GALAXY database, and that column already exists.
BEWM!
And so endeth the Root Cause Analysis
I currently have a 2.1.4 beta 2 available for download at :
https://www.dropbox.com/s/pgsz3rdkcmpo4by/Captain's Log 2_2.1.4 beta 2_setup.exe?dl=1 if you want to test it - there have been a number of bugfixes in it.
Regards