SQL Exception When Starting Game

    Joined
    Aug 23, 2013
    Messages
    379
    Reaction score
    65
    Hi,

    Single-player game was working fine yesterday (and was shut down cleanly). Today, when trying to re-start the game I'm getting a dialog box saying "Runtime Exception" and that something went wrong initialising the universe and that I could try reinstalling the game(!).

    The logs say:

    [2016-12-29 23:47:18] java.sql.SQLException: error in script file line: 118 C:\starmade\server-database\World1\index IO error: RowInputBinary in statement [SET TABLE PUBLIC.TRADE_NODES INDEX '93334 93334 94601 95623 0 0 0 0 3']

    Deleting this line in the correct file (which is "server-database\World1\index\.script" and not "server-database\World1\index") seems to fix the problem.
     

    AndyP

    Customer Experience Manager
    Joined
    Aug 15, 2013
    Messages
    1,199
    Reaction score
    264
    • Schine
    • Wired for Logic
    this usually happens when the DB state differs from the recovery log.

    Deleting the line, will fix the error itself, but may also break indexes, so you should really use this, to recover access to the world only, and export sectors, ships and stations, as such a change can have side effects that show up way later.

    So if manually fixing the script-file you may revert a change that has been already made, and the file-state may not match the database state anymore.

    - Andy
     
    Joined
    Aug 23, 2013
    Messages
    379
    Reaction score
    65
    Hi,

    this usually happens when the DB state differs from the recovery log.

    Deleting the line, will fix the error itself, but may also break indexes, so you should really use this, to recover access to the world only, and export sectors, ships and stations, as such a change can have side effects that show up way later.

    So if manually fixing the script-file you may revert a change that has been already made, and the file-state may not match the database state anymore.
    Unfortunately, through prolonged use I've acquired a very different perspective.

    The error prevention is pure crap (no sanity checks to ensure that files written are correct and consistent before overwriting previous "known good" files, etc); the error detection is pure crap (e.g. no checksums/CRCs anywhere, no cross-checking to ensure anything is consistent on loading, etc); the error handling is pure crap (no attempt at automatically working around common problems, no tools to do things like regenerate indexes from the data being indexed, etc) ; and the error reporting is pure crap (e.g. generic error dialog boxes with suggested actions to "fix" the problem that are almost always completely inappropriate instead of adequate and/or useful information, and logs that are full of huge quantities of useless information and misinformation like incorrect or incomplete file names and the same "duplicate key" repeated 100 times, etc). The result of this; combined with the complexity of the game, the fact that the game is regularly updated and the nature of "alpha"; make StarMade an extremely fragile and error prone mess where (regardless of what you do) you're almost guaranteed that sooner or later your entire universe will end up as broken and unusable disaster that the game refuses to touch.

    Essentially; it's a race - either a new update will come along and cause me to want to start a new universe (and discard my current universe), or the game will soil its panties for whatever reason and cause me to need to start a new universe (and discard my current universe). It doesn't matter too much which of these things happens first, the end result is always the same.

    Hacking an index file (that the game screwed up) is just a fast/easy way of prolonging the inescapable "next thing" that will cause the death of yet another universe; and if hacking an index file makes it so that the game seems to work for now then it really makes no difference if there are unknown consequences because "seems to work for now" is the only thing anyone can expect anyway.
     

    AndyP

    Customer Experience Manager
    Joined
    Aug 15, 2013
    Messages
    1,199
    Reaction score
    264
    • Schine
    • Wired for Logic
    Well, partially true, but if handling the system and alike properly, its not that easy to get your world corrupted.

    Example?

    Connect to: play.star-made.org:4646
    Namely: "Official Testserver (OLD-DB)"
    upload_2016-12-29_18-59-33.png

    The world is running since April 2013.
    Was under productive game play on a public server in the past (coopy.tv if someone remembers that),
    and we copied it over to our servers August 2013 when it became unplayable,
    and put a lot of effort in finding and eliminating the problems and bottlenecks in the DB.

    The DB is still operational since today, and went step by step through all updates.
    It even has the NPC-Factions spreading out, though no universe map, as it was the old-universe style with pretty much everything bulked into the systems. (That were not even there, when the map started...)

    Our main Testserver (play.star-made.org:4242) is running since a year now,
    with all stuff that can go wrong in the dev-builds.
    Only 2 or 3, 24 hour rollbacks were needed when an update totally broke the DB.

    So yeah, you may be right, worlds break from time to time, but they do not have to.
    And you really need some bad luck or missing backups to actually have to throw away effort from a world.

    - Andy