OpenTTD

Tasklist

FS#2978 - Year-End crash

Attached to Project: OpenTTD
Opened by Haakon (Haakon) - Friday, 12 June 2009, 09:38 GMT
Last edited by Remko Bijker (Rubidium) - Thursday, 18 June 2009, 17:31 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System Windows
Severity Low
Priority Normal
Reported Version 0.7.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

During year change 1907/1908, on the 31st of desember 1907, the game chrashed.

At the time, I had the replace vehicle window open. This window went bananas.

The top left part contained only the name of the engine I was replacing, 4-6-10 wheeler (steam) but not the counter, and the rigt part was empty. I was playing with the American renewal grf.

All other windows were OK.

I included an earlier savegame, if that would help you.

Håkon
This task depends upon

Closed by  Remko Bijker (Rubidium)
Thursday, 18 June 2009, 17:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r16589
Comment by Thijs Marinussen (Yexo) - Friday, 12 June 2009, 10:07 GMT
Uploading the savegame failed somewhere. If you have it, can you also upload crash.dmp / crash.log?
Comment by Haakon (Haakon) - Friday, 12 June 2009, 10:40 GMT
I've tried two times adding all files, but they dont seem to get there. Any idea why not? By the way, it seems impossible to reproduce the error.
(application/octet-stream)    crash.dmp (868.7 KiB)
   crash.log (8.1 KiB)
(application/octet-stream)    crash.sav (144.3 KiB)
Comment by Haakon (Haakon) - Friday, 12 June 2009, 10:42 GMT
I made it!
Comment by Zdeněk Sojka (SmatZ) - Friday, 12 June 2009, 12:15 GMT
What AI are you using? Can you upload it?
Comment by Zdeněk Sojka (SmatZ) - Friday, 12 June 2009, 12:38 GMT
So you could "play" for few ticks after the autoreplace window broke?
Comment by Haakon (Haakon) - Sunday, 14 June 2009, 08:59 GMT
I installed 0.7.1 and the mentioned grf, nothing else. No AIs (I get an error message once in a while statin no suitable AI), and I don't know if I could play a few ticks, since I was not at the computer when it crashed. Some windows were open, and when I returned with a fresh cup of coffee, program had chrashed, and nothing could be done. I expect it to have chrashed immediately, since no year-end savegame had been made, presuming it chrashed on 31st of december.
Comment by Zdeněk Sojka (SmatZ) - Sunday, 14 June 2009, 15:38 GMT
Maybe a race condition between the "saving" thread and sprite loader (both threads are reading files)?
Comment by Haakon (Haakon) - Monday, 15 June 2009, 05:47 GMT
I dont think this is save related. As I said, I had the "Replace train" window open, as I had quite a few other windows, like trains and industries viewports, maybe even a town or two, but the only indication of something wrong was missing and wrongly formatted trains in the top left table of "Replace train". Counters were missing, train names were right aligned, and one train was missing from the list. The train had not expired! It should have been there. I will keep an eye out for further sympthoms if this occurs again.
Comment by Zdeněk Sojka (SmatZ) - Wednesday, 17 June 2009, 11:47 GMT
How much system memory do you have? Is it possible all of the physical memory was used by other processes?
Comment by Haakon (Haakon) - Thursday, 18 June 2009, 05:42 GMT
I doubt memory is the problem. My computer has 2Gb memory, and was restarted not too long before the crash, no other big programs were running. But sure, it's Windows, so who could tell? Game had been running about one hour when the crash occured. But another thing indicate memory might be involved. Whenever I exit OTTD, it seems like all desktop icons must reload graphics, even after just a short game. My playing field is 512 X 1024. That should not bee to much? I noticed that stack had been wrongly set to 1kb, and now has been set to default 1 mb. Could the problem be related?
Comment by Remko Bijker (Rubidium) - Thursday, 18 June 2009, 13:12 GMT
Setting the stack to 1 MB (first incorrectly to 1 kB) likely 'solves this bug' (read: work around something stupid in Windows).

It seems to be the same http://apocryph.org/2008/06/01/visual_c_apps_crashing_chkstk_under_load/ which says that under some circumstances Windows cannot provide more memory for the stack, which causes applications to crash when needing that extra memory on the stack.

Loading...