The International Simutrans Forum

 

Author Topic: Possible bug in depot  (Read 1963 times)

0 Members and 1 Guest are viewing this topic.

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Possible bug in depot
« on: May 27, 2013, 07:17:32 AM »
Not sure if it's still there, as I found this while playing yesterday with RC 9.0001, maybe it doesn't apply to newest (9.0006) candidate.
An airplane got stuck in a grass taxiway, because was one of the first jets and was too heavy for my old outdated grass airport (67t for a limit of 50t).
So I started making some enhancements to the airport, upgrading it to tarmac version. But, in the middle of the enhancement works, the airplane was automatically sent to its home depot.

Here it came the possible bug. I just hit the "start" button to send the plane out, as the enhancement works were almost finished. Well, the airplane went out of the depot, but was still shown in the depot. Same name, id, etc. I saved game, reloaded, and nothing in the depot. I didn't try to press the "start" again to see what happened, sorry.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18555
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Possible bug in depot
« Reply #1 on: May 27, 2013, 11:44:39 AM »
Thank you for the report. Can you test to see whether you can reproduce this in the latest version? The teleporting is intentional to prevent blockages in multi-player games, but the subsequent behaviour that you describe is not.

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Possible bug in depot
« Reply #2 on: May 28, 2013, 05:37:26 PM »
Well, James... actually I can't check it out, because... a 252 t Airbus A380 is able to land and drive through a grass airport, even though it should be restricted to maximum of 50 t.

I tried also with a Boeing 707-120 (56 t) and I got an orange tooltip over the plane telling "too heavy", and landed with a heavy speed penalty. I still wonder why that didn't happen with the big guy. So, not sure if we got one problem or two! :D

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Nathanael Nerode
Re: Possible bug in depot
« Reply #3 on: May 29, 2013, 01:18:11 AM »
Oh!  I've had this (first) problem happen.  With buses. Caused some crashes too.  I haven't been able to track it down well enough to figure out exactly what's going on, because it's always caused by me doing something stupid, so I always reload.   ;)

You can reproduce this "depot screwup bug" by (a) getting a train or truck stuck somehow, so that it cannot follow its schedule AND cannot drive back to the depot (perhaps by deleting a crucial piece of roadway or replacing it with something with a very low weight limit), (b) having it teleport to the depot after being stuck for too long, and (c) attempting to start it again out of the depot.

This looks to me like a memory management problem (which also explains the crashes).

So.... Where is the "I can't find a path, I'm teleporting to the depot" code?  Because that's what seems to be triggering this problem.

The second bug appears to be a different one, and I don't know about that.   :)

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Possible bug in depot
« Reply #4 on: May 29, 2013, 12:58:57 PM »
Just let me add I didn't get any crash; I did save/load and the 'clone' just vanished from depot.
About the second, I'm not using any exp pakset, but pak128 standard instead. Not sure if that could lead to unwanted behaviors. Also, I've seen some vehicles with weight = X and weight/axle =X but also others with weight = X and weight/axle = 0. The difference between them might be makeobj version, but they had exactly same dat file, I'm quite sure. Not sure if that can bring some errors too.

Offline Junna

  • Devotee
  • *
  • Posts: 1081
Re: Possible bug in depot
« Reply #5 on: May 29, 2013, 01:36:02 PM »
Like Neroden I have had this bug occur with crashes, as well. Also note that any bus and train going out of said depot with this strange behaviour will be running at seemingly twice the speed, and will go around for a while until the game crashes; it can work, however, if you are able to save and reload after crashing. Then the odd behaviours are no longer present.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: Possible bug in depot
« Reply #6 on: May 29, 2013, 07:36:22 PM »

You can reproduce this "depot screwup bug" by (a) getting a train or truck stuck somehow, so that it cannot follow its schedule AND cannot drive back to the depot (perhaps by deleting a crucial piece of roadway or replacing it with something with a very low weight limit), (b) having it teleport to the depot after being stuck for too long, and (c) attempting to start it again out of the depot.


there might be an old backtrace of this bug around, i've encountered it one or two years ago.

Might be related to pax/cargo still being assigned to it, unlike regular vehicles who are always emptied when entering a depot.

Offline neroden

  • Devotees (Inactive)
  • *
  • Posts: 831
  • Nathanael Nerode
Re: Possible bug in depot
« Reply #7 on: June 04, 2013, 03:03:29 AM »
I have a proposed set of fixes for this on my emergency-depot-bugfix branch.  There were a lot of little things to clean up here.  I'd appreciate some testing.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18555
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Possible bug in depot
« Reply #8 on: June 04, 2013, 11:01:59 AM »
Thank you for that - will test when I get home.