Manual doors on 1S lines cause an illegal operation

From DoomWiki.org

In the Doom engine, manual push-activation door actions will cause an illegal operation if placed on a single-sided linedef.

This is sometimes fatal on the first activation, in which case the program will immediately crash (in DOS, a venetian blinds phenomenon will usually occur). Occasionally, two or more activations of the line are required before the problem kicks in, in which case the initial activation of the line is accompanied by the normal sound of a door opening, but without any other visible reaction from the game engine.

Cause[edit]

The push-style door activation code (which most editors refer to as "DR" doors) does not check for a valid second side on the linedef before proceeding to spawn a thinker that affects that sidedef's sector. This may crash immediately if the erroneous location referenced by sidedefs[-1] points outside of the application's address space. If it does not, then the thinker which is spawned will reference an invalid sector, which may cause an illegal access if the thinker is subsequently modified, such as is the case when the line is activated a second time.

Behavior may vary between different gameplay sessions, or on different maps, due to the unpredictable variability of memory on the heap.

This error is confirmed to remain unfixed in Doom 3: BFG Edition's Doom Classic module. Most source ports, starting with Boom, fix it by ignoring the activation of push-type door linedefs if there is no valid second side on the line.

Examples[edit]

A canon example of the problem is available on the original version of MAP06 of Doom II. The one-sided door tracks of the red key door in this map are mistakenly given manual door actions, albeit not the same action as the red key door's two-sided activation lines. Pressing either door track will crash the game. This particular instance was eventually fixed in the IWAD provided with the Doom Classic Unity ports.