intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Feb 23, 2019 5:05 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Nov 26, 2018 12:19 pm 
Offline

Joined: Tue May 16, 2017 10:59 pm
Posts: 314
I've had a couple of Junior Arithmancer players tell me that reaching the minimum integer in Glulx causes the game not to misbehave (see this post) but to crash. I can't make it crash in either the Inform IDE or Gargoyle for Windows, but apparently the game will crash in at least Gargoyle for Linux.

Would a few of you try checking the attached .gblorb file with your interpreter and see whether it crashes? The Inform code that produces the .gblorb file is simply
Code:
Beginning is a room.

VERYSMALL is always -2147483647.
minimum-testing is an action out of world.  Understand "minimum" as minimum-testing.
Carry out minimum-testing:
   let newnumber be VERYSMALL;
   say "The minimum integer in Glulx is almost [newnumber], which is [newnumber in words].[paragraph break]";
   let newnumber be newnumber - 1;
   say "The minimum integer in Glulx actually is [newnumber], which is [newnumber in words].[paragraph break]";
   say "Since that didn't work, let's try again: The minimum integer in Glulx actually is [newnumber], which is minus two billion, one hundred forty-seven million, four hundred eighty-three thousand, six hundred forty-eight.[paragraph break]";
   let newnumber be newnumber - 1;
   say "But the maximum integer in Glulx is [newnumber], which is [newnumber in words].[paragraph break]".


If you type MINIMUM at the command prompt it should produce the output
Code:
Welcome
An Interactive Fiction
Release 1 / Serial number 181126 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD

Beginning

>minimum
The minimum integer in Glulx is almost -2147483647, which is minus two billion, one hundred and forty-seven million, four hundred and eighty-three thousand, six hundred and forty-seven.

The minimum integer in Glulx actually is -2147483648, which is minus .

Since that didn't work, let's try again: The minimum integer in Glulx actually is -2147483648, which is minus two billion, one hundred forty-seven million, four hundred eighty-three thousand, six hundred forty-eight.

But the maximum integer in Glulx is 2147483647, which is two billion, one hundred and forty-seven million, four hundred and eighty-three thousand, six hundred and forty-seven.


I'd like to see which interpreters this works fine on (again, type MINIMUM at the command prompt), and which interpreters crash with this. I'll probably put a note in the next release of JA about which interpreters might cause problems here.

Thanks!


Attachments:
story.gblorb [594.94 KiB]
Downloaded 28 times
Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Nov 26, 2018 2:09 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5921
It works in the most recent (unofficial) Mac Gargoyle builds.

EDIT-ADD: Also Lectrote and the new Mac Spatterlight build.

If you figure out what's crashing, I can add a test case to the Glulxercise test: https://eblong.com/zarf/glulx/glulxercise.ulx


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Nov 26, 2018 2:51 pm 
Offline
User avatar

Joined: Thu Aug 22, 2013 2:48 pm
Posts: 145
Works fine on Glulxe 0.5.4 with GlkTerm 1.0.4-wide.

_________________
Dialog. Tethered.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Nov 26, 2018 4:11 pm 
Offline

Joined: Tue Jan 22, 2008 5:55 am
Posts: 1416
Location: The Netherlands
I'm using Gargoyle on Linux (Ubuntu 18.04). Here's my output, which is not quite the expected output:
Quote:
> minimum
The minimum integer in Glulx is almost -2147483647, which is minus two billion, one hundred and forty-seven million, four
hundred and eighty-three thousand, six hundred and forty-seven.

The minimum integer in Glulx actually is -(, which is minus .

Since that didn’t work, let’s try again: The minimum integer in Glulx actually is -(, which is minus two billion, one hundred
forty-seven million, four hundred eighty-three thousand, six hundred forty-eight.

But the maximum integer in Glulx is 2147483647, which is two billion, one hundred and forty-seven million, four hundred and
eighty-three thousand, six hundred and forty-seven.

The interpreter doesn't crash, though. I'm not sure how to check the version of Gargoyle.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Nov 27, 2018 10:55 am 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5921
Quote:
The minimum integer in Glulx actually is -(, which is minus .


Ooh, that's definitely an interpreter bug.

If you load up glulxercise.ulx (link above) and type "streamnum", what does it display? Should be

Quote:
>streamnum
Printing integers:

"0" len 1
"1" len 1
"-1" len 2
"9999" len 4
"-9999" len 5
"1234579" len 7
"-97654321" len 9
"2147483647" len 10
"-2147483647" len 11
"-2147483648" len 11

Passed.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Nov 27, 2018 11:58 am 
Offline

Joined: Mon Jun 29, 2009 5:51 am
Posts: 615
zarf wrote:
Quote:
The minimum integer in Glulx actually is -(, which is minus .

Ooh, that's definitely an interpreter bug.

Presumably in this case the version of Gargoyle being used is using an old version of Git as the interpreter, in which case it's just this: https://github.com/DavidKinder/Git/issues/8


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Nov 27, 2018 2:37 pm 
Offline

Joined: Tue May 16, 2017 10:59 pm
Posts: 314
DavidK wrote:
zarf wrote:
Quote:
The minimum integer in Glulx actually is -(, which is minus .

Ooh, that's definitely an interpreter bug.

Presumably in this case the version of Gargoyle being used is using an old version of Git as the interpreter, in which case it's just this: https://github.com/DavidKinder/Git/issues/8

Would this also cause the interpreter to crash, do you think, or just print the wrong thing (as in Victor's case) or nothing at all (in Zarf's, lft's, and my cases)?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Nov 27, 2018 3:10 pm 
Offline

Joined: Mon Jun 29, 2009 5:51 am
Posts: 615
Spike wrote:
DavidK wrote:
Presumably in this case the version of Gargoyle being used is using an old version of Git as the interpreter, in which case it's just this: https://github.com/DavidKinder/Git/issues/8
Would this also cause the interpreter to crash, do you think, or just print the wrong thing (as in Victor's case) or nothing at all (in Zarf's, lft's, and my cases)?
This interpreter bug is affecting the printing of the number *as a number*, not as words. It won't ever cause a crash, it just causes the number to be printed as the wrong character.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Nov 27, 2018 4:06 pm 
Offline

Joined: Tue Jan 22, 2008 5:55 am
Posts: 1416
Location: The Netherlands
zarf wrote:
Ooh, that's definitely an interpreter bug.

If you load up glulxercise.ulx (link above) and type "streamnum", what does it display? Should be

It prints:
Quote:
Printing integers:

“0” len 1
“1” len 1
“-1” len 2
“9999” len 4
“-9999” len 5
“1234579” len 7
“-97654321” len 9
“2147483647” len 10
“-2147483647” len 11
“-(“ len 2 (should be “-2147483648” len 11, FAIL)

1 tests failed.


Looks like the interpreter is Git 1.2.9, so this is probably an old bug?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Nov 27, 2018 4:39 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5921
The printing error is an old bug (see DavidK's comments above). Crashing may be an old bug as well. If you can get an updated version of Gargoyle, or rebuild Gargoyle with the current git, it's worth checking.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group