OpenTTD

Tasklist

FS#3134 - AI's enter an unexpected zombie state when ::Save() fails.

Attached to Project: OpenTTD
Opened by Dustin Andrews (Dustin) - Thursday, 20 August 2009, 00:19 GMT
Last edited by Thijs Marinussen (Yexo) - Thursday, 20 August 2009, 10:46 GMT
Type Bug
Category Script
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version 0.7.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Background:
When an AI has an crash in the Save() routine a crash is reported to the window, but it keeps running. This behavior seems reasonable, because save isn't critical.

ERROR:
However, at this point the game considers that the AI never left the Save() routine and starts complaining "You are not allowed to call sleep during Save(), Load(), and any Valuator."

REPRO STEPS:
Create the test AI from http://wiki.openttd.org/AI:TestAI . Change the Save() function to read TestAI::Save() {throw("save error.");}
Load the AI in a game, and call save. Notice the crash report. Hit the fast forward

EXPECTED RESULTS:
The AI should crash completely and be dead.
OR
The failed save should be terminated and the AI should continue on.

ACTUAL:
The AI is still running, but the game thinks it's still running the Save() routine.

This task depends upon

Closed by  Thijs Marinussen (Yexo)
Thursday, 20 August 2009, 10:46 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r17231.

Loading...