Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000809Core InformSource text and punctuationpublic2011-11-30 08:122014-05-07 07:34
Assigned Tograham 
Platformx86OSWindowsOS Version7
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000809: I7 not escaped in RTP_WRONGASSIGNEDKIND messages
DescriptionThe attached source is translated to I6 lines including

- - - -
if (~~((Global_Vars-->9) ofclass K8_person)) RunTimeProblem(RTP_WRONGASSIGNEDKIND, (Global_Vars-->9), "now the target is foo """, "person");
- - - -

where the I7 quotes have not undergone the usual escaping to tildes. The error message:

- - - -
# Error: Missing operator: inserting '+'
> (Global_Vars-->9) = (PHR_740_r3 (EMPTY_TEXT_VALUE)); if (~~(( ...etc
- - - -
Minimal Source Text To Reproduce
There is a room.
The target is a person that varies.
To decide what object is foo (X - some text):
	decide on yourself.
When play begins:
	now the target is foo "".
TagsNo tags attached.
Effect(critical) Inform 6 compiler reports errors for valid code
Attached Filesrar file icon Bug809.rar [^] (4,069 bytes) 2011-12-05 10:40

- Relationships
related to 0000129closedgraham Missing run-time type check assigning from a supertype to a subtype 

-  Notes
EmacsUser (manager)
2011-12-02 15:40

After expanding the attached source to a full story:

- - - -
There is a room.

A sceneryassist is a kind of backdrop. There are 100 sceneryassists.

The unformed scenery list is a list of objects that varies.

First when play begins (this is the scenery initialization rule):
    now the unformed scenery list is the list of sceneryassists.
To decide which object is a new sceneryobject:
    let selected be entry 1 in unformed scenery list;
    remove selected from unformed scenery list;
    decide on selected.

When play begins:
    let new scenery be a new sceneryobject.
- - - -

I cannot reproduce the error. Could you check whether some of the elided lines are relevant?
Texter (reporter)
2011-12-04 08:24

This phrase is very long and consists of 52 lines and is very puzzeling, so I can't post it completely. I thought that lines could be helpful. Maybe someone could explain, what the error text does mean.
EmacsUser (manager)
2011-12-04 19:37
edited on: 2011-12-04 19:38

The error message means that, where one I6 value was expected, Inform's I7-to-I6 transformation has given two, and there is nothing to combine them. But what those two values are we cannot tell without the full text after ``> (Global_Vars-->25)''. And as for why they ended up where they did, we will probably need the long and puzzling phrase, or at least a simplified version that still gives the error. A long post would be okay. Or, if you would like, it might be easier to copy-paste the problematic code to a new story, check that the error message is the same, zip that story, and send it to with ``Bug 809'' mentioned in the subject. We can also mark the issue as private if you want; then only the Inform developers, the site admins, you, and I could see it.

Texter (reporter)
2011-12-05 01:16
edited on: 2011-12-07 09:40

I've abbreviated the source text and I will send it immediately to that email. I don't think it will be necessary to switch the status to private because it doesn't contain any secret information.

EmacsUser (manager)
2011-12-07 09:57

Got it. Thanks. The bug in your case is triggered by literal text in an assignment of a new room to a variable whose kind is more specific than object. A couple of workarounds for you:

Instead of

- - - -
now new room is a newly created positioned room dir of current room with name "";
- - - -

store the literal text in a temporary named value, so that it appears on a different line:

- - - -
let the room name be "";
now new room is a newly created positioned room dir of current room with name the room name;
- - - -

or store the new room in a temporary named value, which will have the implicit type object, and then copy it to the global variable:

- - - -
let the temporary room be a newly created positioned room dir of current room with name "";
now the new room is the temporary room;
- - - -
Texter (reporter)
2011-12-07 10:14

Thank you very much for your help :-) I need to fix some more bugs but I think I will manage it at my own.
graham (administrator)
2011-12-17 12:37

Fixed; the summary was perfectly correct about the cause.

- Issue History
Date Modified Username Field Change
2011-11-30 08:12 Texter New Issue
2011-12-02 15:40 EmacsUser Note Added: 0001472
2011-12-02 15:40 EmacsUser Priority high => normal
2011-12-02 15:40 EmacsUser Status new => feedback
2011-12-04 08:24 Texter Note Added: 0001473
2011-12-04 08:24 Texter Status feedback => new
2011-12-04 19:37 EmacsUser Note Added: 0001474
2011-12-04 19:37 EmacsUser Status new => feedback
2011-12-04 19:38 EmacsUser Note Edited: 0001474 View Revisions
2011-12-05 00:42 Texter Issue Monitored: Texter
2011-12-05 00:42 Texter Issue End Monitor: Texter
2011-12-05 00:44 Texter Issue Monitored: Texter
2011-12-05 00:44 Texter Issue End Monitor: Texter
2011-12-05 01:16 Texter Note Added: 0001475
2011-12-05 01:16 Texter Status feedback => new
2011-12-05 04:29 Texter Note Edited: 0001475 View Revisions
2011-12-05 10:40 jmcgrew File Added: Bug809.rar
2011-12-07 09:40 Texter Note Edited: 0001475 View Revisions
2011-12-07 09:57 EmacsUser Note Added: 0001477
2011-12-07 09:57 EmacsUser Status new => confirmed
2011-12-07 09:57 EmacsUser Category Phrases and functional programming => Kinds and type checking
2011-12-07 09:57 EmacsUser Summary (Global_Vars-->25) = (PHR_923_r24 ((Global_Vars-->26),(Glo ...etc => I7 not escaped in RTP_WRONGASSIGNEDKIND messages
2011-12-07 09:57 EmacsUser Description Updated View Revisions
2011-12-07 09:57 EmacsUser Steps to Reproduce Updated View Revisions
2011-12-07 09:57 EmacsUser Relationship added related to 0000129
2011-12-07 10:14 Texter Note Added: 0001478
2011-12-17 12:37 graham Note Added: 0001495
2011-12-17 12:37 graham Status confirmed => resolved
2011-12-17 12:37 graham Resolution open => fixed
2011-12-17 12:37 graham Assigned To => graham
2013-02-08 20:05 EmacsUser Issue cloned 0001077
2013-02-08 20:06 EmacsUser Category Kinds and type checking => Source text and punctuation
2014-05-07 07:34 jmcgrew Fixed in Version => 6L02
2014-05-07 07:34 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker