MantisBT - Core Inform
View Issue Details
0000187Core InformScenespublic2010-07-07 18:052010-10-28 00:30
Carolyn 
graham 
normalseriousalways
closedfixed 
x86WindowsVista
6E72 
6F95 
(serious/mild) Game compiles but misbehaves
0000187: Game produces a nonrunning version when a scene begins based on a room "enclosing" a player
Repro:

1. Enter the source code below (critical section: "[scene name] begins when [location] encloses the player for the first turn.")
2. Click Go!

Actual result:

Game compiles, then prints 4 blank lines and accepts no input. (The compiler does not crash, but the game is seriously misbehaving.)

Expected result:

Game compiles with the player in a room named "Current Place".
"Bug Test" by Carolyn VanEseltine

Current Place is a room.

Importance is a scene. Importance begins when Current Place encloses the player for the first turn.
This code should be identical to the results if "Importance begins when Current Place encloses the player for the first turn." is replaced with "Importance begins when the location is Current Place for the first turn."

This code compiled correctly on 6E59.
No tags attached.
related to 0000032closed graham Testing "if the player was on the holder of the player" always returns true during the first turn 
has duplicate 0000285closed  "After going somewhere when the player was enclosed by room" syntax compiles, but game hangs. 
Issue History
2010-07-07 18:05CarolynNew Issue
2010-07-07 19:47jmcgrewStatusnew => acknowledged
2010-07-08 14:04EmacsUserStatusacknowledged => confirmed
2010-07-08 14:27EmacsUserNote Added: 0000266
2010-07-08 14:52EmacsUserNote Added: 0000267
2010-07-08 14:52EmacsUserRelationship addedrelated to 0000032
2010-09-10 09:54jmcgrewRelationship addedrelated to 0000285
2010-09-10 10:31EmacsUserRelationship replacedhas duplicate 0000285
2010-09-10 10:51EmacsUserNote Added: 0000547
2010-09-21 15:48grahamNote Added: 0000570
2010-09-21 15:48grahamStatusconfirmed => resolved
2010-09-21 15:48grahamResolutionopen => fixed
2010-09-21 15:48grahamAssigned To => graham
2010-10-25 21:14jmcgrewFixed in Version => 6F95
2010-10-28 00:30jmcgrewStatusresolved => closed

Notes
(0000266)
EmacsUser   
2010-07-08 14:27   
From my digging so far, this looks related to the changes in response to 0000032. Still investigating...
(0000267)
EmacsUser   
2010-07-08 14:52   
Got it. The phrase ``the Current Place encloses the player for the first turn'' depends on the chronological records to track when the player is enclosed by the Current Place. At the time of the first chronological records update, InitialSituation-->DONE_INIS is false, which, because of the response to 0000032, means that the holder of everything is ``thedark.'' Notably, even the holder of thedark is thedark. The I6 routine for determining enclosure handles ``the Current Place encloses the player'' by checking if the holder of the player is the Current Place, or the holder of the holder of the player is the Current Place, etc. until it runs out of holders. But with thedark enclosing itself, this process goes forever, hanging the game.
(0000547)
EmacsUser   
2010-09-10 10:51   
For completeness, a workaround is:

- - - -
To decide which object is the darkness object:
(- thedark -).

Enclosure in fact relates an object (called x) to an object (called y) when the holder of y is not the darkness object and x encloses y.

The verb to in fact enclose (it in fact encloses, they in fact enclose, it in fact enclosed, it is in fact enclosed, it is in fact enclosing) implies the enclosure in fact relation.

Current Place is a room.

Importance is a scene. Importance begins when Current Place in fact encloses the player for the first turn.
- - - -

Similarly, for 0000285:

- - - -
To decide which object is the darkness object:
(- thedark -).

Enclosure in fact relates an object (called x) to an object (called y) when the holder of y is not the darkness object and x encloses y.

The verb to in fact enclose (it in fact encloses, they in fact enclose, it in fact enclosed, it is in fact enclosed, it is in fact enclosing) implies the enclosure in fact relation.

Cave is a room. South of the cave is the Open Air.

After going somewhere when the cave in fact enclosed the player:
say "Inform does like this rule!".

Test me with "z/s".
- - - -

For this latter example, keep in mind the comment in 0000032:0000102, which justifies the wait in the test string.
(0000570)
graham   
2010-09-21 15:48   
This is now fixed. It was getting stuck in thedark, oddly enough.