The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: TygerFish on October 26, 2012, 12:19:05 AM

Title: Removing ground where convoy stops causes access excpetion
Post by: TygerFish on October 26, 2012, 12:19:05 AM
Here's what I did:
1) Made a train station on a hill
2) Decided that I wanted to flatten the hill and rebuild the station one level lower so it was even with the surrounding terrain
3) Delete tracks (ground is still there)
* At this point, convoys using the station get the expected "can't find route" message
4) Lower hill (so that there is no longer ground at the same x,y,z coordinates, just air)
* After a few seconds of simulation running, grund_t::get_halt() causes an access exception.


Also experienced this (seems to be the same issue) while altering the coastline near a ship, and can reproduce in the issue easily in the demo map,.


I broke out the complex statement in the method, and the culprit seems to be grund_t::flags




Call stack:

   Simutrans-Experimental-debug.exe!grund_t::get_halt()  Line 564 + 0x3 bytes   C++
   Simutrans-Experimental-debug.exe!convoi_t::laden()  Line 3762 + 0x43 bytes   C++
   Simutrans-Experimental-debug.exe!convoi_t::step()  Line 1419   C++
   Simutrans-Experimental-debug.exe!karte_t::step()  Line 3702   C++
   Simutrans-Experimental-debug.exe!karte_t::interactive(unsigned int quit_month)  Line 6442   C++
   Simutrans-Experimental-debug.exe!simu_main(int argc, char * * argv)  Line 1276   C++

Title: Re: Removing ground where convoy stops causes access excpetion
Post by: Dwachs on October 26, 2012, 05:41:31 AM
Is this reproducable with standard's newest release? Otherwise I will move this to the simutrans-experimental board.
Title: Re: Removing ground where convoy stops causes access excpetion
Post by: prissi on October 26, 2012, 07:13:14 PM
Seem to be exclusive to experimental.
Title: Re: Removing ground where convoy stops causes access excpetion
Post by: TygerFish on October 26, 2012, 07:26:14 PM
Quote from: prissi on October 26, 2012, 07:13:14 PM
Seem to be exclusive to experimental.


Yeah, my bad -- meant to post this an an -Experimental bug.
Title: Re: Removing ground where convoy stops causes access excpetion
Post by: jamespetts on October 28, 2012, 01:08:40 PM
TygerFish - may I ask: which version were you using? I think that an issue like this has been resolved recently in the development version.

Edit: Can you try the latest released version, 10.12, to see whether the problem is there fixed?
Title: Re: Removing ground where convoy stops causes access excpetion
Post by: TygerFish on October 28, 2012, 07:23:05 PM
I built from the latest source here: https://github.com/jamespetts/simutrans-experimental (https://github.com/jamespetts/simutrans-experimental)


Is that not up-to-date?
Title: Re: Removing ground where convoy stops causes access excpetion
Post by: jamespetts on October 28, 2012, 07:52:14 PM
Which branch did you use? Until earlier to-day (after your post reporting the problem), the -master branch (the one viewed/downloaded by default) dated back to March of this year. Have you tried the new release version?
Title: Re: Removing ground where convoy stops causes access excpetion
Post by: TygerFish on November 04, 2012, 04:14:35 PM

Confirmed that this specific bug is NOT present in the current (October 2012) version.


I did find another similar bug in a few hours of playing though... is there a more recent source repository available where I can debug it?
Title: Re: Removing ground where convoy stops causes access excpetion
Post by: jamespetts on November 04, 2012, 04:33:16 PM
Thank you for confirming that. The latest source branch is currently the 10.x (https://github.com/jamespetts/simutrans-experimental/tree/10.x) branch.
Title: Re: Removing ground where convoy stops causes access excpetion
Post by: TygerFish on November 09, 2012, 06:04:30 AM
Forked from your 10.x branch, built and this bug isn't there either.  I'd consider this resolved.
Title: Re: Removing ground where convoy stops causes access excpetion
Post by: jamespetts on November 09, 2012, 10:52:58 AM
Thank you for letting me know!