Elvas Tower: A strange error in my new activity (OR Monogame R114) - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

A strange error in my new activity (OR Monogame R114) Rate Topic: -----

#1 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 14 January 2022 - 07:56 PM

I was test running a new activity that I just created for Blackfoot 3 and I've repeatedly gotten this error. The log file and the .act file (the .act file is uploaded as a .txt file) are attached. Some background: First, Blackfoot 3 is an unsignalled route. My activity runs the player train westbound from North Battleford to Lloydminster. It enters a siding in the yard at Lloydminster and its path ends in that siding. The traffic runs from the West End of the Route at Vermillion all the way east to North Battleford. The traffic trains use the same eastbound path, each train starting between 25-30 minutes after the previous train. The traffic does not begin until the player train is near to or already clear at Lloydminster. However, long before even the first train would start and long before the player train is anywhere near Lloydminster, the sim crashes with the attached log file generated. The log file notes that (presumably) either the player train or AI trains are sharing the same passing paths, except that no passing paths are defined in either the player or the AI trains' paths. The whole idea is that the player train clears the main track to be occupied by the AI trains long before the AI trains arrive there. I've built activities for Blackfoot before with similar pathing, and not had any crashes. And ideas what is causing this? Thanks in advance.

Attached File(s)



#2 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 1,754
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 14 January 2022 - 08:48 PM

This appears to be the problem:-

Warning: Multiple passing paths at the same location, without common branch out, or return switch. Check the passing paths for Train name: PLAYER (number: 0), and other train's paths, which have passing paths at the same locations

#3 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 14 January 2022 - 08:49 PM

^None of the paths have any passing paths defined. However, I did realize one thing--the first AI train (which wouldn't generate for another 30+ minutes into the activity) is too long to fit between the switches at Lloydminster, and the player train is too long to fit in the siding where the player path ends. That may cause an unsolvable deadlock in processing by OR. I tested this theory by resuming the activity from its last save point, and then immediately switching the Player train into manual mode. The train past the point where it had crashed the system without incident. Tomorrow, I will run the activity again to see if I can complete it in manual mode. If the train length is causing the problem when the sim is in auto mode, that may be an issue on unsignalled routes or when the activity calls for a long train that, for example, is too long to make a meet when the activity begins, but where the player train may make setouts along its path (using manual mode) that would shorten it to fit in the siding where it meets an AI train. It might make sense for the developers to look at how the program computes its anticipated meets, etc. on a route that is unsignalled and/or has very long stretches between nodes.

#4 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 14 January 2022 - 11:56 PM

I don't know the part of code about Deadlock management, but you could have a try after checking the Simulation Option "Location-linked passing path processing".

#5 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 15 January 2022 - 05:43 AM

Carlo,

I tried the activity with "Location-linked passing path processing" checked (how I normally run) and unchecked. I got the crash both ways. My theory is this, which I will test later today: On a signaled route, the AI Dispatcher can simply hold a train with a signal if the Dispatcher can find no solution for the player train to meet an AI train. On an unsignaled route, the AI Dispatcher does not have that option, so, if there is no solution for the AI train to meet and pass the player train, the sim errors out and crashes. A possible better option would be to trigger a message, something like "no place in paths for Player Train and AI train to meet or pass." That would tell the player that he/she will have to use the Manual function to figure out a way to accomplish the meet, possibly using what American railroaders called in slang a "saw-by," where two trains, both longer than the siding at their meeting point, would choreograph switching moves at the siding to allow the trains to pass. A type of "saw-by" is what I had planned for my activity at Lloydminster, but I didn't realize that the sim would crash long before the AI trains even launched--the sim anticipating the deadlock almost 40 minutes before the first AI train would "go live."

What might be ideal would be for a second component to be added to the Timetable mode--that is, a provision for providing recognition of "right, Class, and direction" to trains by the AI Dispatcher. This would allow "Extra" trains to be intermixed in Timetable mode with Timetable-driven scheduled "regular" trains.

#6 User is offline   Laci1959 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 910
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 15 January 2022 - 07:26 AM

In reality, this is usually done by splitting the train that arrives earlier into two parts. This, of course, requires three track stations. It works well in TimeTable mode. Even in activity, I think I only know those commands.

#7 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,857
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 15 January 2022 - 09:25 AM

 railguy, on 15 January 2022 - 05:43 AM, said:

I tried the activity with "Location-linked passing path processing" checked (how I normally run) and unchecked. I got the crash both ways.

I hope a solution to your immediate problem can be found quickly.

I also hope we can replace the exception report with a helpful message. Currently we have:

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

You suggest something like this displayed on-screen: "no place in paths for Player Train and AI train to meet or pass."

Displaying on-screen might be going a bit far. After all, this information is needed for content creators, not activity or timetable users. But I think the log file should have a message with as much information as possible (e.g. identify the AI train and its path) and come to a graceful stop without getting to "KeyNotFound" and crashing.

#8 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 15 January 2022 - 02:37 PM

Well, I just got the crash again, even in Manual mode. As far as I'm concerned, this is a bug. One of the purposes of Manual mode is to give the Player the ability to go outside of a normal path or even venture into the path of an opposing train with the understanding that there is a risk of a collision. For the sim to crash because, at some point long into the future of the activity, two trains operating on an unsignaled railroad may have overlapping paths with no "automatic" way for escape to a siding or diverging route is incorrect. This is especially true when, as is the case with this activity that I designed, the AI trains are not intended to even be "live" until the player train is already off the main and in the clear.

I wonder if Subsection 10.16.10 of the OR Manual--"AI train Waiting Point modification through event"--could be used to delay an AI starting down a collision path with a player train until the player train triggers the release of the Waiting Point holding the AI train. For example, in my activity, the player train--70 cars long--is to be split into two pieces at Lloydminster, with each piece spotted on a separate yard track--using Manual mode to effect this. If the player path took the exit to one of those tracks (which it does in my activity, but the single yard track defined by the path won't hold the entire train) at the end of its switching moves and then triggered the Waiting Point to release the AI train, would this stop the sim from seeing a deadlock hours earlier and crashing the sim? I don't know.

As an aside, these issues are not uncommon in "real life" on unsignaled railroads where two trains longer than available sidings may have to meet. In my work on a "real" railroad, I saw this scenario play out periodically.

#9 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 16 January 2022 - 04:05 PM

Well, I solved my problem, but in sort of an "illogical" way. Please read my earlier descriptions of the design of the activity. There is one error in the prior description--the Player train will fit on the yard track that its path enters at Lloydminster, fully clearing the main line that will be used by the AI trains. Apparently, the AI Dispatcher doesn't care about that, only that neither the westbound Player path or the eastbound AI path have any passing paths in order to make a meet. So, my "illogical" solution was to place Passing Paths on the Player train path at the two sidings long enough to fit the Player train between North Battleford and Lloydminster--the sidings at Breslayer and Waseca--(according to the OR manual, such passing paths in the Player train path are usable by either the Player or AI train), knowing full well that the neither the Player train nor the AI train(s) would ever meet at either location. When I ran the activity, I was fearful that the sim would crash once the Player train passed the last passing path available (at Waseca) for a meet, but it did not. I ran the activity all the way to Lloydminster, switched the Player train into the yard tracks (using manual mode for this), then spotted the Player locomotives on the yard track included in the Player path, lined all switches back to the main track for the AI trains, then took the sim back to Auto mode. The "parade" of eastbound AI trains behaved just as they should, continuing to run their full path to North Battleford. Please note that Location-linked Passing Path Processing was checked when I ran the activity.

Designing an activity on an unsignaled route is indeed a challenge if one plans to have meets on the line, but I did figure out how to accomplish it in this case. I should note here that Blackfoot 3 is, without doubt, one of the best routes in MSTS/OR. Beautiful detail, lots of main line and switching opportunities, and realistic operating possibilities. It is also VERY true to the prototype, including, most importantly, that it is unsignaled. If you haven't downloaded Blackfoot3, installed it, and run it, you're missing out on a real treat.

Attached thumbnail(s)

  • Attached Image: Open Rails 2022-01-16 05-28-06.jpg


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users