AI complains Missing Junction Lever, any fixes?

PhilChorusch01

Well-known member
As the title says, every AI train is complaining about missing junction levers. This is really frustrating, I even took over a few AI trains that can't drive over these 'faulty' junctions and yet in the editor there's nothing wrong with them. After providing aid to the idiot AI trains, they somehow decide 'Missing Junction Lever' again and again..

In Trainz 2019, I wasn't getting too much of these issues. But in Trainz 2022, it's really annoying. Is there any fix for this?
 
Some ideas:
Click on the lever and check the layer it is in (possibly in a layer higher than the track?)
Delete the lever and re-add it and retry.
 
Some ideas:
Click on the lever and check the layer it is in (possibly in a layer higher than the track?)
Delete the lever and re-add it and retry.

Pitkin , who is attempting to make sessions for my Timber ridge line has this problem in 2019, its definitely situated on the route layer and it presents no issues when I drive it, but he keeps on getting a " missing junction " warning. very frustrating, especially given we're trying to provide more sessions for folks to drive, thus potentially increasing the appeal of your product. I've deleted and replaced the switch, hopefully it might be ok now.

BTW
It looks like the issue with non saving in 2019 you gave suggestions as to fixing was caused by windows defender, once I excluded the trainz folders from scanning it appear to be saving properly, however every time I plug in my ethernet cable a rotating faint white circle appears in surveyor preview window before I select a route or an asset, there's still something wrong with the app.......
 
Pitkin , who is attempting to make sessions for my Timber ridge line has this problem in 2019, its definitely situated on the route layer and it presents no issues when I drive it, but he keeps on getting a " missing junction " warning. very frustrating, especially given we're trying to provide more sessions for folks to drive, thus potentially increasing the appeal of your product. I've deleted and replaced the switch, hopefully it might be ok now.

BTW
It looks like the issue with non saving in 2019 you gave suggestions as to fixing was caused by windows defender, once I excluded the trainz folders from scanning it appear to be saving properly, however every time I plug in my ethernet cable a rotating faint white circle appears in surveyor preview window before I select a route or an asset, there's still something wrong with the app.......

I'm glad the saving issue was resolved. The faint circle is nothing to be concerned about. Tony mentioned that a while back in a thread that I remember seeing but can't find.

I have had missing junctions periodically as well. These occurred after I had merged in a very large route into another one. I wonder if there's a limit to the number of junctions or may be the length of the route became too much for the AI part of the program to handle. When I went back to my original route, sans the addition, the missing lever issue went away. This was in TRS19 and hasn't occurred yet in TRS22.
 
Last edited:
Phil,

Check the position of your levers and ensure they are centered or just on the rear edge of the spline circles. If they're not quite in the area, that will occur. Also, check the track carefully. A twisted track or a funky connection can cause this as well, and of course the issue can be in fact a missing lever. Sometimes, if you delete a spline point on the track, the levers can disappear as well, or move out of position. This is nothing new and has occurred since I can remember back in TRS2004.

This might help you find the so-called missing lever.

Put a track-marks along the track in the section that leads up to the missing lever and well past the junction in question.

Order the AI to drive, with you riding along in the cab.

If the AI continues to drive happily up to the junction, order the AI to drive past it and watch carefully for an all red junction. If there is one, then that's the bugger. This can be caused by the lever being in place with one of the branch tracks not connected to the main track. I've had what appeared to be perfectly good switches only to find that the track wasn't connected.

Sometimes, you'll have a bad spline point that somehow ended up with a piece of twisted track. This will produce a junction lever in the middle of nowhere with nothing connected. I've run into those when I've been busily laying track and then gone on and landscaped. Much later when I setup the AI section, I got the dreaded junction missing lever message.

Other cases, the junctions look fine and deleting and replacing the junction levers fixes the problem for reasons unknown.

And finally, if this is a merged in route, I've had that message come up even though the levers appeared fine in both Surveyor, and in the Session. For some reason, the AI couldn't see them. Going back to my own route without the merge, and everything was fine. This was back in TANE and TRS19 I haven't seen this in ages in TRS22.
 
I think, I have this problem in older sessions, made with older builds. I am in Trainz+ build 119450. A momentary workaround ist to change from the session to surveyor, switching the mentioned junction, and change to driver again.

Regards

Swordfish
 
I have a similar problem after a recent update, not with levers but navigating to the first track marks. I have 2 staging yards at each end. as soon as i command a train to navigate across the route it throws an error unable to find track mark. Loco's then become unusable have to delete and set new locos. Even crashes the game entirely art times. But if i set command to navigate to a track mark past the first one it will cruise through without issue. It will autopilot to them but then i have to control switches for sidings. Trains will navigate into staging without issue. But trying to leave crashes the locos/game.. lol any thoughts?

Doing a complete fresh install now as i have tried several different methods to fix this.
 
I have a similar problem after a recent update, not with levers but navigating to the first track marks. I have 2 staging yards at each end. as soon as i command a train to navigate across the route it throws an error unable to find track mark. Loco's then become unusable have to delete and set new locos. Even crashes the game entirely art times. But if i set command to navigate to a track mark past the first one it will cruise through without issue. It will autopilot to them but then i have to control switches for sidings. Trains will navigate into staging without issue. But trying to leave crashes the locos/game.. lol any thoughts?

Doing a complete fresh install now as i have tried several different methods to fix this.

I've seen that crash in TRS19 but no TRS22. It's as if the AI part of the program locks up and causes the crash.

What I have found is when I run an old session in an updated Trainz version is that the AI are totally unpredictable. The solution that works for me is to open the session for edit in the Session editor and then save it. This updates the session to the latest Trainz version being used and the driver issues seen previously disappear. It doesn't fix the usual quirky AI issues. but it solves the outright free for all and lock ups.

Instead of reinstalling, you might want to try a less drastic measure and run a Database Repair (DBR). It's less painful and so much easier. If a regular DBR doesn't work, a more thorough Extended Database Repair works. To do an EDBR, press the control key while selecting Rebuild database from the Developer menu on the Launcher or in Content Manager.
 
Oh ive tried all the database repairs, deletes, re adds, complete rebuild the area. same thing. open for edit submit, fresh install didn't change anything either. Seems to be just the one area, I have quite the "Frankenstein" route on the go so that probably don't help things. The railroad decided to put that passing siding out of service and just sail through the area now anyway :)
 
- <kuid2:61392:4053:27> : File nocdata.gs, Line 759, ER_NullReference
; <kuid2:61392:4053:27> : Script class: NamedObjectsCacheLibrary
; <kuid2:61392:4053:27> : Object: ScriptableObject{0x1d5735760; asset:SpecReference{<kuid2:61392:4053:27> "Named Objects Library (TANE SP4 and later)"}, class:GSClass{0x47371208: NamedObjectsCacheLibrary}, refcount:6}
; <kuid2:61392:4053:27> : Script callstack
; <kuid2:61392:4053:27> : function $void@NocData::OnWorldModuleInit2(), line 747
; <kuid2:61392:4053:27> : function $void@NamedObjectsCacheLibrary::OnWorldModuleInit2(), line 323
- <kuid2:61392:4053:27> : File nocdata.gs, Line 759, ER_NullReference
; <kuid2:61392:4053:27> : Script class: NamedObjectsCacheLibrary
; <kuid2:61392:4053:27> : Object: ScriptableObject{0x1d5735760; asset:SpecReference{<kuid2:61392:4053:27> "Named Objects Library (TANE SP4 and later)"}, class:GSClass{0x47371208: NamedObjectsCacheLibrary}, refcount:7}
; <kuid2:61392:4053:27> : Script callstack
; <kuid2:61392:4053:27> : function $void@NocData::OnWorldModuleInit2(), line 747
; <kuid2:61392:4053:27> : function $void@NamedObjectsCacheLibrary::OnWorldModuleInit2(), line 323
- <NULL> : File emd2ndgen.gs, Line 369, ER_NullReference
; <NULL> : Script class: emd2ndgen
; <NULL> : MeshObject: <kuid:845493:101633> "EMD SD70 cab mechanism type 2"
; <NULL> : Script callstack
; <NULL> : function $void@emd2ndgen::Attach(GameObject), line 353
- <NULL> : File emd2ndgen.gs, Line 229, ER_NullReference
; <NULL> : Script class: emd2ndgen
; <NULL> : MeshObject: <kuid:845493:101633> "EMD SD70 cab mechanism type 2"
; <NULL> : Script callstack
; <NULL> : function $void@emd2ndgen::InitMeshes(), line 226
; <NULL> : function $void@emd2ndgen::MessageHandler(Message), line 212
- <NULL> : File emd2ndgen.gs, Line 229, ER_NullReference
; <NULL> : Script class: emd2ndgen
; <NULL> : MeshObject: <kuid:845493:101633> "EMD SD70 cab mechanism type 2"
; <NULL> : Script callstack
; <NULL> : function $void@emd2ndgen::InitMeshes(), line 226
; <NULL> : function $void@emd2ndgen::MessageHandler(Message), line 212
- <NULL> : File emd2ndgen.gs, Line 591, ER_NullReference
; <NULL> : Script class: emd2ndgen

I get these every time i command drive to or via next track mark, wich renders the locos un useable and have to reset. These are just a few its a massive list that appears lol
 
Last edited:
Could a different track type on the branch track be a cause?
Try different levers. Use the track straightening tool keyboard "B" on the mainline input track to the junction.
 
Oh ive tried all the database repairs, deletes, re adds, complete rebuild the area. same thing. open for edit submit, fresh install didn't change anything either. Seems to be just the one area, I have quite the "Frankenstein" route on the go so that probably don't help things. The railroad decided to put that passing siding out of service and just sail through the area now anyway :)

Sometimes, sailing through is the easiest thing to do. I had one of those areas myself. This was a simple siding with a branch that led off to a quarry. When the AI got to that spot, they sat there and wouldn't move unless I nudged them past the signal. I even tried track marks to "force" the AI beyond that spot, but they would not go. They would go in the opposite direction fine and if I drove the train myself, there was nothing wrong with the junctions or track. With the utter frustration, I yanked out the siding and made a single ended siding instead of a through track. Since then, there hasn't been a problem in that location.

There's something things you need to watch out for. The AI drivers will what most AI drivers do and that is take the shortest route between points even if that's the slowest route due to track speed. To get around that, you need to use track marks.

To prevent the AI from playing tricks, such as going to the track mark, backing up and continuing through the yard, place the track marks towards the middle of the mainline. I'll go as far as to place a track mark about 50 meters in from the first junction to the through yard, followed by one in the middle, then finally one at the opposite end. Instead of using the Navigate via command, I use the Drive via command which is more specific and doesn't give the AI a chance to ponder the best trip through the yard. Using this method, I have had a 100% success rate in preventing the AI from avoiding the 65 mph mainline in favor of a 15 mph rough and bumpy yard. This also works for wye configurations. Place a marker before and in the middle of each leg of the wye. This assures that the AI has to follow the tracks and not do sneaky things as I saw one driver do once. This driver hit the wye, went up one leg, reversed, and continued in the direction the driver was supposed to be going except backwards. Doing this, the AI was forced to follow the rules and there were no more problems after that.

Keep in mind there is a difference between the two commands. Drive to/via and Navigate to/via.

The Drive via and Drive to commands tell the AI to follow the directions absolutely with no variation. These work very well in such places and those where specific instruction is required. The Navigate to and Navigate via commands are a bit more loose. The AI still has to hit the specified markers but can ponder the shortest way between the points and also work their way around obstacles such as junctions thrown against them or other AI trains.

If your large route is like mine, I wouldn't be surprised. My route is an amalgamation of new construction, mergers and acquisitions, and other bits and pieces. I started the route in early January 2004. It has been renovated and rebuilt in most areas but never completed. When I get to that point where the route is completed, I don't know what I'll do!
 
Back
Top