Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001166I6 LibraryGeneralpublic2013-12-26 11:592015-05-10 17:47
Reporterhugolabrande 
Assigned ToDavidG 
PrioritynormalSeveritymildReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version6/12 
Target VersionFixed in Version6/12 
Summary0001166: Entering a closed container
Description(I haven't tried to reproduce this bug, someone on the French forum told me he noticed it, hopefully it is indeed one)

Trying to enter a closed container succeeds with Inform 6/12 (not with Inform 6/11). It seems that the game opens the container first, but without telling the player. The difference seems to be in verblibm.h : the line
  if (noun has container && noun hasnt open) return L__M(##Enter, 3, noun);
is replaced by
  if (noun has container && noun hasnt open && ImplicitOpen(noun)) return L__M(##Enter, 3, noun);

Can anyone confirm the bug (using the latest 6/12 code to compile the attached source code), and does anyone have any idea as to why this fails?
Minimal Source Text To Reproduce
Include "Parser";
Include "VerbLib";

Object room "ROOM"
   with description "room"
   has light;

Object box "BOX" room
   with name 'box',
   has enterable container openable ~open
;

[ Initialise; location = room; ];

Include "grammar";
Additional InformationOutput with 6/11 is:

    Release 1 / Serial number 131226 / Inform v6.33 Library 6/11 S
    ROOM
    room
    You can see a BOX (which is closed) here.
    > enter box
    You can’t get into the closed BOX.

With library 6/12:

    Release 1 / Serial number 131226 / Inform v6.33 Library 6/12pre S
    ROOM
    room
    You can see a BOX (which is closed) here.
    > enter box
    You get into the BOX.
    > exit box
    You get out of the BOX.
    ROOM
    room
    You can see a BOX (which is empty) here.

And the box is open.
TagsNo tags attached.
Attached Filespatch file icon bug1166.patch [^] (978 bytes) 2013-12-30 06:29 [Show Content]

- Relationships

-  Notes
(0002207)
zarf (developer)
2013-12-26 13:06

This should be filed in the "I6 Library" project, not "Inform 6" (which is just the compiler).

You may have to close it and refile.
(0002212)
EmacsUser (manager)
2013-12-28 08:32

Sorry for the late update. I can confirm the issue, even with the latest library revision.
(0002213)
EmacsUser (manager)
2013-12-28 08:41

And patch attached.
(0002215)
DavidG (developer)
2013-12-28 14:31

Patch applied. Thanks!
(0002216)
hugolabrande (reporter)
2013-12-28 15:24

Hey guys,

Thanks a lot for the (fast!) fix! However, it might look like this fix creates another problem...
If you look at the spec for 'NO_IMPLICIT_ACTIONS', it says "if you set it, it won't try to take an object from a sack before dropping it"; but if you try doing just that, it does try!

Here's a sample source:
Constant NO_IMPLICIT_ACTIONS;
Include "Parser";
Include "VerbLib";

Object room "ROOM"
with description "room" has light;

Object sac "SACK" room
with name 'sack',
has container open;

Object pomme "APPLE" sac
with name 'apple',
has edible;

[ Initialise; location = room; ];
Include "Grammar";


Here's the output before the patch:
Release 1 / Serial number 131228 / Inform v6.33 Library 6/12pre S
ROOM
room
You can see a SACK (in which is an APPLE) here.
> drop apple
Perhaps you should take the APPLE out of the SACK first.

And after the patch:
Release 1 / Serial number 131228 / Inform v6.33 Library 6/12pre S
ROOM
room
You can see a SACK (in which is an APPLE) here.
> drop apple
(first taking the APPLE out of the SACK)
Dropped.


Can anyone confirm this?
(0002217)
EmacsUser (manager)
2013-12-28 16:07

That would be my fault. Looking into it now.
(0002218)
EmacsUser (manager)
2013-12-28 16:20

I don't know what went wrong in my earlier reading of the code, but it was clearly incorrect. The proper fix is much simpler and applies to the line cited in the report. Replacement patch uploaded.
(0002219)
hugolabrande (reporter)
2013-12-28 17:29

Awesome, thanks for that fix! If both codes I posted work properly now, I think we can consider this bug eradicated :)
(0002220)
DavidG (developer)
2013-12-28 22:57

Both test cases checked. Looks good.
(0002226)
DavidG (developer)
2013-12-30 03:48
edited on: 2013-12-30 04:24

Looks like we still have problems (see http://www.intfiction.org/forum/viewtopic.php?f=7&t=10917 [^]). Original poster suggests the problem lies with improper handling of the 'openable' attribute.

I'll do a binary search on this bug and see when and where it first appeared.

Constant NO_IMPLICIT_ACTIONS;
Include "Parser"; Include "VerbLib"; Include "Grammar";
[ Initialise; location = room; ];

Object room "ROOM" with description "room" has light;

Object box "BOX" room with name 'box',
   has enterable container openable ~open;
   
Object box1 "BOX1" room with name 'box1',
   has enterable container ~open;

Object sac "SACK" room with name 'sack',
   has container open;

Object pomme "APPLE" sac with name 'apple',;



Release 1 / Serial number 131229 / Inform v6.33 Library 6/12pre S
! ----------------------------------------------------------------------------
Without Constant NO_IMPLICIT_ACTIONS && without patch : WRONG

You can see a BOX (which is closed), a BOX1 (which is closed) and a SACK (in which is an APPLE) here.
> drop apple
(first taking the APPLE out of the SACK)
Dropped.
> enter box1
You can’t get into the closed BOX1.
> enter box
You get into the BOX.

With Constant NO_IMPLICIT_ACTIONS && without patch : O.K.

You can see a BOX (which is closed), a BOX1 (which is closed) and a SACK (in which is an APPLE) here.
> drop apple
Perhaps you should take the APPLE out of the SACK first.
> enter box1
You can’t get into the closed BOX1.
> enter box
You can’t get into the closed BOX.
! ----------------------------------------------------------------------------
Without NO_IMPLICIT_ACTIONS && with last patch : WRONG

You can see a BOX (which is closed), a BOX1 (which is closed) and a SACK (in which is an APPLE) here.
> drop apple
(first taking the APPLE out of the SACK)
Dropped.
> enter box1
You get into the BOX1.
It is now pitch dark in here!
> undo
ROOM
[Previous turn undone.]
> enter box
You can’t get into the closed BOX.

With NO_IMPLICIT_ACTIONS && with last patch : WRONG

You can see a BOX (which is closed), a BOX1 (which is closed) and a
SACK (in which is an APPLE) here.
> drop apple
Perhaps you should take the APPLE out of the SACK first.
> enter box1
You get into the BOX1.
It is now pitch dark in here!
> undo
ROOM
[Previous turn undone.]
> enter box
You get into the BOX.
It is now pitch dark in here!

(0002228)
EmacsUser (manager)
2013-12-30 06:29

My apologies. Let's try this once more; see the attached patch.
(0002232)
DavidG (developer)
2013-12-30 15:38

Should this patch be applied before or after the other patches?
(0002233)
EmacsUser (manager)
2013-12-31 10:22

Ah, sorry. Looks like I did a git pull, so the third patch includes a bit about undoing the second.
(0002235)
DavidG (developer)
2013-12-31 14:05

I'm sorry, I don't understand. Should I roll back to before patches for this bug began to be applied before I apply this patch?
(0002236)
EmacsUser (manager)
2014-01-01 09:16

No; the patch should apply cleanly to HEAD, without rollback.
(0002238)
DavidG (developer)
2014-01-01 15:55

Patch is applied and pushed out to the Github repo. Let's hope that this is the last of the problems associated with this bug.
(0003683)
jmcgrew (administrator)
2015-05-10 17:47

Closing all resolved issues from 2014 and earlier.

- Issue History
Date Modified Username Field Change
2013-12-26 11:59 hugolabrande New Issue
2013-12-26 13:06 zarf Note Added: 0002207
2013-12-26 14:41 EmacsUser Project Inform 6 => I6 Library
2013-12-28 08:32 EmacsUser Note Added: 0002212
2013-12-28 08:32 EmacsUser Assigned To => DavidG
2013-12-28 08:32 EmacsUser Reproducibility have not tried => always
2013-12-28 08:32 EmacsUser Status new => confirmed
2013-12-28 08:32 EmacsUser Product Version => 6/12
2013-12-28 08:41 EmacsUser File Added: bug1166.patch
2013-12-28 08:41 EmacsUser Note Added: 0002213
2013-12-28 14:29 DavidG Note Added: 0002214
2013-12-28 14:30 DavidG Status confirmed => resolved
2013-12-28 14:30 DavidG Resolution open => fixed
2013-12-28 14:30 DavidG Note Deleted: 0002214
2013-12-28 14:31 DavidG Note Added: 0002215
2013-12-28 14:31 DavidG Fixed in Version => 6/12
2013-12-28 15:24 hugolabrande Note Added: 0002216
2013-12-28 15:24 hugolabrande Status resolved => feedback
2013-12-28 15:24 hugolabrande Resolution fixed => reopened
2013-12-28 16:07 EmacsUser Note Added: 0002217
2013-12-28 16:07 EmacsUser Assigned To DavidG =>
2013-12-28 16:07 EmacsUser Status feedback => acknowledged
2013-12-28 16:10 EmacsUser Status acknowledged => confirmed
2013-12-28 16:18 EmacsUser File Deleted: bug1166.patch
2013-12-28 16:18 EmacsUser File Added: bug1166.patch
2013-12-28 16:20 EmacsUser Note Added: 0002218
2013-12-28 16:20 EmacsUser Assigned To => DavidG
2013-12-28 16:20 EmacsUser Status confirmed => assigned
2013-12-28 17:29 hugolabrande Note Added: 0002219
2013-12-28 22:57 DavidG Note Added: 0002220
2013-12-28 22:57 DavidG Status assigned => resolved
2013-12-28 22:57 DavidG Resolution reopened => fixed
2013-12-30 03:48 DavidG Note Added: 0002226
2013-12-30 03:49 DavidG Status resolved => acknowledged
2013-12-30 04:12 DavidG Note Edited: 0002226 View Revisions
2013-12-30 04:13 DavidG Note Edited: 0002226 View Revisions
2013-12-30 04:24 DavidG Note Edited: 0002226 View Revisions
2013-12-30 06:29 EmacsUser Note Added: 0002228
2013-12-30 06:29 EmacsUser File Deleted: bug1166.patch
2013-12-30 06:29 EmacsUser File Added: bug1166.patch
2013-12-30 06:29 EmacsUser Status acknowledged => assigned
2013-12-30 15:38 DavidG Note Added: 0002232
2013-12-31 10:22 EmacsUser Note Added: 0002233
2013-12-31 14:05 DavidG Note Added: 0002235
2014-01-01 09:16 EmacsUser Note Added: 0002236
2014-01-01 15:55 DavidG Note Added: 0002238
2014-01-01 15:55 DavidG Status assigned => resolved
2015-05-10 17:47 jmcgrew Note Added: 0003683
2015-05-10 17:47 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker