Sid Meier's Railroads!

Sid Meier's Railroads!

293 ratings
Fix Crashing / LAA manual fix (64-bit Windows)
By Nulano
Does Sid Meier’s Railroads! crash for you every 5 or so minutes? Are you fed up with having to reload autosaves? Do you want to stop these crashes from occurring? If so, follow this easy guide and your game will be fixed in 5 to 10 minutes, without downloading any questionably safe exe files!

Don’t worry; it’s really easy, especially with the screenshots, and there is practically no chance of messing anything up. :)

This is a rewrite of the most popular discussions post for this game, which has over 175 replies!
The "too long, didn't read" short version of the guide:
  1. Make sure you are on 64-bit Windows. If you are on Mac, this guide is not needed.
  2. Install a hex editor such as HxD, available from
  3. Open railroads.exe from the game files in your hex editor as Administrator.
  4. Find the two consecutive bytes "0F 01" near the top, typically at offset 0x014E (in HxD that's row 00000140 and column 0E).
    If you have a non-Steam copy of the game, 0F 01 might be somewhere else. If this is the case, read the "Can't find 0F 01?" section of this guide.
  5. Replace the 0F with 2F by clicking to the left of the number and pressing the 2 key.
  6. You should now have "2F 01". Save and you're done!

See below for the full guide including screenshots.
How does this work? (feel free to skip)
Sid Meier’s Railroads! came out at the time, when applications were starting to be impacted by the 2GiB limit of 32-bit Windows and PCs were transitioning to the 64-bit era, which allows applications to use practically unlimited amounts of RAM.

This 2GiB limitation often causes problem in many 32-bit games released around the year 2006. Microsoft has made a workaround, which allows 32-bit applications to use all 4GiB of RAM addressable with 32-bits, but it is only enabled for applications that claim support for it (as it could cause problems with a few applications). Sadly, the developers of Sid Meier’s Railroads didn’t declare support for 4GiB of RAM, so it is limited to the 2GiB of RAM. That’s what this patch fixes.

Support for 4GiB of ram is declared by a bit in the PE header called the “Large Address Aware” bit, or LAA for short. This guide will show you how to manually set the LAA bit in the game’s exe with a hex editor, which allows the game to use 4GiB of RAM, instead of the default 2GiB.
What do you need?
You should have 64-bit Windows with at least 8GiB of RAM (4GiB might be enough, but I haven’t tried it). If you have 32-bit Windows, please read the 32-bit Windows section at the end. If you are unsure, you can follow these steps courtesy of Microsoft[]:

Originally posted by Microsoft:

Click Start, type system in the Start Search box, and then click system in the Programs list.
The operating system is displayed as follows:
  • For a 64-bit version operating system, 64-bit Operating System appears for the System type under System.
  • For a 32-bit version operating system, 32-bit Operating System appears for the System type under System.

You only need basic computer skills (if you can read this guide, you're fine) and a hex editor.
I recommend using the HxD hex editor[] (you don’t even have to install it).
If you want to use another hex editor, that's completely fine, but beware that the screenshots might not match exactly.
Follow these instructions to apply the patch:

First you need to open your hex editor as Administrator (I’m using HxD).
Now you need to navigate to the Sid Meier’s Railroads! install directory:
Select the game in Steam, click on the gear icon on the right and select Manage > Browse local files.
Find the game exe in the opened directory and open it in your hex editor: Drag the file RailRoads.exe onto HxD / your hex editor.
Note: If you have file extensions disabled, you will only see 'RailRoads' instead of 'RailRoads.exe'.
Now comes the hardest part: Find the two consecutive bytes 0F 01. These should be in the 00000140 row. Click in front of the 0F byte.

It is possible that your exe doesn't match the screenshot below (especially if you have a CD version). If so, follow the instructions in the section Can't find 0F 01? to find the two bytes.
Press the 2 key to change the 0F to 2F. You do not need to delete anything, HxD overwrites text by default.

This is the only change that is required. You should now see this:
Now save the file (File -> Save), close HxD and enjoy your newly the patched game with 95% fewer crashes!
Reverting the patch
If you encounter any difficulties, or want to revert your game for any reason, you can just select Verify integrity of game files... in the game’s properties in Steam. This will undo any changes you’ve made and you will have to follow this guide again, if you wish to re-apply this fix. The patch will also usually be reverted if you reinstall the game, if the developers release any update (there have been no updates since the game’s release on Steam), or if you change the game’s language in Steam.

Can't find 0F 01?
If your exe doesn't match the screenshots above, you can follow these steps to find the bytes 0F 01 in your exe file.

Screenshots provided courtesy of SirDuck from the v1.100, PC Gamer disc version (diagrams drawn by me).

The bytes you need to change are in the second line of the PE header. The location of this header is marked on the fourth line of the file (marked 00000030). Take the last four bytes and combine them in reverse to get the location of the PE header:
Go to the row with the number you got in the previous step (ignoring the last digit, if it's not 0).
You should find 0F 01 in the line below:

If you need more help, please post a comment and send me a your exe or a screenshot (e.g. as a link to Imgur) and I will do my best to help you.
Other issues / Still crashing?
Please note, that this fix isn’t definitive. There are many other problems in this game, although none are so severe. If the game crashes for you before you can even start a new game, there is another problem. It might be caused by your video drivers or compatibility settings.

If you can start a game succesfully, but it still crashes after a few minutes with this patch, try removing any custom maps, or playing with fewer opponents, to decrease memory usage.

If you have any problems, please ask in the comments, and make sure to select Subscribe to thread when posting a comment, so you get notified when I reply to you.
32-bit Windows
This guide can also help you if you have 32-bit Windows, but you will have to do an additional step, which involves modifying Windows. I have not tried this and I personally wouldn’t try it on my primary PC, but you are welcome to try this, if you wish to. I will not be responsible for any damage that is caused by following the steps in this 32-bit Windows specific section. The following is a copy of steps 2 and 3 found on this website[].

Originally posted by

On Windows XP:
Manually edit your boot.ini file by adding ”/3GB /Userva=2900″ to your boot.ini (no quotes). Your boot.ini is normally read only and you will need to change that temporarily while you edit it. To do this, right-click the file and untick “Read Only”. After editing the file, restore the Read-only status. To Edit it manually you can find it on the root of your system drive or go to system properties/advanced tab, settings under ‘startup and recovery’ section, then hit edit. Mine looks like:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Windows XP Professional” /FASTDETECT /NOEXECUTE=OPTIN /3GB /Userva=2900

On Windows Vista/7:
Go to the start menu and in the search box type ‘cmd’, don’t hit enter. Wait until ‘cmd.exe.’ appears on the menu and then right click and select “run as administrator”. Then run this command:
BCDEDIT.EXE /Set IncreaseUserVa 2900
Extra information
The original discussion can be found here. You can read lots of happy responses there from people running various versions of 64-bit Windows.

If you would like to see a video of these steps (not made by me!), there is one linked in the discussion where I originally posted these steps in post #75.

The popular fix used to be a "3GB enabler" script. I didn't trust it (who would trust a random script off the internet?), so I looked for other options. Thanks to my interest in Computer Science, I was studying the structure of exe files, which led me to this manual fix (which is actually easier IMO). The script can be found here[].
< >
HazardHawk Nov 24 @ 3:30pm 
Address space is nothing more than shunted readily accessible data temporarily written into a more active section of the hard drive for purposes of optimization. That is it, that is all it does is hold available readily often needed or active needed data so it doesnt cause the disk hard drive to track back and forth too much both shortening its life and causing sluggishness in the application.

It will all be redundant with the windows 23H2 version upgrade coming soon.

The problem is, Empire asks for 2GB of address space to use. X64 divides that into half as it is listed 2x in the math. 32 bit apps and games can only see the first half to use it. Doubling the size and the same 2x is now giving part 1 the 2GB its needs.
HazardHawk Nov 24 @ 3:30pm 
Virtual address space is space addressed on the hard drive reserved for this purpose while the application is running. It is not included in earlier 32 bit applications, only the last just before 64 bit came out. I know TW and support those, so pardon my examples. Rome TW and Medieval 2 TW are what are considered original format which was portable. Portable type programs do not use Virtual Address Space as to use that a program must be registered upon install to do so.

Move up a Generation to Empire TW and Napoleon, and these are no longer portable being directly registered. THESE are the applications and games with an issue only. Supreme Commander was the first game to find this limitation. Adobe was the first application set which required install path modification to even be able to run in a 64 bit environment.

By the way, I am one of the original 64 Bit developers starting with XP Pro (x64).
Nulano  [author] Nov 24 @ 3:15pm 
@water_vapour1 Thank you so much for your comment, that's great to hear! Enjoy the game :)
Nulano  [author] Nov 24 @ 3:10pm 

"the 64 bit environment splits that as 32x2 under 64 bit and 32 bit games can only see half of their request" - Not sure what you are trying to say here, but it sounds like you are confused about what the number of bits means. The largest 32-bit number is 4294967295, and 4294967295 bytes is equal to 4GiB - that's why 32-bit systems and applications are limited to using at most 4GiB of memory. The largest 64-bit number is 18446744073709551615, so 64-bit systems can in theory use 18EiB (that is 18 exabytes) of memory, but Windows 10 Home is limited to 128GiB for licensing reasons (Windows 10 Pro and higher can use up to 2TiB or 6TiB of memory depending on the license).
Nulano  [author] Nov 24 @ 3:10pm 

"32 bit apps ask for 2GB of address space" - No, apps don't ask for 2GiB of address space, or you would run out of memory really quickly. They ask for many smaller chunks (as many as they need), and the operating system will give them as many as it can. In the past, 32-bit operating systems were limited to giving 2GiB max per application to simplify memory management. Later, when 2GiB was no longer considered "practically unlimited", a change was made where the system could give an app 3GiB in total, but this broke a small number of applications, so the change was made opt-in via the LAA flag which you can set by following this guide. 64-bit operating systems can give the full 4GiB to 32-bit applications that use the LAA flag, not just the 3GiB that you could get with Windows XP.
Nulano  [author] Nov 24 @ 3:09pm 
@HazardHawk I'm really not sure what you are trying to say, but it doesn't seem right.

"Address space is a temporary file on your hard drives" - No, address space is just a mapping between virtual memory addresses and temporary data. This data is preferably stored in physical RAM, but some parts can be temporarily moved to the hard drive by the operating system if your physical RAM is full.
HazardHawk Nov 24 @ 1:32pm 
Sharing this link back to an Empire Total War Guide. Just dont have time to lay this out myself, and you already have, except for the "How this works".

Quick information for you. Address space is a temporary file on your hard drives used to drop recurring needed information to make the game faster rather than it digging through the base files over and over again. The "awareness" is how much the game is allowed to see and use. 32 bit apps ask for 2GB of address space, but the 64 bit environment splits that as 32x2 under 64 bit and 32 bit games can only see half of their request. The other half is there, but it is invisible to 32 bit being 64 bit nature. Increasing the "ask" to 4GB (double size), it is still 32x2 in division, but now that one side it can see is 4gb halved so it gets its needed 2GB it can see.
water_vapour1 Nov 23 @ 3:38pm 
Thank you - seems to have worked. My eight year old is now convinced I'm a hacker / cheater - great to be able to show him the hexeditor / exe file thingummy even if I have no clue what it is or does. Might spark an interest in him. Thanks a million for posting. Great game too - loving it.
woutike Oct 10 @ 12:45pm 
@nulano sorry, my bad, it was because I couldn't find the railroads.exe file, but I found it now. thx for the help, now I can go and enjoy some railroads.
Nulano  [author] Oct 9 @ 1:46pm 
@woutike Why are you looking at Settings.ini? The guide clearly says you need to modify the game executable, not the settings. Try looking at the pictures in the guide.