Difference between revisions of "Stairs create unknown sector types"

From DoomWiki.org

[checked revision][checked revision]
m (The floor_e field is actually 32-bit, so there are 4294967296 values. Some are going to be statistically more likely than others, however, in a fashion not simply determined.)
m (Add commas for readability and explanation of what that number is.)
Line 2: Line 2:
 
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.
 
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 {{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 4294967296 (though not all 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.
+
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 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.
 
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.

Revision as of 22:04, 15 March 2015

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 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