curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-2034] [Mantis 2071] Real number arithmetic on some number functions with i6 code causes internal error #50

Closed curiousdannii-testing closed 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : aika092

Description :

I 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.

Steps 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 information :

C:Program Files (x86)Inform 7Compilersinform6
-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
> 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
> 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

imported from: [Mantis 2071] Real number arithmetic on some number functions with i6 code causes internal error
  • status: Closed
  • resolution: Resolved
  • resolved: 2022-04-10T04:20:16+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by zarf :
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}

) -)

curiousdannii-testing commented 2 years ago

61eedb62875fc10070240916:

Not a bug, as pointed out in the comments.