OpenTTD

Tasklist

FS#4775 - Crash when building object on coast tile.

Attached to Project: OpenTTD
Opened by Michael Blunck (mb) - Thursday, 15 September 2011, 11:22 GMT
Last edited by Thijs Marinussen (Yexo) - Tuesday, 04 October 2011, 20:18 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Critical
Priority Normal
Reported Version 1.1.3-RC1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Crash when building object on coast tile.

No crash.sav nor crash.dmp available.
This task depends upon

Closed by  Thijs Marinussen (Yexo)
Tuesday, 04 October 2011, 20:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r22994
Comment by Thijs Marinussen (Yexo) - Thursday, 15 September 2011, 13:32 GMT
I can't get it to crash with MariCo v0.2 15.12.2010. What do you need to do exactly to get it to crash?
Comment by Michael Blunck (mb) - Friday, 16 September 2011, 20:59 GMT
> I can't get it to crash with MariCo v0.2 15.12.2010.

Well, it´s not with MariCo 0.2, but with 0.23 (under development).
Comment by Thijs Marinussen (Yexo) - Sunday, 18 September 2011, 08:37 GMT
Can you upload a minimal example so we can reproduce the crash? In case you don't want to make it public yet you can just email it.
Comment by Michael Blunck (mb) - Tuesday, 04 October 2011, 09:00 GMT
I have removed lots of code, yet it´s still not a "minimal example". Try to build "quays" on coast tiles.
(application/octet-stream)    newobj.grf (167.4 KiB)
(application/octet-stream)    crash.sav (82.1 KiB)
Comment by Thijs Marinussen (Yexo) - Tuesday, 04 October 2011, 14:06 GMT
  • Field changed: Status (Unreproducable → Confirmed)
  • Field changed: Operating System (Windows → All)
Thanks for that.

The crash is an assert in DoCommandPInternal, the result from the test and exec run are different. The test run succeeds while the exec run fails due to the tile check callback returning 1 (it returns 0 during the test run).

I can reproduce this by reading and modifying an uninitialized temporary storage value.
Comment by Thijs Marinussen (Yexo) - Tuesday, 04 October 2011, 14:46 GMT
The problem is that the newgrf is checking some values from var 62. In testmode these have different values than in exec mode because in exec mode the tile is cleared before the callback is called.

Loading...