Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GearCity Executive Secretary - A Report Utility for GearCity
#17
THIS HAS NOW BEEN FIXED

I've noticed an issue when playing with version 2.6 of GearCity.  In version 2.3 and earlier, the Secretary could open the file, keep a database connection around, and make new queries when you requested different reports.  It could also monitor autosaves continuously, loading reports from them as the game went on.

In 2.6, I noticed that autosaves weren't happening, and then that regular saves weren't either, although when I manually saved in-game, the game said the game had been saved.  It wasn't.

Looking in Gear City's logs, I saw the following:

14:51:04:
Attempting to save database
14:51:04: Pending:

14:51:04:
Exception Occured saving db.
file: C:\Users\gc\programming\Kompex-SQLite-Wrapper\src\KompexSQLiteDatabase.cpp
line number: 423
error: database is locked

Although the path is not correct, the "database is locked" provided a clue.  This bounty removed SQLite thread safety.  One of the concerns was "If we implement advanced multi-threaded setups or multiplayer, this bounty becomes obsolete, as we'll need some thread safety".  My guess is that the existing design of the Executive Secretary requires thread safety.

What can be done?  A few things:

 - Play on 1st Gear.  Not great; it's hard to go back.  But this is the only surefire option as of today.
 - Play on an older 2nd Gear.  Not great; a lot of the appeal of continuing to play is the new features, and I didn't back up 2.5.x.
 - Change how the Secretary works so it gets a connection on demand.  A quick fix for automatic autosave loading has already mostly fixed that, but more extensive changes will be required for non-autosaves to function again, and loading data on demand.  This will take time.
 - Is it possible for a thread safety option to be added back in?

It also indicates a bug in the game: The game's UI reports that a save succeeds even if it does not, at least if the cause is the database being locked.  While an edge case, IMO it would be better for the UI to report that the save did not succeed, and preferably why, so the user can attempt to remedy the situation.  I remember back in the day trying to save documents and receiving messages that I was out of disk space - annoying, but at least I could delete something less important to free up space.

So, in the mean time, do not leave the Secretary running while playing Second Gear.  It should be safe to do so in First Gear.
Reply


Messages In This Thread
RE: GearCity Executive Secretary - A Report Utility for GearCity - by JC_Denton - 04-26-2026, 02:07 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)