Solution to the infamous passengers-from-nowhere bug

Discuss, get help with, or post new modifications, graphics or related tools for Locomotion in this forum.

Moderator: Locomotion Moderators

User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Re: Solution to the infamous passengers-from-nowhere bug

Post by Zimmlock »

First, I dont know if you can consider this a bug, but if you run massive amounts of trains and you get a hudge trafficjam some of your trains can disapear from the map, you can find them back in your train list with the message No Position. I consider it a bug/ unwanted behavior.
Second, if you play a map long enough you end up without trees, even if you have set in the scenario editor the maximum amout of forrests and individual trees.
Hodie Mihi Cras Tibi
LocoMH
Chairman
Chairman
Posts: 845
Joined: 26 Nov 2005 16:21
Location: Dresden (formerly Ruhr Area)
Contact:

Re: Solution to the infamous passengers-from-nowhere bug

Post by LocoMH »

My 3 dreams for Locomotion are: bigger maps (everyone has that dream...), passengers with destination (makes no sense to transport passengers from one station to another and unloading all to me) and trains that know when there is a junction between their tracks so they get a green signal. However...I believe this is hard to fix by just using a patch. (...?)
Jerrythabest
Engineer
Engineer
Posts: 65
Joined: 09 Aug 2006 16:02
Location: Wassenaar, the Netherlands
Contact:

Re: Solution to the infamous passengers-from-nowhere bug

Post by Jerrythabest »

Bit wrote:LSP? I did wonder whether I'd seen a similar approach for something before, but I couldn't think what to search for. Searching for LSP has given me nothing. Could you expand?
LSP = Long Station Patch if I'm correct.
I'm starting to wonder how that works actually, as I've seen that the station data structures in memory have room to store no more than 80 station element locations. At least some things need to be worked around then, I suppose.


But that's rather offtopic. About the Loco Statoin Fixer release, it'll come in about 10 hours from now; it'll be the first thing I do when I come home tonight. Don't want to keep you guys waiting any longer than necessary, but I couldn't do it yesterday :oops:
Zimmlock wrote:First, I dont know if you can consider this a bug, but if you run massive amounts of trains and you get a hudge trafficjam some of your trains can disapear from the map, you can find them back in your train list with the message No Position. I consider it a bug/ unwanted behavior.
Second, if you play a map long enough you end up without trees, even if you have set in the scenario editor the maximum amout of forrests and individual trees.
I'd consider both to be bugs, though I thought the former was fixed with the .172 patch?
LocoMH wrote:My 3 dreams for Locomotion are: bigger maps (everyone has that dream...), passengers with destination (makes no sense to transport passengers from one station to another and unloading all to me) and trains that know when there is a junction between their tracks so they get a green signal. However...I believe this is hard to fix by just using a patch. (...?)
We are dreaming about the same things I guess :P Though these things are by design (that is, not bugs), I hope that we'll have a patch capable of changing such behaviour one day. It'll be a difficult one to do, so I don't think that I'm ready for something like that, but if I ever run into the solution to do this I won't hesitate to try :wink:
Jerrythabest
Engineer
Engineer
Posts: 65
Joined: 09 Aug 2006 16:02
Location: Wassenaar, the Netherlands
Contact:

Re: Solution to the infamous passengers-from-nowhere bug

Post by Jerrythabest »

All right everyone, I've attached Loco Station Fixer v1.1 to the opening post!

Alternatively, you may download it from here.
Last edited by Jerrythabest on 08 Apr 2012 08:57, edited 2 times in total.
User avatar
Illegal_Alien
Tycoon
Tycoon
Posts: 7824
Joined: 29 Sep 2004 20:07
Location: Kingdom of Far Far Away
Contact:

Re: Solution to the infamous passengers-from-nowhere bug

Post by Illegal_Alien »

Thats great, but i wont use it as i will wait for more usefull patches. :)

p.s.: I just reported your post and asked for an anwer of the moderatorteam/orudge. and it seems it helped ;)
:: Looking for the Locomotion section? Scroll down on the forum index or click here. :: See all releases in Locomotion section? Clicky here! :: Click here for the best tool ever! :: .datCrawler try it! ::
Following roadmap for releases: Whats a roadmap?
Releases of LocoTrains can be found by checking the posts of: LocoTrains - Goold old AMI Trains member of the first hour.
I have Private Messaging disabled, because of the stupid questions i get in my PM box.
Want to talk to me? Get on the #tycoon and #locomotion channel on OFTC thingy. :: Evolution of men: Loosing more braincells, everytime you post...
Jerrythabest
Engineer
Engineer
Posts: 65
Joined: 09 Aug 2006 16:02
Location: Wassenaar, the Netherlands
Contact:

Re: Solution to the infamous passengers-from-nowhere bug

Post by Jerrythabest »

Haha, thank you for that :)

If there is anything specific you'd like to see patched, feel free to ask :wink: can't hurt trying.
Bit
Engineer
Engineer
Posts: 18
Joined: 09 Jul 2010 11:21

Re: Solution to the infamous passengers-from-nowhere bug

Post by Bit »

Zimmlock wrote:First, I dont know if you can consider this a bug, but if you run massive amounts of trains and you get a hudge trafficjam some of your trains can disapear from the map, you can find them back in your train list with the message No Position. I consider it a bug/ unwanted behavior.
Second, if you play a map long enough you end up without trees, even if you have set in the scenario editor the maximum amout of forrests and individual trees.
I've seen these two too and would also call them bugs, so I'd certainly vote for those to be patched, if the solutions are sensible.

Re LSP: I don't find the station limitation a problem, I simply add a second station e.g. "Waterloo [1-4]" and "Waterloo [5-8]" which often helps with train routing, and there are techniques to making platforms longer than 16 tiles. So might I suggest that any 'mods' included be optional as in OTTD?

A quick extra thought, would it be possible to select an ObjData folder (and possibly Saved games folder) before start-up (maybe auto-renaming/copying them) so that it's easy to keep multiple set-ups for different scenarios on one PC?
Jerrythabest
Engineer
Engineer
Posts: 65
Joined: 09 Aug 2006 16:02
Location: Wassenaar, the Netherlands
Contact:

Re: Solution to the infamous passengers-from-nowhere bug

Post by Jerrythabest »

Bit wrote:Re LSP: I don't find the station limitation a problem, I simply add a second station e.g. "Waterloo [1-4]" and "Waterloo [5-8]" which often helps with train routing, and there are techniques to making platforms longer than 16 tiles. So might I suggest that any 'mods' included be optional as in OTTD?
I'd say any non-bugfixes should be optional since they may modify gameplay more seriously.
Bit wrote:A quick extra thought, would it be possible to select an ObjData folder (and possibly Saved games folder) before start-up (maybe auto-renaming/copying them) so that it's easy to keep multiple set-ups for different scenarios on one PC?
I figure that's possible with a little batch file that renames the folders and then launches Loco. It can also re-rename the folders when Loco exits I suppose.
Zainy521
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 12 Apr 2011 22:54
Location: NorCal

Re: Solution to the infamous passengers-from-nowhere bug

Post by Zainy521 »

Just letting you know, Your patch is incompatible with LSP savegames. Otherwise works fine.
Dreamcatcher
Transport Coordinator
Transport Coordinator
Posts: 263
Joined: 16 Oct 2006 22:45

Re: Solution to the infamous passengers-from-nowhere bug

Post by Dreamcatcher »

Zainy521 wrote:Just letting you know, Your patch is incompatible with LSP savegames. Otherwise works fine.

Of course it would be incompatible with the LSP..

|I can only assume that both this and Lsp change various values in the running exe meaning that lsp will not work with this and vice versa.
Zainy521
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 12 Apr 2011 22:54
Location: NorCal

Re: Solution to the infamous passengers-from-nowhere bug

Post by Zainy521 »

Psyvhotic Baboon wrote:
Zainy521 wrote:Just letting you know, Your patch is incompatible with LSP savegames. Otherwise works fine.

Of course it would be incompatible with the LSP..

|I can only assume that both this and Lsp change various values in the running exe meaning that lsp will not work with this and vice versa.
It's not incompatible with LSP, LSP works just fine with both running. I just can't load LSP savegames with this patch running.
Jerrythabest
Engineer
Engineer
Posts: 65
Joined: 09 Aug 2006 16:02
Location: Wassenaar, the Netherlands
Contact:

Re: Solution to the infamous passengers-from-nowhere bug

Post by Jerrythabest »

That's interesting, I'll have to see what the LSP does to your save files then.

What happens when you try to load an LSP savegame? I suppose the game crashes?


EDIT: aha, funny, I see what the LSP does now. Will do a little check for that in v1.2.

EDIT 2: released Loco Station Fixer v1.2!
Zainy521
Transport Coordinator
Transport Coordinator
Posts: 313
Joined: 12 Apr 2011 22:54
Location: NorCal

Re: Solution to the infamous passengers-from-nowhere bug

Post by Zainy521 »

When playing with LSP, you'll receive an error whenever you place a station that isn't a train station. Error #:0042F38D
User avatar
Plastikman
Tycoon
Tycoon
Posts: 3941
Joined: 24 Dec 2005 03:14

Re: Solution to the infamous passengers-from-nowhere bug

Post by Plastikman »

Zainy521 wrote:When playing with LSP, you'll receive an error whenever you place a station that isn't a train station. Error #:0042F38D
what station?
I have placed road and boat docks fine..
i didn't try and airport tho
Attachments
Screenshot14.png
Screenshot14.png (541.66 KiB) Viewed 520 times
North American sets and then some...
US SET Ver 3.1.0 updated ~ Amtrak Pack 3.1.0 ~ US Passenger/Metro Set 3.1.0 updated~ Auto Factory 2.6 ~ VIA Rail Pack ~ LTD ED1 Conrail Alcos ~ LTD ED2 NJ Transit ~ DBR E60 ~ TGV Duplex ~ Umbrella Corp. ~ Comboios de Portugal~ Dekosoft UP/BN/BNSF Sets ~ ICE // MegaPack = 1.0.3.
Image
Image
Image
My Trains are made from 100% recycled electrons!
Jerrythabest
Engineer
Engineer
Posts: 65
Joined: 09 Aug 2006 16:02
Location: Wassenaar, the Netherlands
Contact:

Re: Solution to the infamous passengers-from-nowhere bug

Post by Jerrythabest »

Zainy521 wrote:When playing with LSP, you'll receive an error whenever you place a station that isn't a train station. Error #:0042F38D
I understand that this is what happened in Loco Station Fixer v1.1, right? It's exactly the address I checked for in v1.2, so if you encounter this error with v1.2 I must have made a mistake somewhere.
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Re: Solution to the infamous passengers-from-nowhere bug

Post by Zimmlock »

More bug
The money bugg, the game simply cant handle it if you over stretch it. After a certain date or in come your income turns negative, but only at this image, the train income stays positive untill december and just befor the end of the year it turns negative. However, my total Cash and company value keeps climbing, i dont get announced bankrupt in 6 month.
If you want to study a overstretched game pm me and you can get my save
Attachments
moneybug.png
moneybug.png (15.17 KiB) Viewed 2425 times
Hodie Mihi Cras Tibi
Jerrythabest
Engineer
Engineer
Posts: 65
Joined: 09 Aug 2006 16:02
Location: Wassenaar, the Netherlands
Contact:

Re: Solution to the infamous passengers-from-nowhere bug

Post by Jerrythabest »

Oh, yes. :bow: The money bug!
While the cause of that is simple and straightforward, it's gonna be one hell of a job to get that fixed. The game reserves 4 bytes for each number you see in that window, which gives it a certain range of numbers it can store. If you go beyond that, it wraps around into the negatives. The solution is both trivial and incredibly difficult at the same time: increase the number of bytes the game uses for each number.

The easy part is reserving the extra space, which can simply be borrowed from the space where the game now stores your financial history (similar to how the LSP increases the number of station elements per station by cutting the possible number of stations in half).

However, Locomotion is a 32-bit (=4 bytes) application, which means that it does all its calculations (except for multiplications) in at most 4 bytes. So to make that work with 8 bytes, a simple addition like "trainIncome + incomeOfMyTrain" becomes a mathematical trick that involves multiple steps. While the solution is not that hard to find (as many programmers have had to deal with this in the past), the actual difficult part is that for a patch like this the program code of the solution must fit within space occupied by the original code. And the original ADD operation is usually no more than 2 bytes!


Though, I wonder... you're making so much money because you are moving around vast amounts of cargo. The Loco Station Fixer has the potential to reduce the amount of cargo produced on your map. Just out of curiousity: do you see any (significant) decrease in income in that game after you start using the Loco Station Fixer?
User avatar
Zimmlock
Tycoon
Tycoon
Posts: 2112
Joined: 02 Dec 2003 16:01
Location: Belgium

Re: Solution to the infamous passengers-from-nowhere bug

Post by Zimmlock »

Jerrythabest wrote:Though, I wonder... you're making so much money because you are moving around vast amounts of cargo. The Loco Station Fixer has the potential to reduce the amount of cargo produced on your map. Just out of curiousity: do you see any (significant) decrease in income in that game after you start using the Loco Station Fixer?
Worst, i dont use the bug fixer because i never ever experienced any station bug, that is, only sometimes when i build a new station at a farm or oilfield it ll produce for verry short time a amount of passengers and mail, but i do not collect them and they ll never show up again.
This is the amount of cargo i have devivered in 283 years in reality i have moved more because a lot of trains have the order to unload. (thats why i have only delivered 942.420 automobiles, i have fixed cargos unload stations at towns, but the autodealers are not fixed so sometimes a dealer is build into the catchment area of a cargo unload station and it accepts automobiles that are registered in this list)
Attachments
cargo delivered.png
cargo delivered.png (8.12 KiB) Viewed 2406 times
Hodie Mihi Cras Tibi
User avatar
IANF
Engineer
Engineer
Posts: 43
Joined: 03 Dec 2011 23:51
Location: Locomotion

Re: Solution to the infamous passengers-from-nowhere bug

Post by IANF »

i believe this bug is called "not everyone has a house in the city"
now sit and think about this
nicholas51
Traffic Manager
Traffic Manager
Posts: 195
Joined: 15 Dec 2011 16:02

Re: Solution to the infamous passengers-from-nowhere bug

Post by nicholas51 »

I have the money bug in all scenarios mainly in aircraft unbelievably even in Boulder Breakers bugs stations are large and have a more awkward for the list put a station on the side of oremine and had no load on the station does not pick up the load at all station was on the side of mine:: :evil:
Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 41 guests