Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000070Core InformRules and rulebookspublic2010-06-18 23:372010-07-01 23:07
Reporteremshort 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.5
Product Version6E59 
Target VersionFixed in Version6E72 
Summary0000070: Programming error appears at the start of the game in response to rulebook with two list variables
DescriptionAt startup, if compiled for the z-machine (doesn't happen under Glulx), game produces




[** Programming error: tried to read from -->16537 in the array "MStack", which has entries 0 up to 159 **]

[** Programming error: tried to read from -->16536 in the array "MStack", which has entries 0 up to 159 **]

[** Programming error: tried to read from -->16537 in the array "MStack", which has entries 0 up to 159 **]

[** Programming error: tried to read from -->16536 in the array "MStack", which has entries 0 up to 159 **]


Minimal Source Text To Reproduce
Foo is a room.   

A volume is a kind of value.
 
Liquid is a kind of value. Some liquids are defined by the Table of Liquids.

Table of Liquids
liquid	potable	flavor
nonliquid	false	some text
water	true	"Refreshing!"


The liquid-mixing rules are a volume based rulebook producing a liquid. 
The liquid-mixing rulebook has a list of liquids called the recipe contents.
The liquid-mixing rulebook has a list of volumes called the recipe quantities.  
Additional InformationThis problem further appears to be affected by source spacing. Removing one of the line breaks between the Table of Liquids and the liquid-mixing rules gets rid of the evidence.
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0000054)
jmcgrew (administrator)
2010-06-19 01:01
edited on: 2010-06-19 01:10

I get the same errors (on Windows) even after removing the extra line break.

(0000059)
jmcgrew (administrator)
2010-06-19 14:32

The line break doesn't seem to affect it on OS X either.
(0000060)
emshort (administrator)
2010-06-19 14:39

Hm -- it did, reproducibly, here (I went back and forth about five times to be sure, since it seemed so odd). But if I copy and paste the text out of the bug tracker again, then the line spacing doesn't affect the bug any more. So I wonder if there was something additional weird happening with white space encoding or an invisible gremlin character.
(0000063)
Ron Newcomb (reporter)
2010-06-20 00:30

FWIW, I too have had odd line-breaks-matter issues in OSX for many builds for reasons I can't fathom. For instance, every once in a great while I'd get a compiler error on a section header unless I stuck in an additional blank line before or after it (in addition to single blank lines already surrounding it). But if I deleted all blank lines around the section header (so it and the immediately preceding & following lines merge with it into one long line), and then re-add the line breaks, a single line break once again is all that is needed.

It's been a (very minor) issue for many, many builds for me, but since the bug has always thrown an error like "I don't understand this code: 'Section - blah'", it's never been a real issue.

Since I also have had occasional Find dialogue box searches crash the IDE, I'm inclined to suspect there's some wonky memory-management with the underlying text edit control in the GUI itself. A find dialogue box doing a find shouldn't crash anything, in any text editor.

I've never seen any of this affect runtime like Emily has found here, though.

Just FYI.
(0000069)
graham (administrator)
2010-06-20 04:15

It may be that we are seeing a ghostly glimpse of a bug in the OS X application to do with (I don't know) how it stores exotic kinds of fixed-width spaces instead of regular ones, etc., but this was straightforwardly a bug in the code which allocated memory for rulebook variables. Fixed.

- Issue History
Date Modified Username Field Change
2010-06-18 23:37 emshort New Issue
2010-06-19 01:01 jmcgrew Note Added: 0000054
2010-06-19 01:01 jmcgrew Status new => acknowledged
2010-06-19 01:10 jmcgrew Note Edited: 0000054 View Revisions
2010-06-19 01:11 jmcgrew Status acknowledged => confirmed
2010-06-19 11:26 emshort Issue Monitored: emshort
2010-06-19 13:37 jmcgrew Severity mild => serious
2010-06-19 14:32 jmcgrew Note Added: 0000059
2010-06-19 14:39 emshort Note Added: 0000060
2010-06-20 00:30 Ron Newcomb Note Added: 0000063
2010-06-20 04:15 graham Note Added: 0000069
2010-06-20 04:15 graham Status confirmed => resolved
2010-06-20 04:15 graham Resolution open => fixed
2010-06-20 04:15 graham Assigned To => graham
2010-06-30 18:07 jmcgrew Fixed in Version => 6E72
2010-07-01 23:07 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker