Difference between revisions of "Stairs create unknown sector types"

From DoomWiki.org

[unchecked revision][checked revision]
m (Make picture larger for consistent margin.)
m (Gallery: nolines)
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[File:1081.jpg|300px|thumb|A random freeze occurring in the [[Jaguar Doom]] port due to a bad sector type on stairs in [[E1M3: Toxin Refinery (Doom)|E1M3: Toxin Refinery]]]]
+
{{youtube|_43gTB9GB2M|This problem can also occur in [[Strife]], which was based on [[Versions of Doom and Doom II#v1.666|Doom II 1.666]].}}
All versions of the [[Doom engine]] contain an error in the <code>EV_BuildStairs</code> function which leaves several fields in the <code>floormove_t</code> thinker structure uninitialized. This structure tracks moving sector floors, remembering facts such as their destination height, speed, crushing properties, and for "lower-and-change" types, what sector special and flat to which the sector should change.
+
All versions of the [[Doom engine]] contain an error in the {{c|EV_BuildStairs}} function which leaves several fields in the {{c|floormove_t}} [[thinker]] structure uninitialized. This structure tracks moving [[sector]] floors, remembering facts such as their destination height, speed, crushing properties, and for "lower-and-change" types, what sector special and flat to which the sector should change.
  
By leaving the <code>type</code>, <code>crush</code>, <code>newspecial</code>, and <code>texture</code> fields of this structure uninitialized, this error causes the <code>T_MoveFloor</code> function to later read effectively random values out of these fields. If the value of the <code>type</code> field just happens to be <code>lowerAndChange</code>, the random special and flat texture will be propagated to the sector. Since there is only one possible value out of 65536 that will result in this behavior, this problem is of extreme rarity, and may not be witnessed even once during literal years of gameplay.
+
By leaving the {{c|type}}, {{c|crush}}, {{c|newspecial}}, and {{c|texture}} fields of this structure uninitialized, this error causes the {{c|T_MoveFloor}} function to later read effectively random values out of these fields. If the value of the {{c|type}} field just happens to be {{c|lowerAndChange}} (i.e., {{c|6}}), the random special and [[flat]] texture will be propagated to the sector. Since there is only one possible value out of 4,294,967,296 (2 to the 32nd power; though, not all values will occur with equal probabilities) that will result in this behavior, this problem is of extreme rarity, and may not be witnessed even once during literal years of gameplay.
  
This elusive glitch may cause the game to crash by attempting to load an invalid flat. More often, however, it causes the game to exit when the player steps on the offending sector. The error message "P_PlayerInSpecialSector: unknown type ###," with "###" being a seemingly random number, will appear at the DOS prompt.
+
This elusive glitch may cause the game to crash by attempting to load an invalid flat. More often, however, it causes the game to exit when the player steps on the offending sector. The error message "P_PlayerInSpecialSector: unknown special ###," with "###" being a seemingly random number, will appear at the DOS prompt.
  
[[Video:Strife_special_sector_crash|thumb|300px|right|This problem can also occur in [[Strife]], which was based on Doom II 1.666.]]
 
 
In the video, a descending set of stairs in [[MAP02: Town (Strife)|Tarnhill]] that lead to the [[MAP03: Front Base (Strife)|Front Base]] have suffered this malfunction on a single sector in the set. It has taken on a yellow-and-black-striped texture, and has the unknown sector type 102. The game exits as soon as the player steps into this sector. Unfortunately, due to Strife's hub system, this error has been saved permanently into the player's save file and will continue to act as an obstruction to progress.
 
In the video, a descending set of stairs in [[MAP02: Town (Strife)|Tarnhill]] that lead to the [[MAP03: Front Base (Strife)|Front Base]] have suffered this malfunction on a single sector in the set. It has taken on a yellow-and-black-striped texture, and has the unknown sector type 102. The game exits as soon as the player steps into this sector. Unfortunately, due to Strife's hub system, this error has been saved permanently into the player's save file and will continue to act as an obstruction to progress.
  
 
This bug was first discovered and repaired by authors of the [[Boom]] [[source port]], but knowledge of it remained low even afterward.
 
This bug was first discovered and repaired by authors of the [[Boom]] [[source port]], but knowledge of it remained low even afterward.
 +
 +
==Gallery==
 +
<gallery mode=nolines widths="315px" heights="253px">
 +
1081.jpg|A random freeze occurring in the [[Jaguar Doom]] port due to a bad sector type on stairs in [[E1M3: Toxin Refinery (Doom)|E1M3: Toxin Refinery]].
 +
PSXStairsError.jpg|The [[Sony PlayStation]] version of Doom has suffered the error in [[E2M2: Containment Area]].
 +
</gallery>
 +
 +
{{featured article}}
 
[[Category:Errors and bugs]]
 
[[Category:Errors and bugs]]
 
[[Category:Doom engine]]
 
[[Category:Doom engine]]

Revision as of 07:20, 26 March 2020

This problem can also occur in Strife, which was based on Doom II 1.666.

All versions of the Doom engine contain an error in the EV_BuildStairs function which leaves several fields in the floormove_t thinker structure uninitialized. This structure tracks moving sector floors, remembering facts such as their destination height, speed, crushing properties, and for "lower-and-change" types, what sector special and flat to which the sector should change.

By leaving the type, crush, newspecial, and texture fields of this structure uninitialized, this error causes the T_MoveFloor function to later read effectively random values out of these fields. If the value of the type field just happens to be lowerAndChange (i.e., 6), the random special and flat texture will be propagated to the sector. Since there is only one possible value out of 4,294,967,296 (2 to the 32nd power; though, not all values will occur with equal probabilities) that will result in this behavior, this problem is of extreme rarity, and may not be witnessed even once during literal years of gameplay.

This elusive glitch may cause the game to crash by attempting to load an invalid flat. More often, however, it causes the game to exit when the player steps on the offending sector. The error message "P_PlayerInSpecialSector: unknown special ###," with "###" being a seemingly random number, will appear at the DOS prompt.

In the video, a descending set of stairs in Tarnhill that lead to the Front Base have suffered this malfunction on a single sector in the set. It has taken on a yellow-and-black-striped texture, and has the unknown sector type 102. The game exits as soon as the player steps into this sector. Unfortunately, due to Strife's hub system, this error has been saved permanently into the player's save file and will continue to act as an obstruction to progress.

This bug was first discovered and repaired by authors of the Boom source port, but knowledge of it remained low even afterward.

Gallery