HW2C compiled mod error - resolved

So, I’m having a new problem packing a HW2C mod for steam workshop, that seems to also be causing trouble when packed into a .big file normally. A quick rundown of the things I’ve tested:

Unpacked HW2 v1.28: works
Packed HW2 v1.28: crashes
Unpacked HW2 v1.1: works
Packed HW2 v1.1: works

The error appears durring game load, on the UIShipIcons stage. Here’s what the log has to say when it gets to the crash:

Unable to retrieve UI (animated) texture (DATA:\Ship\Icons\icon_ships.mres) – FATAL EXIT – graphic/346:! --stack trace-- 0x00677963: getLibraryID (D:\Games\Steam\SteamApps\common\Homeworld\Homeworld2Classic\Bin\Release\Homeworld2.exe) 0x77AE10E9: RtlAllocateHeap (C:\Windows\SYSTEM32\ntdll.dll) 0x746FDCFF: malloc (C:\Windows\SYSTEM32\MSVCR110.dll) 0x746FDDA7: operator new (C:\Windows\SYSTEM32\MSVCR110.dll) 0x005A3660: SteamLobbySessionDesc::SetUserData (D:\Games\Steam\SteamApps\common\Homeworld\Homeworld2Classic\Bin\Release\Homeworld2.exe) 0x77AF522C: LdrGetProcedureAddressForCaller (C:\Windows\SYSTEM32\ntdll.dll)

Anyone else run into this problem? Got any solution recommendations? I’m pretty much out of ideas. If a Gearbox employee wants to dig into it they should be able to get access to http://steamcommunity.com/sharedfiles/filedetails/?id=412401395

Wow, very odd. I’ll poke a bit tomorrow.

I actually just got it. As so often happens when I get a technical problem like this, I had a new thought just after posting about it, even though I thought I was at the end of my rope beforehand. the need to repack a fairly large mod to test it slowed down my testing of the brainwave though.

I can only infer the cause, but it looks like a similar problem to one I had before with locale files and might be related to some problems I and others were having with loading shared hod files. What was going on, and how I fixed it, is thus: The ship icons for the mod are in new files (hwat_icon_ships.mres and associated tgas) rather than modifying the stock icon files (icon_ships.mres was actually in the mod files, but associated tgas were not). But the shipcons.lua still contained the references to the old files for old ships, and it was crashing when it tried to load them. Since we don’t actually have any of those ships at all accessible anymore, I just wiped out the icon_ships.mres and all references to it and everything works now.

So problem solved, but it does seem like a bit of a kink got into the mod loading process at some stage.

1 Like