Author Topic: Disappearing Ground Units  (Read 3935 times)

0 Members and 1 Guest are viewing this topic.

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 10151
  • Thanked: 11189 times
    • http://www.starfireassistant.com
Disappearing Ground Units
« on: April 26, 2020, 05:13:13 AM »
The 'Disappearing Ground Units' bug is probably the most significant remaining at this point. Ground units vanish post-save with no warning or error popups. Therefore, I am going to dedicate this thread to that specific issue.

The bug is relatively rare but has affected several different people and it hard to track because any db is always post-bug. If you have suffered this bug, please post in this thread with as much detail as possible and any theories you may have as to the cause.
« Last Edit: May 02, 2020, 01:52:10 PM by Steve Walmsley »
 

Offline RagnarVaren

  • Petty Officer
  • **
  • R
  • Posts: 25
  • Thanked: 6 times
Re: Disappearing Ground Units
« Reply #1 on: April 26, 2020, 08:26:20 AM »
I've looked at a DB that someone else gave me that had the bug which I've since then deleted but I can't remember if the bug also effected NPR ground units. Might help narrow it down if it's a general issue with saving the ground units into the DB that probably only happens in specific circumstances or if it's some weird player only bug.
 

Offline Ametsala

  • Petty Officer
  • **
  • A
  • Posts: 16
Re: Disappearing Ground Units
« Reply #2 on: April 26, 2020, 08:51:08 AM »
I've had this in 1. 6. 3.

At some point I noticed that the first set of 10 infantry units had vanished, but the second set of 10, that was trained later, was still there.

The ground commanders still had in their history the assignment to lead those units, but that was the only trace I could find.

I ran some tests on a new game (v1. 6. 3) recruiting ground units and saving and loading, but couldn't reproduce this.  I'll put the tests in an off-topic, in case they are of any use at least in finding out what isn't the cause:
Off-Topic: tests • show

New game
Instant infantry
Assign commanders
Saved and restarted Aurora.
Start recruiting second set of infantry.
Save & restart
Advance time 5 days.
Save & restart
Advance time until second set ready
Save & restart
Assign Commanders to second set
Save & restart
Start third set of infantry and advance time until almost ready.  (Within one 5 day increment from finishing. )
Save & restart
Advance time until ready
Save
Advance time couple times
Start 4th set
Advance time until date of ready is same as current date, but not ready because 5 day pulse didn't happen.
Save & restart
Advance time until it is 23:59:55 on the day before next 5 day pulse.
Save & restart

Test2:
New game
Initial ground units not instanted (except research)
First set recruited ok
Started recruiting 2nd set
Advanced time
Save & restart
2nd set recruited ok
Save & restart
 

Offline Desdinova

  • Lt. Commander
  • ********
  • D
  • Posts: 237
  • Thanked: 229 times
Re: Disappearing Ground Units
« Reply #3 on: April 26, 2020, 10:31:45 AM »
This also happened to me, I think in 1.5. I no longer have the db but I posted it in the bug thread.
 

Offline Kristover

  • Lieutenant
  • *******
  • K
  • Posts: 159
  • Thanked: 69 times
Re: Disappearing Ground Units
« Reply #4 on: April 26, 2020, 10:36:00 AM »
The one time I had it was after leaving the game open for about three hours after saving it while i did other things and coming back and finding the game locked in some process.  I had to force close and when I reloaded the save, the units were gone.
 

Offline Nori

  • Bug Moderators
  • Sub-Lieutenant
  • ***
  • Posts: 130
  • Thanked: 22 times
  • Discord Username: Nori Silverrage
Re: Disappearing Ground Units
« Reply #5 on: April 26, 2020, 12:15:11 PM »
It's possible it is related to not saving for a extended period of time. The three times I have had it happen, the game had been open and unsaved for many hours. I had a theory that maybe GU complexity was to blame, but I tested that and no go. I did notice once when it happened that the only units that disappeared were new units. All the ones created and organized during that play period were the ones to disappear.
 
The following users thanked this post: Kristover

Offline Kristover

  • Lieutenant
  • *******
  • K
  • Posts: 159
  • Thanked: 69 times
Re: Disappearing Ground Units
« Reply #6 on: April 26, 2020, 12:27:18 PM »
It's possible it is related to not saving for a extended period of time. The three times I have had it happen, the game had been open and unsaved for many hours. I had a theory that maybe GU complexity was to blame, but I tested that and no go. I did notice once when it happened that the only units that disappeared were new units. All the ones created and organized during that play period were the ones to disappear.

It’s funny you’ve noticed this because I’ve arrived at the same conclusion.  I’ve only had the bug happen once but I’ve left the game open and attended for an hour plus a couple of times and EVERY time I’ve come back to it, I’ve had to force close it because it was locked up.  I’ve started saving every year and if I plan on being up for more than a few moments, just saving and closing out the game.
 

Offline Geebee

  • Leading Rate
  • *
  • G
  • Posts: 5
  • Thanked: 2 times
Re: Disappearing Ground Units
« Reply #7 on: April 26, 2020, 03:21:45 PM »
I had it happen to seemingly every GU that was built past a certain date but I only noticed when I loaded the game up today.
I did save multiple times through yesterday and I did use spacemaster to redo a survey craft around the time it popped my GU's to.
But my planetary defence groups were still being made, my game was open for a long time though.
 

Offline froggiest1982

  • Commodore
  • **********
  • f
  • Posts: 654
  • Thanked: 198 times
Re: Disappearing Ground Units
« Reply #8 on: April 26, 2020, 03:58:56 PM »
Hi Steve, the only thing that comes to mind is that now we do save manually while aurora VB6 saved the database "on the go" at every click. This means less information to be stored but more frequently. The question now is: why ground units though? What is the save sequence? Do they come last? I don't know.

Personally I haven't play long campaigns yet but since reading the bug post and seeing many bugs related to after save load I have came to the conclusion of a double save. I started in 1.6.3 with the below method:

Usually I do save then a run another cycle and save again so if anything is wrong I reload from previous backup. So far so good, but I guess with the complexity of save increasing there also could be an increase in the chance of an error. As said didnt arrive that far yet.

Another question: Is it possible when you save even if looks like all is good to go somehow there is still a process running in the background therefore if you close Aurora in the meantime you'll end up with a corrupted database? That was the reason of my double save, I thought Aurora wouldn't start a save process until the previous is completed.

EDIT: I also close all windows prior saving.
« Last Edit: April 26, 2020, 04:16:34 PM by froggiest1982 »
 

Offline joshuawood

  • Leading Rate
  • *
  • j
  • Posts: 10
  • Thanked: 14 times
Re: Disappearing Ground Units
« Reply #9 on: April 26, 2020, 05:27:49 PM »
I had automated assignments off for 60 years, turned them on and the very next incrament where they all got assigned 90% of my 100's of ktons dissapeared, could be related? i have the DB from WAAAY after it so i doubt that will be much help :/
 

Offline Shuggana

  • Able Ordinary Rate
  • S
  • Posts: 3
Re: Disappearing Ground Units
« Reply #10 on: April 27, 2020, 05:52:59 AM »
I have experienced this.   Latest release as of this date (1.  8?)

All civilian garrisons have disappeared, my Lunar, Martian and Europa garrisons are all gone.   Every single unit I had on Earth remains, however they have lost their OOB and are all completely detached now. 

Normal game, nothing weird.   Saved a few days ago and took a break.   Came back and only noticed because I was suddenly getting events about unrest on colonies with no military presence. 

Only thing I can think is that, at one point, I did hit the "Clear hierarchy" button when I had made a mess of the OOB but I never checked what the button does. 

Additionally, I had a handful of Marine companies in boarding capable transport bays on ships I had sent to battle.   Ships were decimated but I got no Event for the destruction of the ground unit aboard.   Unsure if that's intentional. 

EDIT:

Also, just checked previous saves (the automatic ones in the root folder) and the problem exists at the earliest point but that was only 20 mins before the most recent save.
« Last Edit: April 27, 2020, 05:55:44 AM by Shuggana »
 

Offline froggiest1982

  • Commodore
  • **********
  • f
  • Posts: 654
  • Thanked: 198 times
Re: Disappearing Ground Units
« Reply #11 on: April 27, 2020, 07:54:03 AM »

Only thing I can think is that, at one point, I did hit the "Clear hierarchy" button when I had made a mess of the OOB but I never checked what the button does. 


Maybe a quick SM test on a new save?

Offline Omnivore

  • Chief Petty Officer
  • ***
  • O
  • Posts: 38
  • Thanked: 14 times
Re: Disappearing Ground Units
« Reply #12 on: April 27, 2020, 09:54:56 AM »
I haven't had this happen to me but I just saw something occur when I saved a game that had been running all night and thought it might be pertinent.

After I clicked save there was a point in time where I could close the game window yet the save hadn't completed yet.  This in and of itself may not be a problem with the way SQLite works in C#, but I have to ask, are you using multiple transactions?  If so, is the ground unit data being saved last? 

If the answer to both of those questions is true, then the following might be relevant:

"In SQLite, only one transaction is allowed to have changes pending in the database at a time. Because of this, calls to BeginTransaction and the Execute methods on SqliteCommand may time out if another transaction takes too long to complete. (Microsoft C# docs)"

Hope this helps,

PS: If this reply is unwelcome, please accept my apologies.
 

Offline Steve Walmsley (OP)

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 10151
  • Thanked: 11189 times
    • http://www.starfireassistant.com
Re: Disappearing Ground Units
« Reply #13 on: April 27, 2020, 10:27:10 AM »
I haven't had this happen to me but I just saw something occur when I saved a game that had been running all night and thought it might be pertinent.

After I clicked save there was a point in time where I could close the game window yet the save hadn't completed yet.  This in and of itself may not be a problem with the way SQLite works in C#, but I have to ask, are you using multiple transactions?  If so, is the ground unit data being saved last? 

If the answer to both of those questions is true, then the following might be relevant:

"In SQLite, only one transaction is allowed to have changes pending in the database at a time. Because of this, calls to BeginTransaction and the Execute methods on SqliteCommand may time out if another transaction takes too long to complete. (Microsoft C# docs)"

Hope this helps,

PS: If this reply is unwelcome, please accept my apologies.

I am using one transaction for each of seventy-eight different table inserts. The ground formations aren't last but they are in the last ten so you might be on to something.

I open a connection and then close for each table as well. Am I better using a single open/close and a single transaction for all inserts?
 

Offline Omnivore

  • Chief Petty Officer
  • ***
  • O
  • Posts: 38
  • Thanked: 14 times
Re: Disappearing Ground Units
« Reply #14 on: April 27, 2020, 10:44:14 AM »
I haven't had this happen to me but I just saw something occur when I saved a game that had been running all night and thought it might be pertinent.

After I clicked save there was a point in time where I could close the game window yet the save hadn't completed yet.  This in and of itself may not be a problem with the way SQLite works in C#, but I have to ask, are you using multiple transactions?  If so, is the ground unit data being saved last? 

If the answer to both of those questions is true, then the following might be relevant:

"In SQLite, only one transaction is allowed to have changes pending in the database at a time. Because of this, calls to BeginTransaction and the Execute methods on SqliteCommand may time out if another transaction takes too long to complete. (Microsoft C# docs)"

Hope this helps,

PS: If this reply is unwelcome, please accept my apologies.

I am using one transaction for each of seventy-eight different table inserts. The ground formations aren't last but they are in the last ten so you might be on to something.

I open a connection and then close for each table as well. Am I better using a single open/close and a single transaction for all inserts?

I'm not up on the latest but, according to: https://stackoverflow.com/questions/7199305/how-many-inserts-can-be-done-within-one-transaction-in-sqlite, you should probably be safe doing it all in one.  That's an old post but I can't easily imagine why SQLite would be less capable today than 8 years ago. 

If a timeout is indeed the cause then that should solve it.

Hope this helps
 

 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72