Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002071Core InformEquations, units, arithmeticpublic2018-09-04 13:192018-09-04 17:28
Reporteraika092 
Assigned Tozarf 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionno change required 
Platformx64OSWindowsOS Version10
Product Version6M62 
Target VersionFixed in Version 
Summary0002071: Real number arithmetic on some number functions with i6 code causes internal error
DescriptionI don't know the extent of the bug but this is the simplest version I've found. I don't know enough about I6 code to give any more information than this I'm afraid.

I can get the code to work by first saving the pixel-width integer to a temporary variable, so it's not critical to my project, but I thought you should know.
Minimal Source Text To Reproduce
Start is a room.

To decide what number is the pixel-width of (img - a figure-name):
	    (- FindImageWidth({img}); -)

Figure of test-image is the file "test.png".

When play begins:
    let N be 1.0 * the pixel-width of the figure of test-image.
Additional InformationC:\Program Files (x86)\Inform 7\Compilers\inform6 \
    -wSDG +include_path=..\Source,.\ auto.inf output.ulx
Inform 6.33N for Win32 (30th August 2015)
auto.inf(11872): Error: Found '(' without matching ')'
> tmp_0 = (REAL_NUMBER_TY_Times(1065353216, NUMBER_TY_to_REAL_NU ...etc
auto.inf(11872): Error: Found '(' without matching ')'
> tmp_0 = (REAL_NUMBER_TY_Times(1065353216, NUMBER_TY_to_REAL_NU ...etc
auto.inf(11872): Error: Found '(' without matching ')'
> tmp_0 = (REAL_NUMBER_TY_Times(1065353216, NUMBER_TY_to_REAL_NU ...etc
auto.inf(11872): Error: Missing operand for "="
> tmp_0 = (REAL_NUMBER_TY_Times(1065353216, NUMBER_TY_to_REAL_NU ...etc
auto.inf(11872): Error: Expected expression with side-effects but found <constant>
> tmp_0 = (REAL_NUMBER_TY_Times(1065353216, NUMBER_TY_to_REAL_NU ...etc
auto.inf(11872): Error: Expected expression but found )
> tmp_0 = (REAL_NUMBER_TY_Times(1065353216, NUMBER_TY_to_REAL_NU ...etc
auto.inf(11872): Error: Expected expression with side-effects but found <constant>
> tmp_0 = (REAL_NUMBER_TY_Times(1065353216, NUMBER_TY_to_REAL_NU ...etc
In: 1 source code files 66458 syntactic lines
 56108 textual lines 2054263 characters (ISO 8859-1 Latin1)
Allocated:
  8065 symbols (maximum 20000) 13802400 bytes of memory
Out: Glulx story file 1.180904 (586K long):
    21 classes (maximum 200) 42 objects (maximum 640)
   230 global vars (maximum 512) 85104 variable/array space (maximum 180000)
    96 verbs (maximum 255) 316 dictionary entries (maximum 2000)
   179 grammar lines (version 2) 251 grammar tokens (unlimited)
   101 actions (maximum 200) 37 attributes (maximum 56)
    40 common props (maximum 256) 18 individual props (unlimited)
108972 characters used in text 85417 bytes compressed (rate 0.783)
     0 abbreviations (maximum 64) 2887 routines (unlimited)
 69547 instructions of code 39301 sequence points
105472 bytes writable memory used 494336 bytes read-only memory used
599808 bytes used in machine 1073142016 bytes free in machine
Compiled with 7 errors and 1650 suppressed warnings (no output)
Completed in 1 seconds

Compiler finished with code 1
TagsNo tags attached.
Effect(critical) Compiler reports internal error
Attached Files

- Relationships

-  Notes
(0004799)
zarf (developer)
2018-09-04 17:25

The bug is in your definition of pixel-width, I'm afraid.

When defining an I6 phrase that decides on a value, the I6 expression should not end with a semicolon. (Whereas an I6 phrase that doesn't decide on a value *should* end with a semicolon.) So you need to write

To decide what number is the pixel-width of (img - a figure-name):
	    (- FindImageWidth({img}) -)

- Issue History
Date Modified Username Field Change
2018-09-04 13:19 aika092 New Issue
2018-09-04 17:25 zarf Note Added: 0004799
2018-09-04 17:28 zarf Status new => closed
2018-09-04 17:28 zarf Assigned To => zarf
2018-09-04 17:28 zarf Resolution open => no change required


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker