• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Solved Heap Corruption, Random Crashes

Are you replacing/removing the original battle_interface.dll completely from the Modules folder before putting the patched one in? The game loads everything in that folder with the extension .dll, and it can load duplicates. If the old one is still in there, then the game will try to use both patched and unpatched simultaneously. That'd make the game slow.

What resolution do you run the game at? I'm not sure how ENB affects the choices, but if a lower resolution can be tried it might help.

Another possibility is I assumed there was only one game version released. But, perhaps your game is somehow different. If you check the Engine.exe application properties, does it say in there "File Version 1.0.0.1 Copyright 2002 Akella ENGINE Language Russian" and the file size is 1,187,903 bytes.
 
Aha! We have a mystery here. I only have two POTC installs right now. One is unmodified and the other has both of your files in it. And the engine.exe size for both is different than you specify.
The size of the unmodified one is 1,212,416 bytes.
The size of the one you posted earlier is 1,187,840 bytes.
I renamed the stock .dll before putting yours in. That should disable it I hope.
The unmodified one is from Pieter's European version of POTC.
engine.exe.jpg
 
I replaced the file in the MODULES folder, not leaving the old one. So that shouldn't be the problem.

At your recommendation, I did not use you modified ENGINE.exe file. As such, it is the default Build 14 Beta 2.2 version that I was running with.
That should be the same for everybody who uses the latest modpack version because it is included in the download.
Sounds like you are using a different ENGINE.exe though. Mine is 1.212.416 bytes with Copyright 2009.
That is when I used Resource Hacker on it to swap out the icon and splash screen for "New Horizons".

I run my game in windowed mode at my desktop resolution of 1600x900.

Hylie, as Amplificar is saying, if you have the original DLL file renamed but still in the MODULES folder, it will still load it and might continue using the old one too.
 
I just ran a test. I started POTC and timed it from the time I pushed the button until the game started with me on the dock.
50 seconds.
Then deleted the stock .dll and restarted POTC.
45 seconds.
:shrug
 
Pretty incredible it worked at all, and even stranger with just a five second difference in loading time. I'm glad that was discovered.

1,187,903 is for the US version (original)
1,187,840 is the breakpoint mod (I used a resource editor to remove blank debug symbols from it)
1,212,416 is the European version (splash screen changed, named Pirates of the Carribean: New Horizons)
? is the European version (original)

Pieter, the size of the European version probably increased after using the resource hacker on it. If you have your original game CD Disc 1, does the file size of its Engine.exe match 1,187,903? If the original sizes match, then the US/EU are still the same Engine version (there might still be other differences in the game data and modules).

Although I modified them, the patches are the same size as their originals. So, if the EU version of the game has different module file sizes, then the US modules may be incompatible. These three are the important ones, if they all match then it's something else.
sea.dll size 196,608 bytes
battle_interface.dll size 176,128 bytes
dx8render.dll size 274,432 bytes
 
Original European version: 1.187.903 bytes
Looks to be the same as the US one.

The PotC Build Mod uses the European ENGINE.exe and complete MODULES folder as that has been found to be more stable.
For the next update, also the European engine.ini will be included as that is said to help with stability as well.
That will basically completely convert any US version of the game into the European version when the modpack is installed.
 
The two installs that I currently have are:
One European install using Pieter's .exe.
One American install from the CDs that later had Pieter's .exe dropped in and also Amplificar's goodies.

The battle_interface.dll and dx8render.dll are both the same and are the same size Amplificar specifies.
The sea.dll size is the same for both but is different from what Amplificar specifies at 192,512 bytes. But the date for them is November 12, 2004, so it must be from the mod as the game was released in 2003.
 
I've downloaded b14_beta2-1_full, and I'm surprised the modules are so different. I assumed it was mostly game data that was added to (I should've checked this out a long time ago, sorry).

The differences between some of the modules might account for Pieter's game running slowly. I'll get it installed, see what happens on my computer and recreate the same patches from before with the build mod's files. I'll have them uploaded here probably by this weekend.
 
We didn't change that many of the MODULES files (didn't know how, mostly), but it could be that there are additional differences between the US and Euro files.

Could someone upload the US MODULES folder and I'll do a WinMerge on them, just to find out if they are the same or not.
 
Quite a few modules are added by the build mod (111 vs 46), and I've noticed two so far that have significant differences (sea and location).

The sea.dll is different. Creating the intel graphics patch from it will be more compatible with the build mod.
The battle_interface.dll are byte for byte identical. I'm not sure if it's used differently in some way. I'll do some tests.

I attached the original US modules (I keep a backup of a fresh potc install on my hard drive).
 

Attachments

  • US_MODULES.7z
    887.3 KB · Views: 454
WinMerge US vs Build 14 results:
3 are identical (battle_interface,dummy,dummy2).
41 different (mostly minor differences).
Major differences in: dialog, dx8render, island, location, model, pc_controls, pcs_controls, sea, sea_ai, ship, sound, soundservice, xinterface.
 
I just did a WinMerge between the US files you uploaded and my unmodified European game version.
Results:
- All .sha files are the same
- DUMMY.dll and DUMMY2.dll are the same
- EVERY other .dll file is reported as different, but with the same filesize
- The exception is XINTERFACE.dll, which is 442.368 bytes in the Euro version and 434.176 bytes in the US version

Differences between Stock Euro and Build 14 Beta 2.2 are as follows:
battle_interface.dll
DIALOG.dll
DX8RENDER.dll
Location.dll
MODEL.dll
PCS_CONTROLS.dll
rigging.dll
sea.dll
sea_ai.dll
ship.dll
XINTERFACE.dll
game_interface.sha
G3Sea.sha
RadeonSea.sha
XBoxSea.sha
ATIShaders.sha
GF3Shaders.sha
Files shown in bold also have their file sizes differing.
For most of those, I am not at all sure WHY they are different. :facepalm

MOST added DLL files are HEX-edited original files modified to load different files than they used to.
Examples:
DateTimeShowInterface.dll is for the date and time text showing on the screen at sea
DIALG2.dll is for the dialog interface image that now changes between the Blue and Brown interfaces
ALL flag.dll files are for the Different Flags Mod
ALL guns.dll files are to show the numbers of cannons as part of the Battle Interface at sea
shippowinterface.dll is for the Power indication for steamships
shprollinterface.dll is for the roll angle text in storms
bladeitem.sha is to prevent an old bug that made weapons appear almost invisible when lying around at random in earlier Build Mod versions

I am not sure about:
ActionInterface.dll (I *think* this is for the action icons or texts when walking around on land)
SEA_OPERATOR.dll (this one I really have no clue about at this time)
WrldMap2.dll are for the different worldmap icons (I think)

For your reference, find attached the unmodified Euro version MODULES file from my game.
 

Attachments

  • EURO_MODULES.7z
    939.4 KB · Views: 493
Excellent info Pieter, thank you! Now I can compare between US/EU/Build14 and (hopefully) create patches that work for all of them.

There's some differences between battle_interface for the unmodified US/EU, but the skipped routine at FDC0 is the same (luckily). Patching the EU original was nice and easy. This new patched EU battle_interface works in the vanilla US release too, but I haven't tested it in Build 14. This might resolve the slowdown Pieter has, I hope.

I applied the intel graphics workaround to the Build 14 sea.dll, but it didn't work. I'll try the other workaround on it tomorrow (the one that had the oil slick/checkboard appearance), until then I can't start a game in Build 14 to test anything else.

Because of the similarities between the original EU/US sea.dll, the previous intel fixes should work for either. Just not Build 14, because modders shuffled around code and changed lots of stuff, to make room for those improved effects.
 

Attachments

  • EU_BI_bypassFDC0.7z
    62.7 KB · Views: 511
I just popped in your new version and the game has been loading at normal speed again. Seems to have made the difference! Thanks a lot. :bow
 
Cool! I have noticed a little better fps after these changes. Probably deleting the stock .dll did that.
 
That is when I used Resource Hacker on it to swap out the icon and splash screen for "New Horizons".
This got me thinking: isn't it about time we gave the mod a new icon?
The current one is the Dead Man's Chest logo, and I'm sure we can do better than that (especially since we don't even have a DMC quest :p).
 
Hmm... I do consider it the best logo we've got and still quite like it. Didn't SuperDurnius make it, back in the days?
Fair point though about us not having a DMC story. What kind of better one could we come up with?
 
Back
Top