ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Difference between revisions of "Internal Error"

From ModEnc
Jump to: navigation, search
(List of known reasons for Internal Errors (please expand))
(rewrite/-design, since it was marked; removed note about pd, since he's not a fucking bug-finding service)
Line 1: Line 1:
{{Cleanup}}
+
{{HorizontalBar|This page lacks a screenshot of the error described. If you happen to have one, please upload it.}}
A general error returned by the [[TS]] [[engine]] and it's derivates. The message itself doesn't say much, and can be caused by almost anything you do wrong, so it's impossible to say where exactly it came from when it hits your screen.
 
If you get an internal error, all you can do is try to track down what changes you have made to cause it. Review your latest rules-changes and play again to see when it occurs. Make sure you always know what you have changed, the more things you change simultaneously, the harder it is to see what caused the IE. Also, just because you found a mistake and fixed it, that doesn't mean there can't be a second one that's still causing the error.
 
  
''Note'' to advanced modders: If you encounter an Internal Error for no apparent reason, you can try asking PD to look at the [[except.txt]] / [[DEBUG.txt]] files produced by the game, they can tell him what is a likely cause of it. There are no guarantees that he will do that, though.
+
The '''Internal Error''' (commonly known as '''IE''') is a general error returned by the [[Tiberian Sun]] [[engine]] and its derivates. The message itself is rather ambiguous, giving no information what went wrong, and leaving it to the modder to know what could have caused the error and to find this cause in his code.  
  
== List of known reasons for Internal Errors (please expand) ==
+
If you experience an Internal Error, the best course of action is to think whether a distinctive event immediately preceeded the crash (e.g. a unit being built, a weapon being fired...), or, if this is not the case (or not the cause), to tripple-check your latest code modification(s) - at best with the help of a diff between the current rules set and a previous, working one (for this reason, and in case you mess up your code beyond repair, you should always keep recent backups of working code).
  
As you will see below, most Internal Errors seem to be caused by WEAPONS and/or WARHEADS.
+
Note that, the more code you add at the same time, the more likely it is to introduce multiple bugs and causes for crashes. Just because you found ''one'' mistake in your code, doesn't mean there can't be ''another one'', also causing an IE (or being the one that caused the IE in the first place).
  
#: '''Weapons:'''
+
==Except.txt==
 +
If your game crashes through an IE, a file called except.txt is generated in your game folder. This file is a dump of certain runtime-data from the game at the point of crash, and could potentially tell you exactly what went wrong - ''if'' you knew the engine code. <br>
 +
pd has, every once in a while, found a pattern he recognized, and could, for example, tell when an except referenced the voxel loading routines, thereby pinpointing the IE to a voxel issue.
  
# Typo for a weapon entry on a vehicle/infantry/aircraft/building so that it points to a non-existent weapon.
+
However, more often than not even pd can't help - without the source code or in-depth knowledge of the game code, the file is rather useless to one. (cp. [[SYNCx.txt]])
# A weapon that is used in a game mode but not parsed by (attached to) another unit in the main rules file.
+
 
# Cluster/shrapnel weapon not parsed by (attached to) another unit.
+
== List of known Causes of Internal Errors (please expand) ==
#: '''Warheads:'''
+
Since "Internal Error" is the game's response to almost any fatal error, its causes are diverse. Most common are causes related to weapons and warheads, with a missing warhead probably being the all-time no. 1 cause of Internal Errors.
# Missing [[warhead]] on a weapon.
+
 
# A [[warhead]] with [[CellSpread]] bigger than 11.
+
===Weapons-related Causes===
# Setting off a warhead with a [[CellSpread]] that is also {{TTL|Temporal|yes}}.
+
*Pointing to a weapon that does not exist (possibly caused by a simple misspelling of the correct weapon's name)
# If a new [[Warhead]] is not added to the Warhead list, an IE can occur (although, apparently, not always).
+
*Making the game use a weapon that wasn't parsed beforehand (by having it attached to a unit, an example being shrapnel-weapons that aren't assigned to a dummy unit)
#: '''Other IE causes:'''
+
**A subset of this happens when you try to use a weapon in a game mode override file that wasn't attached to a unit in the main rules
# An MCV becomes neutral: Mind-control of an MCV is relinquished to a defeated player (RA2/YR only). The workaround is to make MCVs unable to be mind-controlled (this is done in the YR 1.002 UMP). Neutral Construction Yards do not seem to be a problem.
+
 
# If a falling paratrooper (who has nearly reached the ground) is killed by an area-effect mutation weapon you will get an IE. Point based mutations seem to be okay and the GM superweapon seems incapable of killing falling paratroopers. If you have an area-effect mutation weapon then you should ensure that all paratroopers are immune to it.
+
===Warhead-related Causes===
# {{TTL|HoverPad|yes}}. If the AI uses a Weather Storm or Nuclear Missile superweapon and a building with HoverPad=yes exists, the game will suffer an IE. This IE can, however, be prevented by uncommenting the flag {{TTL|AIIonCannonHelipadValue|20,20,20}} (change the values if you like).
+
*Having a weapon's {{tt|Warhead}} tag point to a warhead that doesn't exist (e.g. through a typo), or having no warhead-tag at all
# Omitting {{TTL|MakeInfantry|X}} on [[InfDeath]] 9's animation ({{TTL|InfantryMutate|GENDEATH}}) can sometimes cause an internal error. See the final note on [[MakeInfantry]] for more information.
+
*[[CellSpread]] must not be bigger than 11{{fnl|1}}
# Using the 'sell unit' super weapon on a Tank-Bunkered unit breaks the Tank Bunker. Attempting to sell or destroy the broken Tank Bunker causes an internal error. The moral of the story? Either don't include the 'sell unit' super weapon, or don't include the Tank Bunker (or find a way to guarantee that no player could ever have access to both 'sell unit' and the Tank Bunker at the same time).
+
*Setting off a warhead with a [[CellSpread]] that is also {{TTL|Temporal|yes}}
# Adding a new harvester for a 4th side/faction and not making an AI Trigger for it.
+
*Sometimes, warheads that are not listed under {{tt|[[Warheads|[Warheads]]]}} can cause an IE
# The modding concept known as 'Infantry Linking' (using the {{TTL|UndeploysInto}}/{{TTL|DeploysInto}} tag(s)) can result in an IE occuring when a human player views an AI-owned War Factory.
+
 
#: The Internal Error can be caused by setting DeploysInto/UndeploysInto on an infantry unit, and then modifying that infantry unit's entry in a subsequent override rules-set (EG: setting in rulesmd.ini and then modifying the unit in a game mode/map, or setting in a game mode and then modifying the unit in a map).
+
===Other Causes===
#: To be 100% safe, do not use Infantry Linking.
+
*An MCV turns neutral: If a player's MCV was mind-controlled by an enemy, that player is killed, and the MCV is then released from mind-control, an Internal Error will be caused by the fact that the MCV tries to return to its original owner, but said owner is not a legal faction of the game anymore. One '''workaround''' is to make MCVs unable to be mind-controlled, this is the way it is done in the [[YR 1.002 UMP]]. Neutral [[Building:Construction Yard|Construction Yards]] do not seem to be a problem.
#: I can confirm that modifying such infantry in maps can also cause this IE, see [http://forums.renegadeprojects.com/showthread.php?pid=2034#pid2034 here]. -- DCoder
+
*If a falling paratrooper (who has nearly reached the ground) is killed by an area-effect mutation weapon, an IE will be triggered. Point based mutations seem to be okay and the [[Super weapon:Genetic Mutator|Genetic Mutator]] seems incapable of killing falling paratroopers. If you have an area-effect mutation weapon, you should ensure that all paratroopers are immune to it.
#: Infantry Linking and this bug are covered in more detail in the Extras section of the UMP Developer's Pack version 7 and higher [version 7 is not yet released].
+
*{{TTL|HoverPad|yes}}. If the AI uses a Weather Storm or Nuclear Missile superweapon and a building with {{tt|HoverPad&#61;yes}} exists, the game will suffer an IE. '''This IE can''', however, '''be prevented''' by uncommenting the flag {{TTL|AIIonCannonHelipadValue|20,20,20}} (change the values if you like).
# If you have a buildable Construction Yard building and then cancel construction of it, an IE will occur. You cannot have buildable Construction Yards. ''Seems that someone managed to workaround this - http://forums.cncden.com/showpost.php?p=282732&postcount=23. Sorry if this is old''
+
*Omitting {{TTL|MakeInfantry|X}} on [[InfDeath]] 9's animation ({{TTL|InfantryMutate|GENDEATH}}) can sometimes cause an internal error. See [[MakeInfantry]] for more information.
# If an animation is called for and is not listed in the [Animations] list then an IE can occur.
+
*Using the 'sell unit' super weapon on a tank-bunkered unit breaks the Tank Bunker. Attempting to sell or destroy the broken Tank Bunker causes an Internal Error. The only possible fix is to make sure a player never ever has access to both the "Sell Unit" Super weapon and the Tank Bunker at the same time - in reality, this means you can only have either of them...not both.
# Whenever you put a new voxel/shp in the tibsun.mix (or ra(md).mix) instead of putting it in a expandxx.mix (of course in the correct mix), whenever you build this unit, game will crash. I'm sure this will never occur since you put your files regularly inside expandxx.mix files. -- Sevelys.
+
*Adding a new harvester for a 4th side/faction and not making an AI Trigger for it will cause an IE
# Not having any valid [[InfantryTypes|InfantryType]] with {{TTL|AllowedToStartInMultiplayer|yes}} (set to yes by default). The game requires at least one type of infantry to start with at map load, otherwise it IEs just before the map has loaded.
+
*The modding concept known as [[Infantry Linking|"Infantry Linking"]] can result in an IE, occuring when the linked infantry was modified in a subsequent game mode override file or a map ''and'' a human player scrolls to a place on the map where coordinates on which an AI-owned [[Building:War Factory|War Factory]] is located are visible on his screen. Once again, the only solution is not to do it.
# Setting {{TTL|CarryOverCap|0}} (default value is -1, positive values do not cause an IE).
+
*If you have a buildable Construction Yard, start its construction, and then cancel it, an IE will occur. Same solution as above.{{fnl|2}}
 +
*Calling for an animation that is not listed under {{tt|[[Animations|[Animations]]]}} might trigger an Internal Error
 +
*If you build a unit ingame whose voxel or shp you put into an original game mix instead of a proper expansion mix, you'll have a Close Encounter of the Erroneous Kind
 +
*Not having at least one valid [[InfantryTypes|InfantryType]] with {{TTL|AllowedToStartInMultiplayer|yes}} (default) for each house will lead to an IE on load
 +
*Setting {{TTL|CarryOverCap|0}} will cause an IE. (Default value is -1, positive values do not cause an IE.)
 +
 
 +
===Footnotes===
 +
{{fn|1|In certain versions, [[RockPatch]] does allow a higher value.}}
 +
''<span id="fn2">2</span> &#91;[[#f2|^]]&#93; According to [http://forums.cncden.com/showpost.php?p=282732&postcount=23 this post], the poster has found a solution to allow this. This has, however, not been confirmed independently''.
 +
 
 +
==Software used to find Internal Errors==
 +
*[[INI Checker]] (can check your rules, art and sound files for syntactic errors like typos and missing references)
 +
*[[ExceptChecker]] (primarily for RockPatch-related IEs, it &#97;nalyzes except.txt, tries to find references to code added by the patch or known routines, and ''might'' then be able give a direction)
  
 
== See also ==
 
== See also ==
* [[Reconnection Error]]
+
*[[Reconnection Error]]
 
+
*[http://forums.renegadeprojects.com/showthread.php?pid=2034#pid2034 Confirmation the Infantry Linking IE also applies to modifications done by maps]
== Software used to find Internal Errors ==
 
  
[[INI Checker]] is a very useful program that can check your [[rules]], [[art]] and [[sound]] [[ini]] files for typos and missing references.
 
 
[[Category:Bugs_and_Errors]]
 
[[Category:Bugs_and_Errors]]
 +
__NOTOC__
 +
<!-- TOC useless 'cause page too small -->

Revision as of 08:22, 8 August 2006

This page lacks a screenshot of the error described. If you happen to have one, please upload it.

The Internal Error (commonly known as IE) is a general error returned by the Tiberian Sun engine and its derivates. The message itself is rather ambiguous, giving no information what went wrong, and leaving it to the modder to know what could have caused the error and to find this cause in his code.

If you experience an Internal Error, the best course of action is to think whether a distinctive event immediately preceeded the crash (e.g. a unit being built, a weapon being fired...), or, if this is not the case (or not the cause), to tripple-check your latest code modification(s) - at best with the help of a diff between the current rules set and a previous, working one (for this reason, and in case you mess up your code beyond repair, you should always keep recent backups of working code).

Note that, the more code you add at the same time, the more likely it is to introduce multiple bugs and causes for crashes. Just because you found one mistake in your code, doesn't mean there can't be another one, also causing an IE (or being the one that caused the IE in the first place).

Except.txt

If your game crashes through an IE, a file called except.txt is generated in your game folder. This file is a dump of certain runtime-data from the game at the point of crash, and could potentially tell you exactly what went wrong - if you knew the engine code.
pd has, every once in a while, found a pattern he recognized, and could, for example, tell when an except referenced the voxel loading routines, thereby pinpointing the IE to a voxel issue.

However, more often than not even pd can't help - without the source code or in-depth knowledge of the game code, the file is rather useless to one. (cp. SYNCx.txt)

List of known Causes of Internal Errors (please expand)

Since "Internal Error" is the game's response to almost any fatal error, its causes are diverse. Most common are causes related to weapons and warheads, with a missing warhead probably being the all-time no. 1 cause of Internal Errors.

Weapons-related Causes

  • Pointing to a weapon that does not exist (possibly caused by a simple misspelling of the correct weapon's name)
  • Making the game use a weapon that wasn't parsed beforehand (by having it attached to a unit, an example being shrapnel-weapons that aren't assigned to a dummy unit)
    • A subset of this happens when you try to use a weapon in a game mode override file that wasn't attached to a unit in the main rules

Warhead-related Causes

  • Having a weapon's Warhead tag point to a warhead that doesn't exist (e.g. through a typo), or having no warhead-tag at all
  • CellSpread must not be bigger than 111
  • Setting off a warhead with a CellSpread that is also Template:TTL
  • Sometimes, warheads that are not listed under [Warheads] can cause an IE

Other Causes

  • An MCV turns neutral: If a player's MCV was mind-controlled by an enemy, that player is killed, and the MCV is then released from mind-control, an Internal Error will be caused by the fact that the MCV tries to return to its original owner, but said owner is not a legal faction of the game anymore. One workaround is to make MCVs unable to be mind-controlled, this is the way it is done in the YR 1.002 UMP. Neutral Construction Yards do not seem to be a problem.
  • If a falling paratrooper (who has nearly reached the ground) is killed by an area-effect mutation weapon, an IE will be triggered. Point based mutations seem to be okay and the Genetic Mutator seems incapable of killing falling paratroopers. If you have an area-effect mutation weapon, you should ensure that all paratroopers are immune to it.
  • Template:TTL. If the AI uses a Weather Storm or Nuclear Missile superweapon and a building with HoverPad=yes exists, the game will suffer an IE. This IE can, however, be prevented by uncommenting the flag Template:TTL (change the values if you like).
  • Omitting Template:TTL on InfDeath 9's animation (Template:TTL) can sometimes cause an internal error. See MakeInfantry for more information.
  • Using the 'sell unit' super weapon on a tank-bunkered unit breaks the Tank Bunker. Attempting to sell or destroy the broken Tank Bunker causes an Internal Error. The only possible fix is to make sure a player never ever has access to both the "Sell Unit" Super weapon and the Tank Bunker at the same time - in reality, this means you can only have either of them...not both.
  • Adding a new harvester for a 4th side/faction and not making an AI Trigger for it will cause an IE
  • The modding concept known as "Infantry Linking" can result in an IE, occuring when the linked infantry was modified in a subsequent game mode override file or a map and a human player scrolls to a place on the map where coordinates on which an AI-owned War Factory is located are visible on his screen. Once again, the only solution is not to do it.
  • If you have a buildable Construction Yard, start its construction, and then cancel it, an IE will occur. Same solution as above.2
  • Calling for an animation that is not listed under [Animations] might trigger an Internal Error
  • If you build a unit ingame whose voxel or shp you put into an original game mix instead of a proper expansion mix, you'll have a Close Encounter of the Erroneous Kind
  • Not having at least one valid InfantryType with Template:TTL (default) for each house will lead to an IE on load
  • Setting Template:TTL will cause an IE. (Default value is -1, positive values do not cause an IE.)

Footnotes

1 In certain versions, RockPatch does allow a higher value.

2 [^] According to this post, the poster has found a solution to allow this. This has, however, not been confirmed independently.

Software used to find Internal Errors

  • INI Checker (can check your rules, art and sound files for syntactic errors like typos and missing references)
  • ExceptChecker (primarily for RockPatch-related IEs, it analyzes except.txt, tries to find references to code added by the patch or known routines, and might then be able give a direction)

See also