Elvas Tower: Open Rails Crashes Very Sporadically; RAM issue, or something else? - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Open Rails Crashes Very Sporadically; RAM issue, or something else? Rate Topic: -----

#11 User is offline   Jovet 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 2,251
  • Joined: 14-January 08
  • Gender:Male
  • Location:Omaha, Nebraska.
  • Simulator:MSTS/Open Rails
  • Country:

Posted 26 May 2016 - 02:09 PM

View PostPerryPlatypus, on 26 May 2016 - 12:15 PM, said:

After some testing today, I do believe that RAM is the issue, but I am just a bit surprised by how much RAM the program uses; then again, this is probably the most resource-heavy game I have ever attempted to run on my PC.

Open Rails can be hefty but it doesn't compete with some other games available. I would suspect RW/TS201X requires even more oomph than OR.

View PostPerryPlatypus, on 26 May 2016 - 12:15 PM, said:

I think I was able to slightly reduce the crashes by increasing my "Pagefile" (physical memory?) size. I increased my Pagefile from 3 GB to about 12 GB. I am running on Windows XP.

Memory is divided into what are called pages. Usually with Windows, a memory page is 4096 bytes, or 4KB. When Windows runs out of physical memory, it starts taking memory pages that aren't being used out of physical RAM, and stores them on your hard drive. The file(s) it stores these pages in is the pagefile. When memory pages are paged out to the page file, it makes more room in physical memory to so more memory is available to active programs. If a program needs some data in a memory page that is on disk, then Windows instantly puts that memory page back into physical RAM. The program doesn't know the difference, other than speed. Memory paging is slow, and is a cause of "disk thrashing" that you can experience when your computer is running low on memory. Normally Windows decides how big the pagefile(s) is. Setting it larger can have some short-term benefit but won't solve your problem of simply not having enough memory.

View PostPerryPlatypus, on 26 May 2016 - 12:15 PM, said:

Here is the data from the Task Manager at that peak moment (1450ish MB), which if I interpret this correctly, means that there was just barely any physical memory left! Is that a corrupt interpretation of the below data?
PHYSICAL MEMORY (K)
Total: 2095188
Available: 85652
COMMIT CHARGE (K)
Total: 1923340
Limit: 14504164
Peak: 1923364
Commit Charge: 1878M/14164M (I assume this 14164 is the 12 GB Page file plus the 2 GB Physical RAM)
I assume that the "Available" number under physical memory is dangerously low, correct?

Yes—the theoretical maximum amount of memory that Windows can allocate and guarantee to all applications is the sum of physical memory plus the sizes of all pagefiles, and is also where the "Commit Limit" value comes from. Since you have 1878MB committed, it's normal to be running low of free physical memory. It is not fair to say that low physical memory is automatically "dangerous." Windows memory management is more efficient with lots of small processes. Almost every process has pieces that can be paged out to make room in RAM for other processes. But when you have one or two processes like Open Rails that want tons of memory (1.5G-3G), then it tries to monopolize everything and essentially tries to squeeze-out all the background processes that are also trying to do their work. As everything that is not Open Rails cannot be paged out, you're hitting your virtual limit for how much memory Open Rails can have. This is why making the pagefile bigger doesn't really help you.

View PostPerryPlatypus, on 26 May 2016 - 12:15 PM, said:

For the record, the reason I have abstained from purchasing more RAM is because if I understand correctly, my old computer's power supply cannot really handle anymore. Is that correct?

The power supply is not a limiting factor to how much memory your computer can handle. The motherboard can only accept so much memory (this can vary widely), and your version of Windows can only recognize and address so much memory. Your version of Windows should be able to handle 4GB of memory without much hassle. The downside is that with a 32-bit version of Windows, Microsoft decided that Windows is only capable of addressing 4GB of RAM. And since video memory is mapped into main memory, your 1GB of video memory on your video card will subtract that whole 1GB from the 4GB maximum. That means that you can only get Windows to recognize 3GB of memory in your computer. This assumes your motherboard can handle more than 2GB, though I would be surprised if it cannot. Whether it makes more sense to throw money at this computer for more memory or instead put it towards a newer, better system is your choice. I'd vote for the latter.

#12 User is offline   RTP 

  • Conductor
  • Group: Status: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 26 May 2016 - 03:12 PM

After having lot of troubles like that, I decided to buy a new computer.
Is an HP Z220 workstation, CPU XEON eight cores, Nvidia Quadro 2000, 4Tb of disk space and so.
And W7 64 prof.

All the troubles are gone, and sometimes I can hit 60fps with dynamic shadows enabled.
In my opinion, well invested money.

Regards.

#13 User is offline   PerryPlatypus 

  • Fireman
  • PipPipPip
  • Group: Access 1 Open Rails Forums
  • Posts: 194
  • Joined: 13-January 10
  • Gender:Male
  • Location:Spokane, WA
  • Simulator:Open Rails
  • Country:

Posted 26 May 2016 - 08:51 PM

Okay, I don't think it's 100% an issue on my end. I managed to find an additional 2 GB of RAM in a computer in our house that we no longer use. As Jovet mentioned, it did not quite bring it up to 4 GB, but instead to 3.5 GB, still a great increase. I tested a train and managed to make it about 20 miles without an issue, until I was moving the camera around my rear DPU. At that moment, the RAM usage by Open Rails was around 1100 MB, and Task Manager indicated I still had a full 2 GB of RAM free in the Physical Memory "available" category, and yet the program still crashed with the same old memory message. CPU usage at the moment was around 60%. So there is clearly something else is still going on here, either another issue with my system, or a problem with Open Rails itself. I am tempted to proceed withsuperheatedsteam's advice to add OR to to the DEP exception list. Has anyone gone ahead with that and noticed improvements? Is there any risk to my system by doing that?

Also, I have experienced crashes both when RAM usage in the F5 HUD is up in the 1200+ MB range, and also down around only 700 MB, so there is not a total correlation there.

#14 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,492
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 28 May 2016 - 11:09 AM

View PostPerryPlatypus, on 25 May 2016 - 09:52 PM, said:

Sometimes within a minute or two, sometimes after 20 minutes, for no apparent reason, the simulator crashes. Performances is ranging from 20 to 40 FPS. I have a rather old computer to be sure, however, the reason I find this to be very fishy is that I can run activities in MSTS that are much more complicated with many AI trains in areas with dense scenery, and the program almost NEVER crashes, except due to legitimate errors. Also, I do not feel with my current settings that I am by any means pushing the limits of the game, and yet it continues to go belly up. :(

As has been mentioned, MSTS and OR stress systems in entirely different ways and it is not usually worth comparing resource usage or crashy-ness.

View PostPerryPlatypus, on 25 May 2016 - 09:52 PM, said:

There are a plethora of other secondary issues that I am running into, but I will stick to just this for now. Is this due to my system having relatively little RAM? The reason I find this odd is that I never saw the RAM usage get to a very high value, always less than half of my 2 GB.

This crash is not directly because of a limited amount of RAM. The error is occuring in the native OpenAL component used to play sound. My suspicion is that we're (OR) doing something dodgy and it's simply much more likely to happen on your machine - which could be due to it's limited RAM - but it is not a problem with your machine itself.

I noticed in your log that you have the dispatcher view enabled; this has in the past sometimes caused more instability in OR, so you could try turning that off, at least as an experiment.

View Postjovet, on 26 May 2016 - 03:44 AM, said:

Should the Minimum and Recommended Requirements be increased, perhaps?

That's the old, archived website. The current download page says "Memory : minimum = 0.5 GB, recommended = 2 GB" which might be a bit tight on minimum but the real problem is content - that's what massively affects the memory used by OR.

View PostPerryPlatypus, on 26 May 2016 - 12:15 PM, said:

After some testing today, I do believe that RAM is the issue, but I am just a bit surprised by how much RAM the program uses; then again, this is probably the most resource-heavy game I have ever attempted to run on my PC. I think I was able to slightly reduce the crashes by increasing my "Pagefile" (physical memory?) size. I increased my Pagefile from 3 GB to about 12 GB. I am running on Windows XP.

We are also not nearly as memory effecient as we could be. :(

But as above, it depends a lot which content you use - just as a test, the MSTS in-box Hisatsu Line activity "Low Fuel" (which is also low on detail) uses 250 MB at the start, while the Mid East Plus activity "Baby Blues" (which is highly detailed) uses 1200 MB at the start (with the same OR settings, as measured by the HUD DEBUG page).

View PostPerryPlatypus, on 26 May 2016 - 12:15 PM, said:

CPU usage typically held in the 50% to 70% range (but occasionally would spike for a split second to over 100%, even 200%??) while RAM got up to as much as about 1450 MB (wow). It would usually bounce back down by a couple hundre (I assume from "dumping" the RAM in previous tiles that were being "un-loaded"?), Here is the data from the Task Manager at that peak moment (1450ish MB), which if I interpret this correctly, means that there was just barely any physical memory left! Is that a corrupt interpretation of the below data?

The "total process" value will often go above 100% when it's working with a lot of detail or complicated simulation, since OR takes advantage of multiple processor cores in your machine (and hyper-threading when available).

1450 MB memory is not unexpected for a recent/detailed route, especially in built-up areas, even with the default view distance and settings.

View PostPerryPlatypus, on 26 May 2016 - 12:15 PM, said:

I assume that the "Available" number under physical memory is dangerously low, correct? As mentioned, I am pretty amazed that the memory being used by OR is so high, even with Model Instancing turned on, but it does indeed look like memory is my bottleneck. Do any of you have any other important insight from any of the data I provided?

In Windows XP, the "Available" number shown in Task Manager represents modified, standby, and free memory - which means that low numbers are indeed an indication that you'd benefit from more RAM or more effecient programs.

FWIW, model instancing doesn't actually save much memory (only a tiny bit of main RAM), but it also won't have a negative effect.

The settings which do affect the memory usage significantly are:

  • Viewing distance (lower is better)
  • World object density (lower is better)
  • Load night textures only when needed (on is better) - not 100% sure this will affect main RAM but certainly helps GPU RAM


View PostPerryPlatypus, on 26 May 2016 - 08:51 PM, said:

So there is clearly something else is still going on here, either another issue with my system, or a problem with Open Rails itself. I am tempted to proceed withsuperheatedsteam's advice to add OR to to the DEP exception list. Has anyone gone ahead with that and noticed improvements? Is there any risk to my system by doing that?

Also, I have experienced crashes both when RAM usage in the F5 HUD is up in the 1200+ MB range, and also down around only 700 MB, so there is not a total correlation there.

Yeah, this goes with my theory above: this is not a limited memory problem, but instead a bug in Open Rails. I have seen similar stack traces before.

#15 User is offline   RTP 

  • Conductor
  • Group: Status: Active Member
  • Posts: 254
  • Joined: 14-June 09
  • Gender:Male
  • Location:Barcelona
  • Simulator:Open Rails
  • Country:

Posted 28 May 2016 - 11:25 AM

In my experience, an slow hard disk can make the system crash.

Regards.

#16 User is offline   PerryPlatypus 

  • Fireman
  • PipPipPip
  • Group: Access 1 Open Rails Forums
  • Posts: 194
  • Joined: 13-January 10
  • Gender:Male
  • Location:Spokane, WA
  • Simulator:Open Rails
  • Country:

Posted 02 June 2016 - 04:16 PM

James,

I think you may have nailed it on the head with the problem being related to Open AL. I hadn't noticed before, but every time I have gotten an error since then, I see mention of Open AL (and as mentioned before, this can occur even when the Task Manager indicates I have 2 GB or more of available RAM). Just for the sake of understanding things better, what do you mean by Open AL being "native"? Does that imply it is part of the Open Rails install, or something else? Is there any way to make Open Rails use a different component to play sound, or would that be an extremely complex task involving re-writing the whole sound code for Open Rails? I have tried reducing the Sound Detail level, and that does not solve the issue. I think it may have to do with OR not being able to easily handle these long freight trains with dozens or even hundreds of pieces of rolling stock fighting to output their own audio.

For the record, I very frequently can hear weird effects with the sounds, such as my engines sounding like jet airliners taking off (I presume from having the same sound playing simultaneously from multiple locomotives) and I experience a great deal of scratchy static background, which would seem to me as evidence of the game being overloaded with too many sounds.

It is rather disheartening, as I usually cannot run an activity for more than about 30 minutes without a crash, and that is while staying in the cab. Frequent camera movements around the train usually kills the simulation within 5 or 10 minutes tops. :( I do hope that some manner of priority can be given to tracking down what is causing this.

EDIT: I have been able to duplicate an error over and over at the exact same location on the Horseshoe Curve route. I get the error regardless of Sound Detail level, and regardless of whether MSTS Bin Compatible sound is on or off. Attached is a log file for that error.

Attached File(s)



#17 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,492
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 06 June 2016 - 11:46 AM

View PostPerryPlatypus, on 02 June 2016 - 04:16 PM, said:

Just for the sake of understanding things better, what do you mean by Open AL being "native"? Does that imply it is part of the Open Rails install, or something else? Is there any way to make Open Rails use a different component to play sound, or would that be an extremely complex task involving re-writing the whole sound code for Open Rails? I have tried reducing the Sound Detail level, and that does not solve the issue. I think it may have to do with OR not being able to easily handle these long freight trains with dozens or even hundreds of pieces of rolling stock fighting to output their own audio.

By "native" I mean that the OpenAL component uses a language without as much memory safety as Open Rails itself - OR is written in C# and .NET, which means we can't corrupt memory ourselves, but we can corrupt memory when we talk to a native component (whether that is OpenAL, operating system functions, or something else). The problem might be a bug in the way we talk to OpenAL, a bug in OpenAL itself, or something less likely like your sound driver doing something odd.

Unfortunately, I don't know of much you can do to help except to turn sound off entirely (sound detail level of 0). :(

View PostPerryPlatypus, on 02 June 2016 - 04:16 PM, said:

EDIT: I have been able to duplicate an error over and over at the exact same location on the Horseshoe Curve route. I get the error regardless of Sound Detail level, and regardless of whether MSTS Bin Compatible sound is on or off. Attached is a log file for that error.

I know it is not ideal, but does it still crash if you have sound detail set to 0?

#18 User is offline   PerryPlatypus 

  • Fireman
  • PipPipPip
  • Group: Access 1 Open Rails Forums
  • Posts: 194
  • Joined: 13-January 10
  • Gender:Male
  • Location:Spokane, WA
  • Simulator:Open Rails
  • Country:

Posted 06 June 2016 - 01:31 PM

So it turns out that I did not check every Detail Level, as I had just made a sweeping assumption. I just ran that Horseshoe Curve spot again, I managed to not get any error when at a Detail Level of 1 for sound (and as expected, 0 gave no issues as well) I repeated a few times with Level 1 and higher levels and I am getting 100% consistent results (Levels 0 and 1 give no problem, anything higher than 1 results in a crash), so for now, even though it is not ideal, I will be sticking to Detail Level 1 until a solution can be figured out.

For what it's worth, this error occurs consistently as I approach the first crossing encountered when I start at Alto heading towards Johnstown (probably 20 or 30 meters before the crossing).

If I were to discover it was due to my dated sound drivers that could be easily updated, that would be amazing news. :) In fact, I tried updating the sound driver a couple days ago for this reason, but I ended up really boogering it up (sound would not play at all, my system would not recognize any drivers) so I was forced to revert back using a Restore Point. I am not knowledgeable at all about sound drivers when it comes to how to tell what specific upgrades exist for my specific system. I do not know whether I need an ultra-specific driver for my specific sound card and operating system, or what it comes down to... I don't even know for certain how to find the real name for my sound card haha.

#19 User is offline   Jovet 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 2,251
  • Joined: 14-January 08
  • Gender:Male
  • Location:Omaha, Nebraska.
  • Simulator:MSTS/Open Rails
  • Country:

Posted 06 June 2016 - 08:09 PM

View PostPerryPlatypus, on 06 June 2016 - 01:31 PM, said:

I don't even know for certain how to find the real name for my sound card haha.

A quick place to look is the Device Manager. You can find that in the "System" Control Panel.

If you want (lots) more (detailed) information, you can grab a utility like HWiNFO.

View PostPerryPlatypus, on 06 June 2016 - 01:31 PM, said:

If I were to discover it was due to my dated sound drivers that could be easily updated, that would be amazing news. In fact, I tried updating the sound driver a couple days ago for this reason, but I ended up really boogering it up (sound would not play at all, my system would not recognize any drivers) so I was forced to revert back using a Restore Point. I am not knowledgeable at all about sound drivers when it comes to how to tell what specific upgrades exist for my specific system. I do not know whether I need an ultra-specific driver for my specific sound card and operating system, or what it comes down to...


If your computer came off the shelf, then you should check the manufacturer's website for your model of computer and updated drivers.

If that is not the case or is insufficient, then with the knowledge of what exact sound hardware you are dealing with, you should be able to search the internet to find the manufacturer's web page and get drivers from it.

  • 2 Pages +
  • 1
  • 2
  • 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