Help finding a crash bug

These are old bug reports that have been closed.
Locked
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

I've been looking at the crash bug described by BillD here:
http://www.neurohack.com/transcendence/ ... =17&t=4335

So far I've seen it reproduce as follows:

1. Use UGWingmen extension (although it is possible, even likely, that it is unrelated, the two cases that I've seen so far both had this extension).
2. Start in Eridani.
3. Go to the next system (call it "Groombridge") and do some stuff.
4. Go back to Eridani and do some stuff.
5. Go back to Groombridge -> CRASH.

If you can try and reproduce the above, I would appreciate it. In particular, I would love to have a consistently reproducible case (I have plenty of save files that crash when you enter the gate, but I need a way to create such a save from scratch).

As far as I can tell here is what is happening:

1. Player starts in Eridani.
2. Player takes the stargate to the next system (call it, "Groombridge"). At this point, the game does a two-phase commit:
2a. First the game moves the player ship from Eridani to Groombridge.
2b. The game saves the Eridani system to disk (which no longer contains the player). But the save is done in such a way that we preserve the previous version of Eridani.
2c. The game saves the Groombridge system (which has the player ship). It then deletes the old version of Eridani.
[Note: 1.06 started doing the above to prevent a game corruption in the event that step 2c failed (e.g., if you ran out of diskspace). In 1.06, if step 2c fail, we would revert the saved Eridani version back to a version before the player entered the gate.]
3. The player now does some stuff in Groombridge and takes the gate back to Eridani. At this point, we do the same two-phase commit:
3a. The game moves the player from Groombridge to Eridani.
3b. The game saves the Groombridge system to disk, preserving the previous version (call it Groombridge version 1).
3c. The game saves the Eridani system and deletes Groombridge version 1.
4. Somehow, the bug happens at either step 3b or 3c.
5. The player now takes the stargate from Eridani to Groombridge. But this time, while loading the Groombridge system from disk, somehow the game loads Groombridge version 1 instead of version 2. Since version 1 is a version of the system before the player left, there is still a copy of the player ship in the system! This means that when the system is loaded, there are two player ships in the system--and since the engine isn't equipped to deal with that, the game crashes. [But the real bug is that somehow we loaded Groombridge version 1 instead of version 2.]

Some speculation and other clues:

Clue 1: There were no disk errors or other issues revealed in the log, so it probably is not an out-of-diskspace issue.
Clue 2: In the cases I've seen, the player also saved the game several times in the middle. Perhaps this causes an interaction with the stargate saving code?
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

With and without UG in the folder: crashed twice with it in : started to feel left out when it did not crash without the UG files.
Deleted save file, no mods, no Cruiser :( Followed the course of " kill, wait: gate " each time "Groombridge" appeared for the second system, that WAS strange.
NO targeting ROM used: no wingmen purchased, deployed or used in testing

Code: Select all

06/30/2011 12:52:43	--------------------------------------------------------------------------------
06/30/2011 12:52:43	Start logging session
06/30/2011 12:52:44	Transcendence 1.06
06/30/2011 12:52:45	Loading extension: Extensions\UGWingmen mule
06/30/2011 12:52:45	Loading extension: Extensions\UGWingmen screens
06/30/2011 12:52:45	Loading extension: Extensions\UGWingmen
06/30/2011 12:52:45	Loading extension: Extensions\UGWingmenX
06/30/2011 12:52:53	Created new game
06/30/2011 12:53:36	Unable to find previous version for system: 0
06/30/2011 12:55:14	Unable to find previous version for system: 3
06/30/2011 12:56:48	Unable to continue due to program error.

program state: OnAnimate
program state: in OnObjDestroyed
obj class: CShip
obj name: Wolfen-class gunship
obj pointer: 5207288
CPlayerShipController
m_pStation: none
m_pTarget: none
m_pDestination: none
game state: leaving stargate
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

shanejfilomena wrote:

Code: Select all

06/30/2011 12:52:43	--------------------------------------------------------------------------------

...
06/30/2011 12:53:36	Unable to find previous version for system: 0
06/30/2011 12:55:14	Unable to find previous version for system: 3
...
Thanks: this adds more clues.

I've seen the error above in other log files. The first error is spurious (and fixed in 1.07) and because of that, I ignored it in other log files. But in your log file you have the error twice. The second error is a real error and also a clue.

The error happens at step 3c when the game tries to delete the previous version of the Groombridge system. The error is saying that it could not delete the previous version, possibly because it could not find it. That indicates to me that the bug is probably in step 3b when trying to save the previous version--perhaps that failed somehow.

I'll check it out some more tonight.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

OK, I can reproduce this all the times: you have to save the game before entering a new stargate, go back, and go again in the stargate --> crash.

1 SAVE in Eridani
2 Gate to Groombridge
3 Gate to Eridani
4 Gate to Groombride ---> CRASH

----------

Saving the game multiple times after action 1, still causes a crash:

1 SAVE in Eridani
2 Gate to Groombridge
3 Gate to Eridani
3b SAVE in Eridani
4 Gate to Groombride ---> CRASH

1 SAVE in Eridani
2 Gate to Groombridge
2b SAVE in Groombridge
3 Gate to Eridani
4 Gate to Groombride ---> CRASH

1 SAVE in Eridani
2 Gate to Groombridge
2b SAVE in Groombridge
3 Gate to Eridani
3b SAVE in Eridani
4 Gate to Groombride ---> CRASH

------------

crash is avoided instead if the player doesn't save before entering the new stargate:

2 Gate to Groombridge
3 Gate to Eridani
4 Gate to Groombride ---> WORKS OK

2 Gate to Groombridge
2b SAVE in Groombridge
3 Gate to Eridani
4 Gate to Groombride ---> WORKS OK

2 Gate to Groombridge
2b SAVE in Groombridge
3 Gate to Eridani
3b SAVE in Eridani
4 Gate to Groombride ---> TESTED 5 times, CRASHED 1

This is my debug.log
06/30/2011 23:00:06 Unable to continue due to program error.

program state: OnAnimate
program state: in OnObjDestroyed
obj class: CShip
obj name: Cometfall-class missileship
obj pointer: 924c358
CPlayerShipController
m_pStation: none
m_pTarget: none
m_pDestination: none
game state: leaving stargate
sorry for the Cometfall-class missileship, it's my debug ship.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

well, it's about time my Dell did something right today:)

p.s.: I like the Cometfall too, but it has a terrible stereo system
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
BillD
Anarchist
Anarchist
Posts: 14
Joined: Mon Jun 27, 2011 4:17 am

Nice work digdug.

Crashes count as a resurrection, which irritates me, so I saved more often (keeping a copy elsewhere), and the game crashed more often :lol:
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Thanks, all! I found the bug and fixed it.

Ironically, the bug was in code intended to prevent save game corruption.

I'm going to release a 1.06a to fix this and a couple of other critical bugs.
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

any xml changes in 1.06a?
or all core engine changes?
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

YAY!!!!!!!! for George!!!!!!!!!
( Beats the Droids back into the cargo hold " Get back to work!, vacation is over!" )
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Wolfy wrote:any xml changes in 1.06a?
or all core engine changes?
The only XML change is a simple change to make insurance companies unique in the system.
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

When I was first playing the game I entered a system with only 2 friendly stations: both Insurance stations.They were each at the opposite gates :
However, while I think limiting them is nice being as some players avoid it for their ego: I also at the same time think there are not enough
( which is why I made Morgan LTD to push the Insurance further into the Universe where the player would be wealthier and the Hostiles more Hostiles and make it more logical to buy the product : I thought so at the time.).

Alot of what I do for Guards to a station, maybe excessive friendlies is probably rooted in that first experience with the Insurance companies because the ships basically leave the station to die , as well as the player.

IF I could ask for anything about Clavis : it would be Guard ships and maybe push them deeper into the game
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
User avatar
Star Weaver
Militia Commander
Militia Commander
Posts: 311
Joined: Sun Nov 07, 2010 10:20 pm
Location: . . . between the stars and the warm black sky . . .

Looks like this can be moved to closed.
Image
Image
Image
Locked