Elvas Tower: Debugging Msts Aborts - Elvas Tower

Jump to content

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

Debugging Msts Aborts Rate Topic: -----

#1 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 December 2007 - 11:37 AM

Almost everyone has experienced at least one MSTS abort at one time or another and no doubt those who have have also been frustrated at the lack of information provided that might guide one to figuring out what's gone wrong.

I've recently found a tool that might just change all of that: Process Monitor, from Microsoft. It can be found here.

It's not the easiest thing to learn and use -- I'm still working my way thru it -- but I've had enough success that I feel confident I can explain the basics so others can get started.

I'll attached screenshots and comments below.

Oh, important note: Process Monitor is doing a lot of stuff so when you use it expect everything on your PC to slow down. use it when you need to but don't leave it on all of the time.

First Screen is what Process Monitor looks like when you start it up:

Attached File(s)



#2 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 December 2007 - 11:47 AM

The first thing you want to do is add a filter for Train.exe. You really want to do this because there are hundreds of thousands of things going on your PC and everyone of them is about to be logged by Process Monitor. The filter tool is essential.

In screen 1 you see I've already added Train.exe -- that's the green one on the top of the list. It was saved from my last session. By choosing just Train.exe I'm setting Procee Monitor to display just entires for that program and to suppress display of everything else (all the red stuff).

The steps to add a filter are easy:

In field 1 you use the pull down list to choose "Process Name".
In field 2 you set the second pull down to "IS" and in the next space you type Train.exe
In field 3 you click on ADD to put it into the list and then Okay to save it.

Attached File(s)



#3 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 December 2007 - 11:49 AM

Alright then, I start up RE and let it do the lead in screen only.

Attached File(s)



#4 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 December 2007 - 11:55 AM

Here's the first results. Note the information in the lower left corner: "Showing 17,158 or 162,732". Process Monitor has already logged 162,000+ events
and the screen display has 17,000+ for you to look at. And that's just the starting screen of RE!

Now if you scroll around looking for interesting things, you might come upon data as shown in the second screen. It's .wag files. As opened by RE. I never
knew RE looked at .wag files.

Attached File(s)



#5 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 December 2007 - 11:58 AM

You may have noticed in last screenshot, above, that a single file appears on multiple lines. There are times you want to see all of that... and times you don't.

The first screenshot shows one example of how you can filter out a lot of those rows... the one I happened to pick worked out well enough, as you can see
in the second shot, below... down to just 1000+ lines. Much better (for now).

Attached File(s)



#6 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 December 2007 - 12:06 PM

Now I want to return to RE... so I go thru the usual steps of selecting a route and displaying the start tile. I'm not going to screenshot all of that.

What I do want to mention is that if I have successfully got to the start tile, there's no sense in hanging on to all of the tens of thousands of logged
entires that have been accumulated to this point by Procmon, so....

This screenshot highlights the clear button and as you can see I've already clicked on it as the logged entires are gone.

My normal sequence of activity at this point is to enter in a tile to jump to. I'm not going to screenshot that either as it's nothing special, but
the next post will be after the jump.

Attached File(s)



#7 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 December 2007 - 12:10 PM

Jumping from one tile to another causes Train.exe to read a lot of files so once again, there are thousands of lines. Fortunately the Find function helps to
move you to points of interest.

Screen one shows the find Icon.
Screen two shows me entering the last 3 digits of the tile I jumped into.
Screen three shows the found line.

Attached File(s)



#8 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 16 December 2007 - 12:23 PM

You can see in the last screenshow, above, a small portion of the normal sequence of events used by Train.exe, in this case it's reads files from \tiles before it reads files from \world; and once it starts reading from \world it goes world file at a time and reads all of the files from \shapes that are recorded in each world file. Not shown are the reads from \textures, but they're in the listing too.

Here's what you can do with all of this:

If there is an abort, you can use this data to track down what file -- program of data for the game -- was the last thing that the program attempted to use. It can be a bit tedious at first, but the basic steps are simple: you start at the bottom and use the Find function (or scroll) to work your way up to the last meaningful lines.

For instance, if you havn't a clue as to what's gone wrong, going to the end and then searching up for the name of the route is very likely going to put you at, or near, some lines that'll provide that clue.

The other day I made changes to 40-50 different shape files. And then RE would abort when I jumped into any one of several tiles. Rather than methodically check (or rollback all 40-60 files, I fired up Process Monitor, worked my way up the list, and found the name of the cul;pret file -- it was the last one the game tried to read before it blew up. I rebuilt that file, moved it into \shapes, ran RE again, and everything was fine. I imagine I saved myself quite a bit of time.

In a similar fashion, you can use the same techiques after installing bin (should it not want to run). Process Monitor will show you all of the program files it's using, in the order it's trying to use them. Again, the last one listed is likely the culpret.

Moving on... something else I've learned: by checking the list of files being opened I came to realize there are advantages to having a good sort of files in your world file. I now add slider values on all objects in congested tiles: 0 for all \global files and higher numbers for ordinary files in the routes \shapes directory.

I also preload commonly used shape and texture files in tiles that are typical scenario starting points. If any of those shapes or textures are found in adjacent tiles they are not read a second time when you move into those tiles as they're still in memory. A minor gain, but it works.
============

I hope some of you find this as useful as I have. It's been a real timesaver.

Edit
P.S. Please understand that Process Monitor is not going to give you a message that indicates "Here is your problem". It only gives a listing of what the program was actually doing. You're going to have to figure out from that listing what the problem most likely is -- and whatever it was, it is most likely going to be near the end (as in within a few hundred unfiltered lines) of the recorded lines for Train.exe... you know, where the abort occurs
:lol:

This post has been edited by Genma Saotome: 08 December 2008 - 03:00 PM


#9 User is offline   wacampbell 

  • Member since Nov. 2003
  • Group: Fan: Traction Nuts
  • Posts: 2,415
  • Joined: 22-November 03
  • Gender:Male
  • Location:British Columbia, Canada
  • Country:

Posted 16 December 2007 - 12:31 PM

Thanks for the detailed explanation. This does look like a useful technique. I sure wish I had know about this a few years back.

#10 Inactive_LVF_*

  • Group: Status: Passengers (Obsolete)

Posted 29 December 2007 - 11:23 AM

Dear David,

When you say:

"I also preload commonly used shape and texture files in tiles that are typical scenario starting points. If any of those shapes or textures are found in adjacent tiles they are not read a second time when you move into those tiles as they're still in memory. A minor gain, but it works."

How does one preload tiles?

Yours truly,
Leland

#11 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 29 December 2007 - 12:05 PM

What I mean by preloading is to force the sim to do the disk read files well in advance of when they are actually needed. This can be done by placing objects well under ground in the tile or tiles ahead of where the objects will display.

It only makes sense to do when you can take advantage of fairly empty tiles that are close to congested ones... or tiles that are used as start points for many scenarios as then the cost of reading is borne by either by a fairly empty tile or the scenario initialization phase where you don't care about the extra delay.

One could even get fancy and preload just the textures: create a long cube or flat plane and texture a small part of it w/ a part of a big texture. Repeat w/ another texture in another spot. The cube itself will slowly increase it's poly count as you add more textures, but it's a small number of polys compared to placing the actual objects. The sim is going to see it has a lot of textures to load for this object and so you pay the disk price to get them but as the shape is trivial the burden on the video card to figure out what to do is trivial. And texture files are often much larger than objects. When you move down the line to the next load points, most of the disk work has already been done.

#12 User is offline   inflammable 

  • Engineer
  • Group: Posts: Active Member
  • Posts: 704
  • Joined: 19-January 06
  • Gender:Male
  • Location:Lexington, KY
  • Country:

Posted 18 January 2013 - 11:47 AM

Hello Dave, and others from 2007,

I'm attempting to install Process Monitor, as you suggested to me in another post. By the way, the above download link is broken, but I was able to find it here.

When I click on the .exe file, from the zip, I got an error message about allocating sufficient memory. I have a screenshot attached. Well, I was going to attach it, but for some reason that isn't an option for me right now. The message reads: "procmon was unable to allocate sufficient memory. Try increasing the size of your page file."

I searched on google for that, but didn't find anything helpful. One suggested enabling ASLR, but research on that reveals that my XP machine probably doesn't have that anyway.

Any suggestions?

Thank you,

James

#13 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,640
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 18 January 2013 - 02:52 PM

No idea. Some years a go I did run this utility on xp but perhaps the version you obtained recently is only for Win7 (I cannot think of any other reason offhand why it would not work).

Good luck!

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