Crash, but no diagnostics.

I had a crash that I can not explain. There is nothing that I can ponit a finger at that could give
any clue as to the cause. I don't know how to force this blankety-blank Windows ME to provide registers
when a crash occurs. There was nothing in the debug file that gives any hit, or any anomaly, but I did
save it and can send it to someone at stardock if you will give me a name and address.

Is it possible to have the GalCiv exec trap program checks or other sudden terminations and put useful
information, such as registers, into the debug file? I would really like to be able to tell you more than
"I got a crash".

Cheers,
Jack
401 views 27 replies
Reply #1 Top
Last time it was on a tiny galaxy. This time it is on a small one. There seems to be no indication of
anything going wrong. It just looks like it was told to exit and does so. The game disappears with no
indication of trouble.

My general technique is to run scouts manually and put colony ships on autopilot. With both failures the
last line of the debug file showed a colony ship reaching its destination. Here is that line.
--------
Debug Message: Cancel Destination for USS Colony Ship 7724 because reached its destination
------------
I am saving this debug file to be sent or perused as anyone might wish.

I have played around with a lot of code and found that I could find errors with very little information
(just like you often do) in about 99% of the time. The worst problems were the last 1%. Without some
diagnostic information or at least a recreate sinario they were time consuming (to the extreme) and,
sometimes, unresolvable.

Some suggestions for the debug file.

1). Split it up into catagories. E.g., one for error or anomoly messages; one for unchanging or seldom
changing data, one for desisions made by the code, and one to contain all commands received from the user,
2). Put in enough detail to make recreation of the problem feasable.
3). Put things into the startup file like star names and locations, event types and locations, size of
galaxy, and other starting settings.
4). Put things into the file with seldom changing data like next tech chosen to research, next improvement
to build, planet colonized, etc.
5). Put into the last file things like movement commands (manual and autopilot), movement commands reset,
attack commands and results (including hit point changes), etc.
6). If possible, trap any abnormal program activity, such as program checks, capture the registers along
with any other data in storage that may help diagnose the problem, and put that data into the error file.

When the game is ready for shipment, or course, all this code could be removed. However, there is good
reason to put it onder a hidden switch that a user can be told to turn on (and how to turn it on) so that
an elusive problem can be sovled.

I hope you accept this suggestion as a helpful one. It is certainly frustrating trying to help you locate
the cause of the crashes I am seeing without better tools. Since the tools appear to be unavailable with
Windows ME, you may have to crate them yourselves.

Cheers,
Jack
Reply #2 Top
Another suggestion for debug files: Indicate when a start of a turn occurs.

Although I have used line traces, I find them too expensive, both in the file
space they take and in the processor overhead it incurs. However, you may find
a time when some sort of trace is absolutely necessary. In the strange terminations
I am seeing now a "module trace" might be just what is needed to nail down the
source of the weard exit. Espsecially one that reset (emptied) the file at the
beginning of each turn.

Sorry if I sound a bit frustrated. I am. I really want to do more testing but I
can't get past this error. There are many more problems that were reported before
this build that I wanted to verify that they were fixed. (:(

Cheers,
Jack
Reply #3 Top
Also see thread subjet "this last build is not testable".

I have uninstalled and reinstalled and still get this failure. I have attempted to
count the number of turns before the sudden unexplained disapperance of GalCiv but
miscounted about 80 turns (on the last try to play the game).

Am I the only one having this problem??? Is there something unique about my system?

Configuration:
OS name Microsoft Windows
Version 4.90.3000 build 3000

System manufacturer IBM
System type 228455U (a NETVISTA model A40i)
Processor AMD Athlon --- 1002 MHZ

Sound device: SoundMAS integrated digital audio by Analog Devices, inc.

Drives: Swapper drive has 10+ gig available.

Display: NVIDIA GeForce2 GTS (IBM) at resolution 1280*1024*32bit

Cheers,
Jack
Reply #4 Top
Does it happen all the time at about 80 turns?
I just started a game and did nothing but pressing the turn-button. To try to recreate the problem here. I got to the end of game in far more turns that 80 without any problems. Or do you have to build ships do socia/resarch stuff too?
Reply #5 Top
I've been having the same crash problem all weekend. It certainly takes longer than 80 turns but always seems to occur at the same level of play. Just as the enemy starts to produce ships and you start to attack them the game crashes. Nothing in the debug file to indicate why. All the messages in the file match up to previous events. Always crashes on the enemies turn as well.

Paul.
Reply #6 Top
Fredrik,
I think I should have not talked about the approximately 80 turns in one of the games. The number may vary, but since there
are no "next turn" or "turn count" marks in the debug file I tried counting them for one game and came up with 184 turns,
which was in a tiny galaxy. I also had it fail in a small galaxy but I did not try to count the turns. I just counted the
turns in another debug file that I saved and got 98 turns. The third debug file gave 80 turns. I did these counts in a
very unscientific way. I counted the occurences of the phrase "Mockingbird because reached its destination" in each debug
file and divided by two. I think I can rely on this because I never had the "Mockingbird" on autopilot and I used the
number pad for all of its movements. This results in two moves per turn.

Solitair,
One of the things I looked for was whether it might be related to a tech completion. While it might correspond in turns to
when a tech might coomplete, it seems to be unassociated with any one tech. Brad mentioned something about some new music
(I have heard no new music) and/or screen shots (again, I have not seen any new ones), and I got a mental image of it being
with a tech completion. Hence, I checked the debug files to see if there might be ONE tech that was completing and causing
the crash. The tech completions, however, varied. Three crashes, three techs being researched, no glory.

Ship completion? I built colony ships, scouts, defenders, and star fighters, and moved them around without incident. I don't
see any sign of transports being completed but I know I started building some.

How do you figure out that the crash is on the enemy's turn? I can't tell, even from the debug file.


Two games were with tiny galaxies and one with a small one. I will try a medium galaxy and see if anything different happens.

Cheers,
Jack
Reply #7 Top
It turns out that the new music and screen shots I was remembering was the new music and sound affects that should be
in the next build, not this build.

Cheers,
Jack
Reply #8 Top
Medium galaxy, 68 turns. No attempt to build star fighters or defenders. I am now thinking I should count
ships built, by type and total.

Next: a Large galaxy with more than one enemy.

Cheers,
Jack
Reply #9 Top
Just counted ships built by counting the messages "Make Ship Leave Orbit". No correlation at all.

Cheers,
Jack
Reply #10 Top
Large galaxy, 75 turns. So far, no correlation to galaxy size.

Cheers,
Jack
Reply #11 Top
Large galaxy, 75 turns. So far, no correlation to galaxy size.

Cheers,
Jack
Reply #12 Top
Is there something about tech "63 NanoFrequencyElectronics" that could be causing this crash?
I just played a game in a huge galaxy and, on a hunch, delayed researching this tech until later
than I usually did. I got 172 turns. When I started the research on this tech it was supposed to
complete in one month, so it was easy for me to tell when the research should complete. I now
believe completion of this tech is the trigger to the crash. I am going to try this again with
a tiny galaxy to see if I can confirm it.

Cheers,
Jack
Reply #13 Top
I forgot to mention one thing that confused me in trying to figure this problem out. There is no entry in the
debug file for techs I start researching (or does the debug file show completions? It looks like start.). When I
looked at the debug file for the possibility that a tech completion might be causing the crash what I saw mislead
me.

Please add entries into the debug file to show what techs I start researching and how many turns it should take.

Thanks,
Jack
Reply #14 Top
Try this. First research "nanoelectronics". When you complete that research "nanofrequencyelectronics".
On a tiny galaxy my game vanished after only 36 turns.

Cheers,
Jack
Reply #15 Top
sounds very plausible. I can definitely confirm that I was researching this in a t least two of the crashed games. I cannot recall the others.

Paul.
Reply #16 Top
I tried to see if another tech could cause this crash but gave up after 10 hours. I avoided the
Nano Frequency Electronics tech and a gigantic galaxy stayed up until I gave up for the night.

Cheers,
Jack
Reply #17 Top
I just noticed something. The tech "Nano Frequency Electronics" has the second most number of
characters in its name. The longest is "Advanced Artificial Intelligence", which I have not been
able to try researching.

Strangely, if researching this tech is what is causing all of these crashes, it is unique to the
current build. I researched it many times successfully in previous builds.

Cheers,
Jack
Reply #18 Top
Cari,
When you find the culprit for this problem please let me know if you think it could affect more than one
tech. I am getting a similar crash after 5+ hours, and am naturally suspicious that it is a related failure
but with a different tech, one that takes hours to research.

What would happen if I edited the tech file to allow me to research all techs the first turn? Will it even
work? If it will, it might enable me to test each one to find other techs that might be triggers to this
problem. Such information might provide corollary information pointing more directly to the actual error.

Thanks,
Jack
Reply #19 Top
Nice idea Jack. I liked it so much I tried it.

Changed all research costs to 5 and then researched one tech a turn (doing nothing else). I could research everything else without any crash until the only item left was nano-frequency electronics. This caused a crash.

I also changed the name to something much smaller, but it still caused a crash when researched, so it's not the length of the name.

Paul.
Reply #20 Top
I don't really think that it has anything to do with the technologies. Does it happen on all sizes of galaxies?
Reply #21 Top
Cari,
the crash happens (for me) on ALL galaxy sizes whenever nano-frequency electronics is researched. It's totally repeatable. Every time. It may not be the technology but one of the build advancements which the technology allows, but it causes an instant crash. No messages in debug relating to it though.

Paul.
Reply #22 Top
Cari,
I've just looked into this, and sure enough if you replace every occurance of tech 63 (nano-frequency electronics) in the improvement file with another tech number, then researching that new tech causes the program to crash.
Something is therefore wron with the improvement file. Could it be as simple as too many improvements depending on a single technology? OR maybe the change of adding planet quality affects something (most technologies do not have this flag).

When I get a chance this evening I'll try checking a few more things, such as spreading the improvements out and determining if a single improvement is responsible.

Paul.
Reply #23 Top
Cari,
problem located. If you swap the improvement around then the crash disappears. It is therefore being caused by too many improvements from a single tech. It doesn't matter which tech,
Paul.
Reply #24 Top
That sounds rather bizarre...I'll check the code that reads in the Improvements. Bounds checker shows mem leaks in the parsing code, but maybe it's actually reflecting something about the way that the improvements are created/initialized.
Reply #25 Top
Ok, thank you very much for putting so much effort into tracking down this bug. There are way too many improvements with required tech 63. I put in a line of code that cuts off the list if it gets beyond the correct number of improvements, so it should work in the next build. We will, however, eventually need to get someone to fix the data. I'm also working on including SmartException in GalCiv, which should help diagnose crashes in the future.