Some HW2 crashes just won't give any reason in Hw2.log, for example:
1. If LoadModel(NewShipType, 1) is put behind StartShipHardPointConfig() function in any ship script, the game will crash without any reason.
2. If LoadSharedModel() function is used for a subsystem script, make sure the target subsystem exists, otherwise the game will crash without any reason.
3. The outer boound of a map could be the reason for crash wihout any reason, increase it until it doesn't crash anymore. This problem could occur only when there's something really big in the map, for example, a planet.
4. The lod levels in ship script should match with the ones in the HOD file, otherwise when you zoom in on the ship, the game will crash without any reason.
5. From my experience, if the HOD file is somehow messed up, the game will crash without any reason.
6. The shader types and algorithm in every HOD model should match those in the shader folder. If there's any mismatch, the game will crash without giving any reason.
Here're some frequently recorded error codes in the ErrorLog.txt:
00000000 -- general issues, like loading a later game without outer bounds, or when a game has turned too messy and the memory is screwed up somehow. In the latter case, there's no clear solution except making the game less messy. One possible scenario is too many damage sound fx being played at the same time (dmp file shows exception code 0xC0000005), and applying a max polyphony limit to the sound should fix it. Changing the battlescar files (removing some battlescars) and then loading an previous game will cause this crash too during loading screen (dmp file shows exception code 0xC0000005).
0000000c -- related to big objects colliding when moving or rotating. Trying to avoid collisions by removing these big objects or making them unmoveable solves the problem. If there's a singularity or black hole that pulls all ships towards the center of the map, this collision error will definitly occur at some point in the game.
00000010 -- This happens when a ship is built but its builder doesn't have "ShipHold" ability (exception code is 0xC0000005 in the dmp file). This crash can also be produced when using a ship HOD in the background folder (don't ask me why I tried that).
00000020 -- this error code appears when the save menu says there's some invalid file name and crashes, but it could also have something to do with the hangar management system. In some occassions, accessing the launch menu just after a ship exited hyperspace will crash the game and give this error code, especially when there're supposed to be some instant dockers in the dock (e.g., repairing patchers are programmed to instantly dock when the host enters hyperspace). If the launching menu is accessed 10 seconds after hyperspace is finished, there won't be such a problem. This code can also be produced when AMD graphics card is used to launch some mod for HW2Classic from the HWR bundle, causing instant crash (the solution is to add " -nopbuffer" to the command line, but at the cost of losing shadows).
00000030 -- I suspect this is related to launching conflict.
00000168 -- map object not found in the given type. This can happen when a dust cloud object is added with the addCloud function. Also happens when a weapon fire is not found in the weapon file.
00781000 -- related to visual effect overloading (dmp file shows exception code 0xC0000005). When too many Hiigaran pulsar beams, smoke animations or damage effects are being played at the same time, the game will crash with this error code. Reducing or removing those effects will solve the problem.
Can be caused by infinite loop in the lua code.
Can be caused by a buildable ship without addAbility(NewShipType, "CanLaunch"). When this ship is built, the game would freeze.
Can be caused by a ship wihout the Latitude parameter on the hardpoint for the weapon. This type of freeze typically occurs after the ship gets out of hyperspace. This is a hardpoint problem.
More to add... By you!