This patch fixes two errors, which accessed a convoi_t object after its self destruction.
Ivansanchez posted this error in the Simutrans Experimental topic http://forum.simutrans.com/index.php?topic=4126.0 (http://forum.simutrans.com/index.php?topic=4126.0)
is there a specific procedure to trigger a crash?
Does the attached patch also fix the issue? (I did not like the implicit state-change in laden())
Yes, but the savegame is an experimental 7.1 savegame using pak128.Britain.Exp: Withdraw all 800 convoys from line "Newcastle-Cambridge cattle convoy".
No, your patch still continues to use deleted object data in step() after returning from laden(). step() must return before the line switch(state) accesses state. Therefore laden() should not destroy the object, but return a flag, that the object has to be destroyed, which is done best by setting state to SELF_DESTRUCT.
Hm, I should learn to read...
Your patch will delete the convoy in the next step. You should check the impact of this changed behaviour.
I see. Thank you very mch. Will be included next year:))
The world needs to step convois backwards then. So I added there a fix too.