FIX: Crash in BF1942.EXE when map is loading.

Post Reply
User avatar
Trench
Admin
Admin
Posts: 2908
Joined: May 22nd, 2012, 3:19 am
Location: Dallas / Fort Worth
Contact:
United States of America

FIX: Crash in BF1942.EXE when map is loading.

Post by Trench »

If you are experiencing an issue where BF1942.EXE will crash when loading the initial map or when loading the next map, and simply restarting Battlefield 1942 to try connecting and loading the map again will randomly succeed or crash the same way again, here is a fix you may want to try.

This fix is currently solving the issue for me, which I hadn't started experiencing until after the latest rebuild of my gaming machine. Based on the root cause of the crash that was identified, I expect other players can be randomly having the same issue.


INSTALLATION:

To install, download the attached .ZIP file and extract the contained "Battlefield 1942 FaultTolerantHeap shim.sdb" file to a temporary directory, such as on your Windows desktop.
Battlefield 1942 FaultTolerantHeap shim v1.zip
Next, start a Command Prompt using "Run as Administrator", and then run the following command line, adding the full path to where the .SDB file was extracted, if necessary:

Code: Select all

     sdbinst.exe "Battlefield 1942 FaultTolerantHeap shim.sdb"
For example:
install.png
Note: The sdbinst.exe program is a standard tool already included with Windows, and Is not something delivered with this package.

If successful, you will see a confirmation message of "Installation of Battlefield 1942 FaultTolerantHeap shim complete." If you forgot to use "Run as Administrator", you will not see this confirmation.

The settings usually come into effect immediately, but if there is any question of whether they are in effect, you can restart Windows before launching BF1942.EXE again to ensure the new settings will be used.


USAGE:

Simply start and play Battlefield 1942 normally. With the "Battlefield 1942 FaultTolerantHeap shim" installed, Windows is watching for any time you run BF1942.EXE and will automatically apply the fix settings when executing that program.


REMOVAL:

You can remove this fix at any time by going to the Add/Remove Programs control panel application, select the entry you now see in there for "Battlefield 1942 FaultTolerantHeap shim", and select "Change/Uninstall" to initiate removal.


BORING BACKGROUND STUFF:

This Microsoft Windows Application Compatibility Toolkit (ACT) shim intends to mitigate issues which have been observed in both the Origin-delivered BF1942.EXE program for Battlefield 1942, and also in the original CD-based BF1942.EXE for Battlefield 1942, as well as in the third-party modified BF1942.EXE files which have been created for both of these Battlefield 1942 releases.

An application compatibility shim database (.SDB) is a feature of Microsoft Windows for creating fixed behaviors for an application, in cases where the application is no longer compatible with current versions of Windows and cannot be fixed or supported by the application's original publisher.

The BF1942.EXE application has been observed to continue referencing memory which the application had already explicitly freed. To mitigate this issue, the application compatibility shim provided here will cause Windows' internal "Fault Tolerant Heap" facility to be used, which will help mitigate many if not all of the random crashes which can occur due to the faulty BF1942.EXE application behavior.

Note this shim also forces the "Run with compatibility for: Windows XP (Service Pack 3)" and also "Run as Administrator" behavior, if you had not already enabled those compatibility tab options in your Battlefield 1942 shortcut.

-Trench
You do not have the required permissions to view the files attached to this post.
User avatar
Trench
Admin
Admin
Posts: 2908
Joined: May 22nd, 2012, 3:19 am
Location: Dallas / Fort Worth
Contact:
United States of America

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by Trench »

Barrel Roll, if you happen to be reading this, just a follow-up question to the information you gave in-game yesterday. You indicated that you are seeing a crash when Battlefield 1942 starts and/or is loading maps, but that the "Battlefield 1942 FaultTolerantHeap shim v1.zip" provided above did not resolve the situation, either.

You had also indicated "I noticed it has to do with my system, my Intel based PCs dont crash, AMD based ones do." Does that also happen to be an indication of "my Windows 32-bit versions don't crash, but my Windows 64-bit versions do?" Or is even the Intel-based PC also running Windows x64, and/or the AMD machines are actually running 32-bit Windows.

All the crashes I've been seeing here at my end have been on Windows x64 on an Intel EM64T-based processor, and I'm just looking for whatever other bits of correlation data we can put together. Thanks.

-Trench
User avatar
Raptor22
Member
Posts: 37
Joined: March 5th, 2010, 2:25 pm
United States of America

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by Raptor22 »

Trench,

I have multiple desktops in the house and they are somewhat mixed platform-wise. I have 1942 installed on 2 computers currently, an Intel i7 3770K based system, and an AMD A10 6800K APU (no dedicated graphics atm). Both are running Windows 7 Pro 64-bit. I have never seen my 3770K system crash even once, but my A10 system would crash half the time on startup. I never had to apply the fix to my Intel system either.

Hope it helps... I can't provide much help with software, as I am more of a hardware enthusiast.
"The fascination of flight can't be expressed with words. But it really lies beyond the capabilities of human endeavor. Once you've experienced it, you'll never be able to forget it." - Friedrich Oblessor

"It's the man, not the machine." - Chuck Yeager
User avatar
Trench
Admin
Admin
Posts: 2908
Joined: May 22nd, 2012, 3:19 am
Location: Dallas / Fort Worth
Contact:
United States of America

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by Trench »

Raptor22 wrote:I have never seen my 3770K system crash even once, but my A10 system would crash half the time on startup. I never had to apply the fix to my Intel system either.
Thanks for the info. When you say "I never had to apply the fix to my Intel system either", does that mean applying the "Battlefield 1942 FaultTolerantHeap shim.sdb" does have an effect, does not have an effect, or hasn't been attempted?

Yeah, I was caught a bit off guard by the crashes. I re-installed by existing Windows 7 SP1 x64 machine because of other problems I was having, and after re-installation just my CD-based install of BF1942.EXE now crashed 90% of the time even though Origin was fine. Software debugging techniques confirmed there has been an issue in BF1942.EXE all along, and the FaultTolerantHeap is the right way to mitigate the issue identified and seems to be solving it for me.

But I'm getting hints that apparently there may be more than one issue, such as Barrel Roll indicating that his machine continues to crash even with "Battlefield 1942 FaultTolerantHeap shim.sdb" applied.

-Trench
User avatar
Raptor22
Member
Posts: 37
Joined: March 5th, 2010, 2:25 pm
United States of America

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by Raptor22 »

Trench wrote:When you say "I never had to apply the fix to my Intel system either", does that mean applying the "Battlefield 1942 FaultTolerantHeap shim.sdb" does have an effect, does not have an effect, or hasn't been attempted?

-Trench
It's never been attempted, because it never crashed in the first place.

At this point I can only assume that Intel CPUs are more stable than AMD CPUs at this game, running anything later than Windows XP. I had an i5 3570K for the longest time and that configuration never crashed in this game either. When I had Windows Vista (a long time ago) running an AMD Athlon X2 6400+, that system would crash this game over and over as well. Just an observation.
"The fascination of flight can't be expressed with words. But it really lies beyond the capabilities of human endeavor. Once you've experienced it, you'll never be able to forget it." - Friedrich Oblessor

"It's the man, not the machine." - Chuck Yeager
User avatar
=IAM= Allen
Member
Posts: 21
Joined: May 14th, 2014, 4:41 pm

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by =IAM= Allen »

I tried the fix. I ran in to a prob right away. The files name was too long. *In the attachment it is "Battlefield 1942 FaultTolerantHeap shim.sdb" so I cut it down to "BF1942_shim.sdb"*

Next it seems I have to run the file every day. I guess not everything the shim.sdb dose is not saved on my PC.
User avatar
Trench
Admin
Admin
Posts: 2908
Joined: May 22nd, 2012, 3:19 am
Location: Dallas / Fort Worth
Contact:
United States of America

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by Trench »

=IAM= Allen wrote:I tried the fix. I ran in to a prob right away. The files name was too long. *In the attachment it is "Battlefield 1942 FaultTolerantHeap shim.sdb" so I cut it down to "BF1942_shim.sdb"*
Next it seems I have to run the file every day. I guess not everything the shim.sdb dose is not saved on my PC.
Both issues kind of unusual. I can't think of any Windows file system that wouldn't support "Battlefield 1942 FaultTolerantHeap shim.sdb". Note that you do have to put quotes around the name, just like in the instructions. Not due to length, but due to the spaces in the name.

The only thing I can think of for "must re-run every day" is if the registry isn't saving due to a Windows crash on shutdown or similar. The SDBINST.EXE copies the .SDB file into Windows own directory where it keeps copies of the installed .SDBs, and then updates the [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB] registry key to reflect that the .SDB is installed. If those things didn't happen, you would get an error message during installation.

When you re-run the SDBINST.EXE command line to install the shim again, do you get an error message like: "An installed file with the same ID was found. Replace it? (Yes/No)" If not, it very well could be because the system is crashing before the registry changes are committed, so Windows reboots and it's as though you never performed the installation.

Not sure what else to suggest.

-Trench
User avatar
=IAM= Allen
Member
Posts: 21
Joined: May 14th, 2014, 4:41 pm

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by =IAM= Allen »

Yes I did use quotes around the name but it gave an error.

Yes every day I get the "An installed file with the same ID was found. Replace it? (Yes/No)" option. I replace it and things work fine. If I don't run it again I'm back to crashes.
User avatar
Raptor22
Member
Posts: 37
Joined: March 5th, 2010, 2:25 pm
United States of America

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by Raptor22 »

Here's another thing I've noticed. BF1942 and DC 0.7 do not crash nearly as much as DC Final.

95% of the time loading a DC 0.7 or BF1942 map, it WON'T crash.
50-70% of the time loading a DC Final map, it WILL crash.

Another observation.
"The fascination of flight can't be expressed with words. But it really lies beyond the capabilities of human endeavor. Once you've experienced it, you'll never be able to forget it." - Friedrich Oblessor

"It's the man, not the machine." - Chuck Yeager
User avatar
=IAM= Allen
Member
Posts: 21
Joined: May 14th, 2014, 4:41 pm

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by =IAM= Allen »

Seen this too.

I never had a crash prob tell about the time Win 7 SP1 came out. The more mods the game has to load the crash become more likey.
User avatar
Trench
Admin
Admin
Posts: 2908
Joined: May 22nd, 2012, 3:19 am
Location: Dallas / Fort Worth
Contact:
United States of America

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by Trench »

UPDATE:

I'm about ready to give up on the "Battlefield 1942 FaultTolerantHeap shim.sdb" shim. Although it did make my crashes in the CD-based Battlefield 1942 go away, I actually started /getting/ infrequent crashes in the Origin-based Battlefield 1942 once the shim was installed, even though the Origin-based Battlefield 1942 hadn't been crashing for me previously.

From an .EXE debugging standpoint, we can see that both the CD-based and Origin-based BF1942.EXE have issues, and one of those issues is something the shim would address. But I think what I'm seeing now is that there are still other issues in BF1942.EXE which haven't been mitigated, and the fact that the shim changes how memory de-allocation is managed "moves the problems around" but doesn't actually address them.

At this point, I have uninstalled the "Battlefield 1942 FaultTolerantHeap shim.sdb" shim by simply uninstalling the "Battlefield 1942 FaultTolerantHeap shim" entry in the Windows Add/Remove Programs control panel applet.

What I am doing now is, in addition to the "Run this program as an Administrator" setting in the "Compatibility" tab of my BF1942.EXE shortcuts, is I set "Run this program in compatibility mode for:" set to "Windows NT 4.0 (Service Pack 5)" instead of "Windows XP (Service Pack 3)". Here is the example screen shot provided by tuia over in the Team-SiMPLE forums:

Image

This was originally suggested by seventy over in the Team-SiMPLE forums. So far, I have not had any crashes since changing to NT 4.0 compatibility instead of XP SP3, but only time will tell.

-Trench
User avatar
=IAM= Allen
Member
Posts: 21
Joined: May 14th, 2014, 4:41 pm

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by =IAM= Allen »

I seem to fix my crashes when I updated to the gamespy fixed bf1942.exe. I now nolonger have to run the Battlefield 1942 FaultTolerantHeap shim.sdb every day.
User avatar
Trench
Admin
Admin
Posts: 2908
Joined: May 22nd, 2012, 3:19 am
Location: Dallas / Fort Worth
Contact:
United States of America

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by Trench »

=IAM= Allen wrote:I seem to fix my crashes when I updated to the gamespy fixed bf1942.exe. I now nolonger have to run the Battlefield 1942 FaultTolerantHeap shim.sdb every day.
Good. Embrace it while it lasts. From an actual .EXE code binary perspective, we know exactly what changes were made between this current modified .EXE and the previous / original ones, and none of those changes relate to crash fixes. So I in no way think "the updated BF1942.EXE fixes the crash", but certainly "my crashes are suddenly gone" or "crashes are suddenly present" isn't unusual.

The potential to hit these crashes is presumably "always there", and just other random or circumstance factors make it more likely or less likely to actually encounter them on a particular machine / day / solar cycle.

-Trench
User avatar
Trench
Admin
Admin
Posts: 2908
Joined: May 22nd, 2012, 3:19 am
Location: Dallas / Fort Worth
Contact:
United States of America

Re: FIX: Crash in BF1942.EXE when map is loading.

Post by Trench »

=IAM= Allen wrote:I seem to fix my crashes when I updated to the gamespy fixed bf1942.exe. I now nolonger have to run the Battlefield 1942 FaultTolerantHeap shim.sdb every day.
If you were using the Origin-downloaded Battlefield 1942, one possibility for why the GameSpy fixed .EXE might have had an effect is because it eliminates the forced requirement of launching Origin before running Battlefield 1942.

It was reported by tombu over in the --=[ aX ]=-- forums that turning off the "Origin in Game" support for Battlefield 1942 was found to be a solution for the map loading crashes they were having. The GameSpy fixed BF1942.EXE for the Origin-based Battlefield 1942 also includes the fix to prevent Origin from being auto-started when you launch Battlefield 1942, which in turn prevents "Origin in Game" from being enabled since Origin isn't even running.

If someone is having crashes but cannot use the GameSpy fixed BF1942.EXE to test whether this will eliminate the issue, you can disable "Origin in Game" by running Origin on your computer (not the Origin web page) and right-clicking the Battlefield 1942 game in "My Games" to select "Game Properties..." and select the "Disable Origin in Game for this game" checkbox shown in the screen shot:
Disable Origin in Game.png
-Trench
You do not have the required permissions to view the files attached to this post.
Post Reply