Simplex is a sister mod of Complex. It has incorporated the merits of Path To Victory along with many other mods through a long history of R&D. This mod aims to excavate the full potential of the Homeworld 2 engine and will simply blow your mind with incredible fun!

Post tutorial Report RSS Homeworld 2 Error Codes

When the game crashes, usually the reason for the crash is explained in Hw2.log, but there're some cases that there's simply no reason for the crash. This tutorial aims to record different reasons for crashes that apparently have no reason!

Posted by on - Basic Client Side Coding

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.

Freezing problems:

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!


Thanks, usefull info

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Homeworld 2
Send Message
Release date
Mod watch
Related Games
Homeworld 2
Homeworld 2 Real Time Strategy
Related Groups
Homeworld 2 Modders Group
Homeworld 2 Modders Group Fans & Clans with 137 members