Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002109Core InformUnderstandingpublic2019-10-05 11:022019-10-09 06:17
Reportermattweiner 
Assigned To 
PrioritynormalSeveritymildReproducibilityalways
StatusnewResolutionopen 
PlatformmacOSmojave?OS Version
Product Version6M62 
Target VersionFixed in Version 
Summary0002109: checking to see whether the player's command includes a token while printing a parser error causes an infinite loop on failure
DescriptionWhen there is a rule for printing a parser error which checks whether the player's command includes certain tokens like "[any person]", the parser will enter an infinite loop whenever the player's command does *not* include that token.
Minimal Source Text To Reproduce
For printing a parser error when the player's command includes "[any person]": say "This 
is the error."

Jane is a woman.

Lab is a room.

Test me with "x jane/trace 6/boing".
Additional InformationOutput:






Welcome
An Interactive Fiction
Release 1 / Serial number 191005 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD

Lab

>test me
(Testing.)

>[1] x jane
This is the error.

>[2] trace 6
[Parser tracing set to level 6.]

>[3] boing
[ "boing" ? ]
   [NounDomain called at word 1
   seeking definite object
[DSA on the north with reason = 0 p1 = 0 p2 = 0]
    Trying the north (29) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the northeast with reason = 0 p1 = 0 p2 = 0]
    Trying the northeast (30) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the northwest with reason = 0 p1 = 0 p2 = 0]
    Trying the northwest (31) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the south with reason = 0 p1 = 0 p2 = 0]
    Trying the south (32) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the southeast with reason = 0 p1 = 0 p2 = 0]
    Trying the southeast (33) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the southwest with reason = 0 p1 = 0 p2 = 0]
    Trying the southwest (34) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the east with reason = 0 p1 = 0 p2 = 0]
    Trying the east (35) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the west with reason = 0 p1 = 0 p2 = 0]
    Trying the west (36) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the up with reason = 0 p1 = 0 p2 = 0]
    Trying the up (37) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the down with reason = 0 p1 = 0 p2 = 0]
    Trying the down (38) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the inside with reason = 0 p1 = 0 p2 = 0]
    Trying the inside (39) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on the outside with reason = 0 p1 = 0 p2 = 0]
    Trying the outside (40) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
   [ND made 0 matches]
  [Scope routine called at stage 1]
  [Scope routine returned multiple-flag of 0]
  [Object list from word 1]
  [Calling NounDomain on location and actor]
   [NounDomain called at word 1
   seeking definite object
  [Scope routine called at stage 2]
[DSA on yourself with reason = 0 p1 = 0 p2 = 0]
    Trying yourself (41) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on Jane with reason = 0 p1 = 0 p2 = 0]
    Trying Jane (42) at word 1
   [ND made 0 matches]
  [Scope routine called at stage 1]
  [Scope routine returned multiple-flag of 0]
  [Object list from word 1]
  [Calling NounDomain on location and actor]
   [NounDomain called at word 1
   seeking definite object
  [Scope routine called at stage 2]
[DSA on yourself with reason = 0 p1 = 0 p2 = 0]
    Trying yourself (41) at word 1
Parse_name called
Pass 1: 0 Pass 2: 0 Pass 3: 0
[DSA on Jane with reason = 0 p1 = 0 p2 = 0]
    Trying Jane (42) at word 1
ad infinitum.

This token does not produce the error:

Understand "boing" as "[boing]".

Rule for printing a parser error when the player's command includes "[boing]": say "Boing!"

Lab is a room.

Test me with "boing/whee".

Forum thread: https://intfiction.org/t/how-can-i-navigate-from-and-into-buildings-by-exiting-and-entering/42718/16?u=matt_weiner [^]
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0004877)
zarf (developer)
2019-10-06 09:09

I haven't investigated this, but I strongly suspect that the attempt to match a person is causing a parser error on failure. So an infinite loop (or maybe recursion) is inevitable.
(0004880)
mattweiner (reporter)
2019-10-09 06:15

OK--the other example from forum thread involved an "[any building]" token, where building was a kind of room, so that's also compatible with this idea.

Hmmm, well I tried this:

For printing a parser error when the player's command includes "[any person]" and the latest parser error is not the noun did not make sense in that context error: say "This
is the error."

Jane is a woman.

Lab is a room.

Test me with "x jane/trace 6/boing".


and now it goes into the infinite loop even on "x jane." I might be misunderstanding the logic though.
(0004881)
mattweiner (reporter)
2019-10-09 06:17

I also tried the "can only do that to something animate" error.

- Issue History
Date Modified Username Field Change
2019-10-05 11:02 mattweiner New Issue
2019-10-06 09:09 zarf Note Added: 0004877
2019-10-09 06:15 mattweiner Note Added: 0004880
2019-10-09 06:17 mattweiner Note Added: 0004881


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker