Jump to content
Null 45

Resource Loading Hooks DLL for SimCity 4

19 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

A DLL Plugin for SimCity 4 that allows other DLLs to modify resources as the game loads them.

This file is a dependency that is used by other DLL plugins. The instructions for using the DLL as a dependency are in the GitHub Readme.

Download: https://community.simtropolis.com/files/file/36242-resource-loading-hooks-dll-for-SimCity-4/

Source Code: https://github.com/0xC0000054/sc4-resource-loading-hooks

Exemplar Patching

Exemplar patching is a technique to change the behavior of Exemplar files on-the-fly at runtime, without altering the original DBPF files. An Exemplar Patch is a Cohort file with Group ID 0xb03697d1 (and arbitrary Instance ID) containing the property:

    Exemplar Patch Targets (property id 0x0062e78a): list of Exemplar files this patch applies to (format: Group ID 1, Instance ID 1, Group ID 2, Instance ID 2,…). The list must contain an even number of IDs.

All the other properties of the Cohort file (except for Exemplar Name) are injected into these target Exemplar files whenever the game loads an Exemplar file from this list. This allows to add or overwrite specific properties of Exemplar files without affecting any unrelated properties.

You can think of an Exemplar Patch as a "Child Cohort" file, mirroring the usual Parent Cohort structure. An Exemplar Patch can target multiple Exemplar files simultaneously. Conversely, multiple Exemplar Patches can be applied to the same Exemplar file.

            Parent Cohort
             /        \
            /          \
           /            \
          /              \
   Exemplar A          Exemplar B
       |   \_____       /   |
       |    _____\_____/    |
       |   /      \______   |
       |  /              \  |
Exemplar Patch 1     Exemplar Patch 2

If two Cohort files have the same Instance ID, only the one loading last has an effect. Therefore, you should usually change the Instance ID whenever you copy an existing Exemplar Patch Cohort file.

System Requirements

  • SimCity 4 version 641
  • Windows 10 or later

The plugin may work on Windows 7 or later with the Microsoft Visual C++ 2022 x86 Redistribute installed, but I do not have the ability to test that.

Installation

  1. Close SimCity 4.
  2. Copy SC4ResourceLoadingHooks.dll into the top level of either plugins folder (place it directly in <Documents>\SimCity 4\Plugins or <SC4 install folder>\Plugins, not in a subfolder).
  3. Start SimCity 4.

Command Line Arguments

Exemplar Load Logging

The plugin adds an -exemplar-log: command line argument that controls what data is logged, the argument supports the following values:

    error - Only exemplar load errors are logged.
    TGI - Logs the exemplar TGI.
    type - Logs the exemplar TGI and type (if present).
    debug - Logs the exemplar TGI, type (if present), and the name of the method used to load the exemplar.
    <exemplar type id> - Logs the TGI of exemplars matching <exemplar type id>, e.g. -exemplar-log:0x21 would log the TGI values of all 'Type 21' exemplars.

The log will be written to a SC4ExemplarLoad.log file in the same folder as the plugin. The logging will also slow down your game.

Exemplar Patch Debug Logging

The plugin adds an -exemplar-patch-debug-logging command line argument that enables more detailed logging of the exemplar patching process.
By default, the plugin will only log the number of exemplar patches and total number of exemplars that they target, e.g. 'Loaded 10 Exemplar patches targeting, in total, 41 Exemplar files.'.

The log will be written to a SC4ResourceLoadingHooks.log file in the same folder as the plugin.

Troubleshooting

The plugin should write a SC4ResourceLoadingHooks.log file in the same folder as the plugin.
The log contains status information for the most recent run of the plugin.

If you would like to make voluntary contributions to support me in continuing to create more content for SimCity 4, I accept donations via PayPal: https://paypal.me/0xC0000054

Thanks to the few people who have donated to me.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I'm unclear about this mod.  I see that this is required for the Submenus DLL.  Why is a DLL required for another DLL?  Is this an efficient way to do something so that the other DLLs do not need to keep doing it?  Is there a way this can be explained in simple terms?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
14 minutes ago, Kel9509 said:

I'm unclear about this mod.  I see that this is required for the Submenus DLL.  Why is a DLL required for another DLL?  Is this an efficient way to do something so that the other DLLs do not need to keep doing it?  Is there a way this can be explained in simple terms?

DLLs modify certain aspects of the game. If two DLLs were to modify the same functionality, they would be at conflict with each other and couldn't be used together. What the Resource Loading DLL does is that it exposes certain functionality (the loading of resources) for other DLLs to hook into. This allows multiple DLLs to alter the loading of resources simultaneously without being at conflict with each other. So indeed, this is an efficient way of implementing it and there's no need to worry about performance with this.

The Submenus DLL uses such a resource loading hook to alter the loading of Exemplar files for the Exemplar Patching feature. With the Resource Loading DLL, this doesn't stop other DLLs from modifying the loading of Exemplar files or other files as well.

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    1 hour ago, Kel9509 said:

    Is there a way this can be explained in simple terms?

    As memo already mentioned, you can't have more than 1 DLL patching the same part of the game's code. So the only way to solve that problem is to have 1 DLL patch the code and provide functionality for other DLLs to use.

    The Query UI Hooks DLL does this for the query tool's building query dialog and the building and network hover tool tips. Multiple DLLs can inspect the building query occupant and add their own string tokens for use in the building query dialog, or customize the game's tool tip handling for a specific occupant. Of course, there still is a chance that 2 or more DLLs will conflict, but it is a much lower chance than trying to patch the same parts of the game's code.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Release version 1.0.1, which updates the readme to remove the experimental disclaimer and expand the installation instructions.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Release version 2.0, which adds Exemplar Patching with diagnostic logging.

    This allows users to get exemplar patching support without using the submenus DLL.The diagnostic logging is controlled by an -exemplar-patch-debug-logging command line argument.

    • Like 3

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    22 minutes ago, Null 45 said:

    This allows users to get exemplar patching support without using the submenus DLL.

    I assume both of these DLLs can be used simultaneously.  If so, which one actually controls or manages exemplar patching?   Or maybe it doesn't matter?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    45 minutes ago, Kel9509 said:

    I assume both of these DLLs can be used simultaneously.  If so, which one actually controls or manages exemplar patching?   Or maybe it doesn't matter?

    Both DLLs will apply their own exemplar patching, but as the data they read is the same the order is irrelevant.

    I had considered changing the API to prevent the double patching, but memo pointed out in a reply to that issue that the double patching doesn't cause any harm. Also from that issue, the exemplar patching has been removed from the next version of the submenu DLL.

    Another feature I added is a GZCOM interface for DLLs to request a reload of the exemplar patches. This is intended to be used by DLLs that dynamically load and unload DBPF files in the region view. For example, the Extended Terrain DLL could use it to allow loaded terrain mods to exemplar patch the weather simulator's tuning exemplar.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hey Null 45,

    I downloaded the updated Resource Loading Hooks DLL you posted today. I placed it in my plugins folder and discarded the previous version. Now, when I launch SimCity 4, it crashes to desktop before reaching the region view. When I remove the DLL and try loading the game again, it loads properly. Any chance I've done something wrong?

    Thanks!

    -Blade

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    21 minutes ago, bladeberkman said:

    Any chance I've done something wrong?

    I have no idea why the DLL would cause a CTD. Could you upload the MDMP file, and is there anything in the log?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Thanks for the quick response! Sorry to say, but I don't know what an MDMP file is or where to find it. When I open the text file in my plugins folder it simply says: "SC4ResourceLoadingHooks v2.0.0"

    image.png.b60a2caddab4925bae8774cf81e47c82.png

    About to head to bed, but I'll check in tomorrow. Thanks again!

    -Blade

     

    Edit: Think I found the MDMP, here's the report:

    Exception time: 09/09/2025, at 01:41:00.
    Exception code: 0xC0000005 (-1073741819) ACCESS_VIOLATION.
    Current thread ID: 9036 (0x0000234c).
    Version information:
    Application/module path: C:\Program Files (x86)\Maxis\SimCity 4.exe
    Application/module version name: SimCity 4
    Application/module version: 1.1.641.0
    System version: Windows NT 5.1
    System memory: 1024 Megabytes total, 1024 Megabytes free.

    Exception module:  C:\WINDOWS\SYSTEM32\MSVCP140.dll.
    Exception address: 0x6a8f59e3. Section:Offset: 0x01:0x000149e3.

    Registers
       EAX: 00000000
       EBX: 049507a4
       ECX: 02b45d14
       EDX: 02b45d1c
       ESI: 00000000
       EDI: 0019fb18
       CS:EIP: 0023:6a8f59e3
       SS:ESP: 002b:0019fa30  EBP:0019fa54
       DS:002b  ES:002b  FS:0053  GS:002b
       Flags: 00010282

    Loaded Modules
       Address          Size Module             Path
       ----------------------------------------------------------------------------------------------
       0x00400000    8159232 SimCity 4.exe      C:\Program Files (x86)\Maxis\SimCity 4.exe
       0x77650000    1720320 ntdll.dll          C:\WINDOWS\SYSTEM32\ntdll.dll
       0x764b0000     983040 KERNEL32.DLL       C:\WINDOWS\System32\KERNEL32.DLL
       0x76e80000    2330624 KERNELBASE.dll     C:\WINDOWS\System32\KERNELBASE.dll
       0x6ba70000     671744 apphelp.dll        C:\WINDOWS\SYSTEM32\apphelp.dll
       0x6aad0000    2641920 AcLayers.DLL       C:\WINDOWS\SYSTEM32\AcLayers.DLL
       0x75b80000     782336 msvcrt.dll         C:\WINDOWS\System32\msvcrt.dll
       0x76620000    1687552 USER32.dll         C:\WINDOWS\System32\USER32.dll
       0x75500000      98304 win32u.dll         C:\WINDOWS\System32\win32u.dll
       0x76400000     143360 GDI32.dll          C:\WINDOWS\System32\GDI32.dll
       0x75c40000     946176 gdi32full.dll      C:\WINDOWS\System32\gdi32full.dll
       0x75e20000     503808 msvcp_win.dll      C:\WINDOWS\System32\msvcp_win.dll
       0x76150000    1179648 ucrtbase.dll       C:\WINDOWS\System32\ucrtbase.dll
       0x75540000    6135808 SHELL32.dll        C:\WINDOWS\System32\SHELL32.dll
       0x76e30000     299008 SHLWAPI.dll        C:\WINDOWS\System32\SHLWAPI.dll
       0x76350000     614400 OLEAUT32.dll       C:\WINDOWS\System32\OLEAUT32.dll
       0x772e0000    2621440 combase.dll        C:\WINDOWS\System32\combase.dll
       0x76d00000     782336 RPCRT4.dll         C:\WINDOWS\System32\RPCRT4.dll
       0x767c0000    4431872 SETUPAPI.dll       C:\WINDOWS\System32\SETUPAPI.dll
       0x754c0000     241664 cfgmgr32.dll       C:\WINDOWS\System32\cfgmgr32.dll
       0x75520000     102400 bcrypt.dll         C:\WINDOWS\System32\bcrypt.dll
       0x73ca0000     102400 MPR.dll            C:\WINDOWS\SYSTEM32\MPR.dll
       0x66680000      12288 sfc.dll            C:\WINDOWS\SYSTEM32\sfc.dll
       0x6b300000     512000 WINSPOOL.DRV       C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
       0x771a0000     552960 shcore.dll         C:\WINDOWS\System32\shcore.dll
       0x6b2f0000      61440 sfc_os.DLL         C:\WINDOWS\SYSTEM32\sfc_os.DLL
       0x6b2e0000      57344 SortServer2003Comp C:\WINDOWS\SYSTEM32\SortServer2003Compat.dll
       0x76120000     151552 IMM32.DLL          C:\WINDOWS\System32\IMM32.DLL
       0x76430000     512000 ADVAPI32.dll       C:\WINDOWS\System32\ADVAPI32.dll
       0x762d0000     487424 sechost.dll        C:\WINDOWS\System32\sechost.dll
       0x6c170000      32768 WSOCK32.dll        C:\WINDOWS\SYSTEM32\WSOCK32.dll
       0x73e10000    4542464 WININET.dll        C:\WINDOWS\SYSTEM32\WININET.dll
       0x76dc0000     405504 WS2_32.dll         C:\WINDOWS\System32\WS2_32.dll
       0x742b0000     163840 WINMM.dll          C:\WINDOWS\SYSTEM32\WINMM.dll
       0x6b260000     520192 DSOUND.dll         C:\WINDOWS\SYSTEM32\DSOUND.dll
       0x73c60000      32768 VERSION.dll        C:\WINDOWS\SYSTEM32\VERSION.dll
       0x6a9c0000    1073152 OPENGL32.dll       C:\WINDOWS\SYSTEM32\OPENGL32.dll
       0x6b230000     139264 MSVFW32.dll        C:\WINDOWS\SYSTEM32\MSVFW32.dll
       0x72ef0000     118784 winmmbase.dll      C:\WINDOWS\SYSTEM32\winmmbase.dll
       0x72c60000     278528 powrprof.dll       C:\WINDOWS\SYSTEM32\powrprof.dll
       0x6dcf0000     577536 COMCTL32.dll       C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.19041.5915_none_c0e25e8c38b8dd0c\COMCTL32.dll
       0x6a980000     258048 GLU32.dll          C:\WINDOWS\SYSTEM32\GLU32.dll
       0x72c50000      53248 UMPDC.dll          C:\WINDOWS\SYSTEM32\UMPDC.dll
       0x763f0000      24576 psapi.dll          C:\WINDOWS\System32\psapi.dll
       0x73250000    6389760 windows.storage.dl C:\WINDOWS\SYSTEM32\windows.storage.dll
       0x73220000     151552 Wldp.dll           C:\WINDOWS\SYSTEM32\Wldp.dll
       0x738a0000      61440 kernel.appcore.dll C:\WINDOWS\SYSTEM32\kernel.appcore.dll
       0x76270000     389120 bcryptPrimitives.d C:\WINDOWS\System32\bcryptPrimitives.dll
       0x72a00000     475136 uxtheme.dll        C:\WINDOWS\system32\uxtheme.dll
       0x73870000     155648 dwmapi.dll         C:\WINDOWS\SYSTEM32\dwmapi.dll
       0x75d30000     929792 ole32.dll          C:\WINDOWS\System32\ole32.dll
       0x775c0000     516096 clbcatq.dll        C:\WINDOWS\System32\clbcatq.dll
       0x6b120000     786432 PROPSYS.dll        C:\WINDOWS\SYSTEM32\PROPSYS.dll
       0x6c420000     921600 rasapi32.dll       C:\WINDOWS\SYSTEM32\rasapi32.dll
       0x6c3f0000     180224 rasman.dll         C:\WINDOWS\SYSTEM32\rasman.dll
       0x770c0000     868352 MSCTF.dll          C:\WINDOWS\System32\MSCTF.dll
       0x6a950000     135168 CustomBudgetDepart C:\Users\Blade\Documents\SimCity 4\Plugins\CustomBudgetDepartments.dll
       0x6a8e0000     446464 MSVCP140.dll       C:\WINDOWS\SYSTEM32\MSVCP140.dll
       0x6a8c0000      86016 VCRUNTIME140.dll   C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll
       0x6a8a0000      98304 memo.3dcamera.dll  C:\Users\Blade\Documents\SimCity 4\Plugins\memo.3dcamera.dll
       0x6a870000     139264 memo.submenus.dll  C:\Users\Blade\Documents\SimCity 4\Plugins\memo.submenus.dll
       0x6a850000      86016 memo.thumbnail-fix C:\Users\Blade\Documents\SimCity 4\Plugins\memo.thumbnail-fix.dll
       0x6a830000      86016 memo.transparent-t C:\Users\Blade\Documents\SimCity 4\Plugins\memo.transparent-texture-fix.dll
       0x6a7f0000     262144 SC4BulldozeExtensi C:\Users\Blade\Documents\SimCity 4\Plugins\SC4BulldozeExtensions.dll
       0x6a7d0000      94208 SC4ClearPollution. C:\Users\Blade\Documents\SimCity 4\Plugins\SC4ClearPollution.dll
       0x6a770000     348160 SC4DBPFLoading.dll C:\Users\Blade\Documents\SimCity 4\Plugins\SC4DBPFLoading.dll
       0x6a750000      81920 SC4DisableNetworkC C:\Users\Blade\Documents\SimCity 4\Plugins\SC4DisableNetworkConstructionSounds.dll
       0x6a730000     131072 SC4Fix.dll         C:\Users\Blade\Documents\SimCity 4\Plugins\SC4Fix.dll
       0x6a710000      94208 SC4Growify.dll     C:\Users\Blade\Documents\SimCity 4\Plugins\SC4Growify.dll
       0x6a6a0000     421888 SC4MoreBuildingSty C:\Users\Blade\Documents\SimCity 4\Plugins\SC4MoreBuildingStyles.dll
       0x6a680000      86016 SC4MoreDemandInfo. C:\Users\Blade\Documents\SimCity 4\Plugins\SC4MoreDemandInfo.dll
       0x6a610000     409600 SC4QueryUIHooks.dl C:\Users\Blade\Documents\SimCity 4\Plugins\SC4QueryUIHooks.dll
       0x6a5f0000     131072 SC4RegionCensus.dl C:\Users\Blade\Documents\SimCity 4\Plugins\SC4RegionCensus.dll
       0x6a5d0000      98304 SC4RemovePhantomBu C:\Users\Blade\Documents\SimCity 4\Plugins\SC4RemovePhantomBudgetItems.dll
       0x6a5a0000     139264 SC4ResourceLoading C:\Users\Blade\Documents\SimCity 4\Plugins\SC4ResourceLoadingHooks.dll
       0x10000000     294912 SimCity 4 Extra Ch C:\Users\Blade\Documents\SimCity 4\Plugins\SimCity 4 Extra Cheats Plugin.dll
       0x76c00000    1044480 crypt32.dll        C:\WINDOWS\System32\crypt32.dll
       0x72bb0000      57344 MSASN1.dll         C:\WINDOWS\SYSTEM32\MSASN1.dll
       0x731a0000      77824 CRYPTSP.dll        C:\WINDOWS\SYSTEM32\CRYPTSP.dll
       0x73160000     200704 rsaenh.dll         C:\WINDOWS\system32\rsaenh.dll
       0x73210000      40960 CRYPTBASE.dll      C:\WINDOWS\SYSTEM32\CRYPTBASE.dll
       0x72930000     180224 dxcore.dll         C:\WINDOWS\SYSTEM32\dxcore.dll
       0x6a4e0000     757760 textinputframework C:\WINDOWS\SYSTEM32\textinputframework.dll
       0x6a440000     634880 CoreMessaging.dll  C:\WINDOWS\System32\CoreMessaging.dll
       0x6a1c0000    2617344 CoreUIComponents.d C:\WINDOWS\System32\CoreUIComponents.dll
       0x72bc0000     167936 ntmarta.dll        C:\WINDOWS\SYSTEM32\ntmarta.dll
       0x6b4f0000     905216 wintypes.dll       C:\WINDOWS\SYSTEM32\wintypes.dll
       0x6a0d0000     954368 DDRAW.DLL          C:\WINDOWS\SYSTEM32\DDRAW.DLL
       0x6a000000     806912 dxgi.dll           C:\WINDOWS\SYSTEM32\dxgi.dll
       0x6b220000      28672 DCIMAN32.dll       C:\WINDOWS\SYSTEM32\DCIMAN32.dll
       0x69f40000     757760 nvldumd.dll        C:\WINDOWS\System32\DriverStore\FileRepository\nvaowu.inf_amd64_261a1063b748fa57\nvldumd.dll
       0x68d80000   13672448 nvd3dum.dll        C:\WINDOWS\System32\DriverStore\FileRepository\nvaowu.inf_amd64_261a1063b748fa57\nvd3dum.dll
       0x69ed0000     405504 D3DIM700.DLL       C:\WINDOWS\SYSTEM32\D3DIM700.DLL
       0x72e80000     438272 MMDevApi.dll       C:\WINDOWS\System32\MMDevApi.dll
       0x72e50000     167936 DEVOBJ.dll         C:\WINDOWS\System32\DEVOBJ.dll
       0x72cb0000    1269760 AUDIOSES.DLL       C:\WINDOWS\SYSTEM32\AUDIOSES.DLL
       0x69ec0000      61440 resourcepolicyclie C:\WINDOWS\SYSTEM32\resourcepolicyclient.dll
       0x6bb70000    2326528 iertutil.dll       C:\WINDOWS\SYSTEM32\iertutil.dll
       0x6bb40000      45056 netutils.dll       C:\WINDOWS\SYSTEM32\netutils.dll
       0x6bb50000     118784 srvcli.dll         C:\WINDOWS\SYSTEM32\srvcli.dll
       0x731c0000     135168 SspiCli.dll        C:\WINDOWS\SYSTEM32\SspiCli.dll
       0x731f0000     110592 profapi.dll        C:\WINDOWS\SYSTEM32\profapi.dll
       0x6bb20000      73728 ondemandconnrouteh C:\WINDOWS\SYSTEM32\ondemandconnroutehelper.dll
       0x72860000     827392 winhttp.dll        C:\WINDOWS\SYSTEM32\winhttp.dll
       0x72570000     335872 mswsock.dll        C:\WINDOWS\system32\mswsock.dll
       0x74270000     204800 IPHLPAPI.DLL       C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
       0x72630000      32768 WINNSI.DLL         C:\WINDOWS\SYSTEM32\WINNSI.DLL
       0x76110000      28672 NSI.dll            C:\WINDOWS\System32\NSI.dll
       0x69d10000    1748992 DbgHelp.dll        C:\WINDOWS\SYSTEM32\DbgHelp.dll
       0x69ce0000     176128 dbgcore.DLL        C:\WINDOWS\SYSTEM32\dbgcore.DLL

    Call stack:
    Thrd_yield() + 291

    Mtx_lock() + 13

    GZDllGetGZCOMDirector() + 37208

    GZDllGetGZCOMDirector() + 48750

    GZDllGetGZCOMDirector() + 51452

    GZDllGetGZCOMDirector() + 414047

    GZDllGetGZCOMDirector() + 413954

    GZDllGetGZCOMDirector() + 415111

    0x0001:0x00090be7 C:\Program Files (x86)\Maxis\SimCity 4.exe.
    0x0001:0x00091778 C:\Program Files (x86)\Maxis\SimCity 4.exe.
    GZDllGetGZCOMDirector() + 142721

    0x0001:0x001de5cf C:\Program Files (x86)\Maxis\SimCity 4.exe.
    0x0001:0x00505f62 C:\Program Files (x86)\Maxis\SimCity 4.exe.
    0x0001:0x000906b4 C:\Program Files (x86)\Maxis\SimCity 4.exe.
    0x0001:0x00045bc9 C:\Program Files (x86)\Maxis\SimCity 4.exe.

    Stack data: (ESP is 0x0019fa30)
    0x0019f8b0   40010000 7f070101 18fa1900 e64a6977 00000000 00000000 00000000 00000000 
    0x0019f8d0   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x0019f8f0   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x0019f910   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x0019f930   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x0019f950   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x0019f970   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x0019f990   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x0019f9b0   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x0019f9d0   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
    0x0019f9f0   00000000 00000000 00000000 00000000 00000000 bc7d3c25 00000000 947d3c25 
    0x0019fa10   40c47700 03000000 4c002e03 7e0b9300 4c002e03 7e0b9300 a831c102 d7598f6a 
    0x0019fa30   18fb1900 a4079504 50002e03 00000000 eff05f00 947d3c25 145db402 485db402 
    0x0019fa50   f1c54aef 64fa1900 bd5c8f6a a4079504 00000000 f4fa1900 58c25a6a a4079504 
    0x0019fa70   6b5e7ac7 28079504 185db402 a4079504 00000000 00000000 145db402 54404025 
    0x0019fa90   00631f4a 18fb1900 d425b402 8c079504 00000000 e825b402 0d0a1900 400b9300 
    0x0019fab0   94674025 45515a42 31232323 50002e03 01000000 01f0aa00 00000000 00fb1900 
    0x0019fad0   400b9300 202f2e03 00fb1900 7e0b9300 145db402 6b5e7ac7 30fb1900 a5305b6a 
    0x0019faf0   ffffffff 3cfb1900 6eef5a6a 18fb1900 145db402 a35f7ac7 b8fb1900 30079504 
    0x0019fb10   50002e03 a8815b6a 4a283465 dbc2e2e7 15611f4a bc805b6a 145db402 a35f7ac7 
    0x0019fb30   ecfd1900 dd315b6a 00000000 80fb1900 fcf95a6a a8815b6a 1d8f6b45 b8fb1900 
    0x0019fb50   54214503 181ab502 00000000 00000000 4c002e01 88fb1900 7e0b9300 c8ef3403 
    0x0019fb70   4a283465 dbc2e2e7 15611f4a 1f5f7ac7 a8fb1900 5c2f9700 50002e03 1d8f6b45 
    0x0019fb90   b8fb1900 00000000 00000000 1488b402 0023b402 50002e03 dcfb1900 ff2e9700 

    Instruction data: (EIP is 0x6a8f59e3)
    0x6a8f5963   50 ff 15 20 60 94 6a c3 55 8b ec 83 ec 18 a1 54 32 94 6a 33 c5 89 45 fc 53 8b 5d 08 56 8b 75 0c 
    0x6a8f5983   57 8b 03 25 ff fe ff ff 89 75 e8 83 f8 01 75 3a ff 15 f4 60 94 6a 39 43 28 74 1b 8b 43 04 8b 30 
    0x6a8f59a3   8b ce ff 15 40 63 94 6a 8d 4b 04 ff d6 ff 15 f4 60 94 6a 89 43 28 ff 43 2c 33 c0 8b 4d fc 5f 5e 
    0x6a8f59c3   33 cd 5b e8 85 6a 02 00 c9 c3 85 f6 75 26 ff 15 f4 60 94 6a 39 43 28 0f 84 d9 00 00 00 8b 43 04 
    0x6a8f59e3   8b 30 8b ce ff 15 40 63 94 6a 8d 4b 04 ff d6 e9 c2 00 00 00 8b 06 33 ff 39 7e 04 0f 8c 91 00 00 
    0x6a8f5a03   00 7f 08 3b c7 0f 82 87 00 00 00 0b 46 04 75 05 39 7e 08 7e 7d 8d 45 ec 6a 01 50 e8 ad 08 00 00 
    0x6a8f5a23   8b 06 59 59 8b 4d f0 3b 4e 04 7c 25 7f 05 39 45 ec 72 1e 39 45 ec 0f 85 cd 00 00 00 3b 4e 04 0f 
    0x6a8f5a43   85 c4 00 00 00 8b 45 f4 3b 46 08 0f 8d b8 00 00 00 ff 15 f4 60 94 6a 39 43 28 74 5a 8b 43 04 8b 
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    9 hours ago, bladeberkman said:

    Edit: Think I found the MDMP, here's the report:

    That is the text file, the MDMP file will be next to it.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    20 minutes ago, bladeberkman said:

    Ah, my apologies, here you go.

    Thanks. That confirmed the crash is within the MSVC runtime, which is what the call stack text above appeared to show.

    0019fa54 6a8f5cbd     049507a4 00000000 0019faf4 msvcp140!mtx_do_lock+0x78
    0019fa64 6a5ac258     049507a4 c77a5e6b 04950728 msvcp140!_Mtx_lock+0xd
    (Inline) --------     -------- -------- -------- SC4ResourceLoadingHooks!std::_Mutex_base::lock+0x10
    (Inline) --------     -------- -------- -------- SC4ResourceLoadingHooks!std::lock_guard<std::mutex>::{ctor}+0x10
    0019faf4 6a5aef6e     0019fb18 02b45d14 c77a5fa3 SC4ResourceLoadingHooks!ExemplarPatcher::ApplyPatches+0x48
    0019fb3c 6a5af9fc     6a5b81a8 456b8f1d 0019fbb8 SC4ResourceLoadingHooks!ExemplarResourceFactoryProxy::ResourceLoaded+0xae
    0019fb80 00972f5c     032e0050 456b8f1d 0019fbb8 SC4ResourceLoadingHooks!ResourceFactoryProxy::CreateInstance+0x7c

    Having a crash within a DLL is one of the rare times the MDMP files can show useful info, provided the appropriate symbols are available. The lack of symbols is why they don't show anything useful for crashes in SC4's code, sadly only EA has those.

    But I have no idea why it would be crashing, it worked for me and others have reported that it works for them. :???:

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    15 minutes ago, Null 45 said:

    But I have no idea why it would be crashing, it worked for me and others have reported that it works for them.

    I hadn't gotten around to installing this new version yet, but I did it just now and everything loaded up fine.  @bladeberkman, I suggest trying it in a new region or possibly with a clean plugins folder and slowly add back your mods to see if it might be something else.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Thanks for the suggestion, Kel9509. I just tested by emptying my plugins folder except for the DLL, then launching the game. The screen goes black for a moment, then crashes to desktop before showing the startup splash. I tested again by removing the DLL, then launching the game. The screen goes black, shows the startup splash, then loads the region. Removing the DLL prevents a crash. Here's the latest MDMP if that helps. SimCity Exception Minidump 2025.09.09 18.44.25.mdmp 

    The prior version of the DLL did not cause a crash. Unfortunately, I replaced it with the new version, so I don't have the previous version anymore. 

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    12 minutes ago, bladeberkman said:

    The prior version of the DLL did not cause a crash. Unfortunately, I replaced it with the new version, so I don't have the previous version anymore. 

    Both ST and GitHub have an archive of older versions. I sent you a test build by PM. That MDMP file is identical to the previous one.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Release version 2.0.1, which fixes a crash that some users were encountering.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    FYI - I'm updating references in my uploads that previously required the Submenu DLL mod to now reference this DLL instead, since the Submenu DLL mod no longer has exemplar patching and this DLL does.  It's a bit of a pain but it's worth it for downloaders to get the right files.

    • Thanks 1

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections