More AI Bugs

AdvancedApproach

Well-known member
Whenever I exit the session or minimize the window, AI trains will randomly shut down with an active schedule. In other words, the AI Driver will stop the train on it's own accord, even with a clear track ahead and it's really starting to piss me off. This has been a recurring theme in SP4 and SP5 and I'm tired of it. I've had to abandon schedules just to see that it doesn't fix anything. I've reported the bug to N3V but knowing them they'll claim an inability to reproduce the problem. That's their favorite go-to line. This has happened so many times that I've lost count. The purpose of service pack updates is to fix problems, not create new ones. I've held back and demonstrated a great deal of restraint but my patience is wearing thin. It seems that problems always come up for me that no one else has experienced. I even did a database repair with no luck.
gQxwtkr.jpeg
WI1K7Qd.jpeg
VAy45dS.jpeg
356YRWN.jpeg
 
Whenever I exit the session or minimize the window, AI trains will randomly shut down with an active schedule.
What do you expect? Unless you save the active driving session, the AI will lose whatever they're doing when you shut down the program.

Minimizing may have something to do with running out of memory or your graphics card losing focus due to lack of power. I would run windowed instead but maximized. This will allow you to jump to other applications on the task bar or second display if you have to. I do this all the time with a browser on one display while I'm in Surveyor or sometimes driver.

There's also a bug with Windows 11 and I think with the recent patch of Windows 10 that causes programs to crash with a black screen if they've been ALT-tabbed out of. I'm not sure if Microsoft fixed that yet.
 
What do you expect? Unless you save the active driving session, the AI will lose whatever they're doing when you shut down the program.

Minimizing may have something to do with running out of memory or your graphics card losing focus due to lack of power. I would run windowed instead but maximized. This will allow you to jump to other applications on the task bar or second display if you have to. I do this all the time with a browser on one display while I'm in Surveyor or sometimes driver.

There's also a bug with Windows 11 and I think with the recent patch of Windows 10 that causes programs to crash with a black screen if they've been ALT-tabbed out of. I'm not sure if Microsoft fixed that yet.
This is what I do, sometimes you need to do something else, while keeping Trainz running.
 
What do you expect? Unless you save the active driving session, the AI will lose whatever they're doing when you shut down the program.

Minimizing may have something to do with running out of memory or your graphics card losing focus due to lack of power. I would run windowed instead but maximized. This will allow you to jump to other applications on the task bar or second display if you have to. I do this all the time with a browser on one display while I'm in Surveyor or sometimes driver.

There's also a bug with Windows 11 and I think with the recent patch of Windows 10 that causes programs to crash with a black screen if they've been ALT-tabbed out of. I'm not sure if Microsoft fixed that yet.
I do save EVERYTHING before shutting down. That doesn't seem to be effective for me right now. Also, I could literally press alt + enter to do something on the computer, which means Trainz is still running and AI Drivers will just stop what they're doing. Never had this problem prior to TRS2022 SP4. The AI Drivers would be executing the schedule and then I save prior to exiting. Upon return the train would come to a stop. Sometimes I don't realize until the mainline is fouled and discover an AI train just stopped without justification. Or I could minimize the game and would see these results play out yet again.
 
I do save EVERYTHING before shutting down. That doesn't seem to be effective for me right now. Also, I could literally press alt + enter to do something on the computer, which means Trainz is still running and AI Drivers will just stop what they're doing. Never had this problem prior to TRS2022 SP4. The AI Drivers would be executing the schedule and then I save prior to exiting. Upon return the train would come to a stop. Sometimes I don't realize until the mainline is fouled and discover an AI train just stopped without justification. Or I could minimize the game and would see these results play out yet again.
By saving, I mean the active session. If you are exiting completely, then the session will end.

SP5 is using your graphics card more than before. I can tell due to the increased heat compared to previous versions including SP4. I again recommend running Trainz windowed but full screen. The only caveat is you'll have the title bar at the top of your screen. The advantage though is you can jump between other applications and not crash Trainz. Thinking about this, I think there was a post not long ago regarding this by N3V regarding this saying they don't recommend using ALT+ENTER and this could be the reason why.

If you think this is a bug, post a bug report. To be honest no one else has this issue that I'm aware of. It could be your older computer not being able to keep up with the increased graphics load.
 
By saving, I mean the active session. If you are exiting completely, then the session will end.

SP5 is using your graphics card more than before. I can tell due to the increased heat compared to previous versions including SP4. I again recommend running Trainz windowed but full screen. The only caveat is you'll have the title bar at the top of your screen. The advantage though is you can jump between other applications and not crash Trainz. Thinking about this, I think there was a post not long ago regarding this by N3V regarding this saying they don't recommend using ALT+ENTER and this could be the reason why.

If you think this is a bug, post a bug report. To be honest no one else has this issue that I'm aware of. It could be your older computer not being able to keep up with the increased graphics load.
It has nothing to do with what you're talking about. None of those points would ever cause this to happen. Notice how the headlights on AI controlled trains cannot be changed. Only on manually controlled trains is that allowed. The P42DC shown is under AI Control but still allows me to change the headlights. The command is stop train. That means it's under AI control. Under manual control it would be continue schedule. So it's definitely a bug which I've already reported and will continue to provide documentation. In fact, I just did five minutes ago and awaiting their response.
Blt4qOG.jpeg
2iyd9bR.jpeg
jffzQJU.jpeg
 
Whenever I exit the session or minimize the window, AI trains will randomly shut down with an active schedule.
Not seeing that at all when minimising the Trainz Window. All active (moving) trains continue moving, following their orders, in the minimised window.

If I exit a running session Trainz will prompt me to save the current "state of play" as a Driver Game.
 
Not seeing that at all when minimising the Trainz Window. All active (moving) trains continue moving, following their orders, in the minimised window.

If I exit a running session Trainz will prompt me to save the current "state of play" as a Driver Game.
When in manual control and DCC Mode it has done that to me. For some reason it'll trigger the DCC to reset at zero.
 
Headlights, pantographs, and train-control are under AI control and can't be changed by the player unless the player takes control of the train. This is normal for Trainz and has been since I first used TRS2004 back in December 2003.

The AI Drivers losing their commands oddly can be caused by multiple issues including:

- Including user-error such as forgetting to put in a repeat command.
- A script error somewhere, memory issues, since you minimize Trainz.


You didn't bother to try a maximized windowed operation, did you?

The issue I have is no one else is reporting this issue except you. I drove my complex Gloucester Terminal Electric route with about a dozen AI drivers running their tram route while I did some switching for a couple of hours yesterday then went off and edited my large Enfield and Eastern that I started in January 2004 for another two hours all without issues.

While driving, I checked my email, which is a local version of Outlook 2021, and not online, and then opened up Excel to look at a spreadsheet to check on a bill that I received notice about since I've taken on the responsibility of following up on Medicare payments for my late father's medical bills that are still coming in, all the while the AI Drivers continued on their tasks and not losing commands.

I noticed in your picture that you are using PORTAL BASIC SHORT. This asset has had issues and has been discussed numerous times in the forums and includes a recommendation to change-out the portal for the larger version. Thinking back, I think I even mentioned this in one of your "bug" posts before when you had issues with derailing trains coming out of portals.

Again, if you feel there's a bug, report it. You should have the link to the bug report saved somewhere by now.
 
Headlights, pantographs, and train-control are under AI control and can't be changed by the player unless the player takes control of the train. This is normal for Trainz and has been since I first used TRS2004 back in December 2003.

The AI Drivers losing their commands oddly can be caused by multiple issues including:

- Including user-error such as forgetting to put in a repeat command.
- A script error somewhere, memory issues, since you minimize Trainz.


You didn't bother to try a maximized windowed operation, did you?

The issue I have is no one else is reporting this issue except you. I drove my complex Gloucester Terminal Electric route with about a dozen AI drivers running their tram route while I did some switching for a couple of hours yesterday then went off and edited my large Enfield and Eastern that I started in January 2004 for another two hours all without issues.

While driving, I checked my email, which is a local version of Outlook 2021, and not online, and then opened up Excel to look at a spreadsheet to check on a bill that I received notice about since I've taken on the responsibility of following up on Medicare payments for my late father's medical bills that are still coming in, all the while the AI Drivers continued on their tasks and not losing commands.

I noticed in your picture that you are using PORTAL BASIC SHORT. This asset has had issues and has been discussed numerous times in the forums and includes a recommendation to change-out the portal for the larger version. Thinking back, I think I even mentioned this in one of your "bug" posts before when you had issues with derailing trains coming out of portals.

Again, if you feel there's a bug, report it. You should have the link to the bug report saved somewhere by now.
I'm communicating with Trainz Support about this. The trains weren't derailing out of ports. I never use the ports to create trains. They only consume them on my routes. Derailments occurred randomly along my routes elsewhere.
 
Could this be the cause?
- <NULL> : msg.src is not type of Locomotive (file gs.gs)
; <NULL> : Script class: FrontLights
; <NULL> : MeshObject: <kuid2:998317:100183:6> "Headlight Mesh Asset"
; <NULL> : Script callstack
; <NULL> : function $void@GameObject::Exception(string), line -1
; <NULL> : function $void@FrontLights::InitThread(), line 124
 
Could this be the cause?
- <NULL> : msg.src is not type of Locomotive (file gs.gs)
; <NULL> : Script class: FrontLights
; <NULL> : MeshObject: <kuid2:998317:100183:6> "Headlight Mesh Asset"
; <NULL> : Script callstack
; <NULL> : function $void@GameObject::Exception(string), line -1
; <NULL> : function $void@FrontLights::InitThread(), line 124
What is the asset?
This script error was most likely there all along but as the program has become more complex, it finally caused other things to fail.
Script failures can cause other scripts to hang and fail because so many things are dependent on others. One of the indications that there's a script error, which I'm not sure you had yet, is the game clock getting stuck at the start time or resetting to noon and not moving.
 
What is the asset?
This script error was most likely there all along but as the program has become more complex, it finally caused other things to fail.
Script failures can cause other scripts to hang and fail because so many things are dependent on others. One of the indications that there's a script error, which I'm not sure you had yet, is the game clock getting stuck at the start time or resetting to noon and not moving.
It's a UP (ex-SP) GP38-2 (patched) unit from what I looked up.
 
I don't have that unit.
Some other unit must use the script and that may explain why this fails because it can't find the asset specified. This is a typical Trainz error caused by cloning and reskinning assets. I have encountered boxcars for instance, failing to load due to missing meshes caused by a typo in the mesh-table referencing a mesh for a different boxcar.
 
Some other unit must use the script and that may explain why this fails because it can't find the asset specified. This is a typical Trainz error caused by cloning and reskinning assets. I have encountered boxcars for instance, failing to load due to missing meshes caused by a typo in the mesh-table referencing a mesh for a different boxcar.
But how does it cause the schedules to be canceled by AI controlled trains? It doesn't make sense to me.
 
While we're waiting, does anyone else see this AI behavior? I haven't seen it in my TRS22PE routes.
I noticed in post #6 the tracks are missing? Lag in the rendering? Did they appear after the screen shot was made?
 
Back
Top