A Trainz command may malfunction if the game is left unattended.

JonMyrlennBailey

Active member
This means deselecting the Trainz game while a Session is running and using another program like a web browser so Trainz just runs in the background with the PC mouse active in another window.
This means Trainz is running in an inactive window, and this can be trouble. I found out it is best to pause the game before going to check email or something so the Trainz session doesn't collapse.

I was running an AI schedule and left TS12 running in an inactive window for a while. Some drivers did not stumble on their respective schedules but at least one did stumble when he got to the Couple at Trackmark command in my train yard. I had Trainz running in the background as an inactive window for a couple of hours and came back two find two inter-coupled engines out on the main line without the manifest freight consist in haul that they should have picked up at the yard already. Looking at the timetable, Couple at Trackmark was the lead command on the schedule still not completed. The unintended-wildcat driver was running around the layout like a chicken with his head cut off stuck on this failed command. Retesting this session from a saved point did not result in any errors with this particular timetable when the Trainz window was left active or put on Pause whevever the window was made inactive.

In short, Couple at Trackmark won't execute properly when the session is left running in an inactive window. Pause the game if you have to leave it for a while. Having a Trainz session run in an inactive window can cause the works to break down for reasons known only to computer science experts. I don't know about TANE and other editions, but my TS12 doesn't seem to like being left running in an inactive window.
 
Last edited:
There are many causes for this and among them is lack of machine resources. TS12 is very CPU-heavy with lots of tasks going on at the same time. It boils down to how the code is handled by the program as well as the over system hardware and operating system. TANE and TRS19 and going forward TRS22 don't appear to suffer from this because these are 64-bit applications and have more resources available to them for use than a 32-bit application such as TS12.

The other possible issue is how the program works. TS12, like all Trainz versions, has multiple program threads and data paths all working at the same time. With all this information being transferred back and forth, running another program for a long period of time takes the time away from TS12. We have to keep in mind that even though we may have the fastest hardware ever available to us the home users there's still a finite quantity of resources, as programs compete for the processor cycles, memory, video memory, and disk space.

There are a number of things you can try, but there's one thing you can try without rewriting your schedules. This is actually realistic as well and I use this often.

Try inserting a Wait... command prior to the couple command. This doesn't have to be long, perhaps 20-seconds, but this is enough to give TS12 a chance to recover a bit before going for this complex command. This is also recommended for such commands as the Copy Commands from... which is used in conjunction with the Schedule Library Rule for the same reason, and why we put in this command at the beginning of sessions as this allows code to load into memory before the AI start running about.

As I said, this doesn't appear to be an issue with the newer Trainz versions. I run my complex Gloucester Terminal Electric route with about a dozen AI drivers moving about their repeated schedules in addition to AI trains visiting from two portals while loading up Google Maps and reading forums at the same time. There are times too when I may have setup a user-driven train to deliver goods to various points around the route and have taken a short break to browse the forums all without having the AI drivers decide it's time for them to take a tea and coffee break as well.
 
Last edited:
John:

I actually did have a 20 second Wait For in front of the Couple at Trackmark that malfunctioned while the TS12 session window was inactive. The only preventative here is to pause the game session or save and close it if I leave Trainz to go do something else. Another thing that periodically bugs me is the red bug on the screen during a session. This occurs every so often after a Trainz 2012 reinstall. I did not have issues with Couple at Trackmarkbefore my latest TS12 reinstall the other day. Mysteriously disappearing norfolksouthern37-authored SD-40 series engines (the mainstay of my layout creations) and other rolling stock led to a reinstall. TS12 has been plagued with little bothersome stuff for years. I like to build new routes in it though.
 
John:

I actually did have a 20 second Wait For in front of the Couple at Trackmark that malfunctioned while the TS12 session window was inactive. The only preventative here is to pause the game session or save and close it if I leave Trainz to go do something else. Another thing that periodically bugs me is the red bug on the screen during a session. This occurs every so often after a Trainz 2012 reinstall. I did not have issues with Couple at Trackmarkbefore my latest TS12 reinstall the other day. Mysteriously disappearing norfolksouthern37-authored SD-40 series engines (the mainstay of my layout creations) and other rolling stock led to a reinstall. TS12 has been plagued with little bothersome stuff for years. I like to build new routes in it though.

The Red Bug issue may be part of your problem here. This is due to a script error. The next time you get the red bug, click on it then click on the error line shown. This will expand the information that explains where the error occurs. There may have been an update to TANE that caused the TS12 version to die.

TS12 also runs out of memory. TS12 has memory management issues and tends to run out of "steam" over time. This issue is caused by threads getting stuck and everything slowing down internally. The temporary fix I found for that was to pause or restart after a save, usually about 30 minutes to an hour of running. This seemed to reset the clock and buy more time for driving. The problem, however, is this can be used only a few times before weird things happen with signals not working and AI drivers becoming rouge.
 
Back
Top