curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-2064] [Mantis 2101] We broke it (again), memory failure #20

Closed curiousdannii-testing closed 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : nuku

Description :

(Each time Go or Replay is clicked, Inform tries to translate the source text into a working story, and updates this report.)

Problem. An internal error has occurred: the memory manager has halted Inform, which seems to be generating endless structures. Presumably it is trapped in a loop. The current sentence is '"Flexible Survival" by Nuku Valente' ; the error was detected at line 387 of "inform7/Chapter 2/Memory.w". This should never happen, and I am now halting in abject failure.

What has happened here is that one of the checks Inform carries out internally, to see if it is working properly, has failed. There must be a bug in this copy of Inform. It may be worth checking whether you have the current, up-to-date version. If so, please report this problem via www.inform7.com/bugs.

As for fixing your source text to avoid this bug, the last thing you changed is probably the cause, if there is a simple cause. Your source text might in fact be wrong, and the problem might be occurring because Inform has failed to find a good way to say so. But even if your source text looks correct, there are probably rephrasings which would achieve the same effect.

Steps to reproduce :

This is Flexible Survival, the code is in the usual place: https://github.com/Nuku/Flexible-Survival

Additional information :

We've made tables that are very very large, is this related?

imported from: [Mantis 2101] We broke it (again), memory failure
  • status: Closed
  • resolution: Resolved
  • resolved: 2022-04-10T04:34:21+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

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

Comment by DavidK :
Are you using the 32-bit build of NI with the Large Address Aware flag set in its Win32 PE header? (This is the version that comes with the latest Windows builds of 6M62.) If you're running out of address space with that, then that's probably the end of the line as far as 32-bit builds go.

Have you tried the 64-bit Windows build of NI from http://ifarchive.org/indexes/if-archive/infocom/compilers/inform7/executables/ ? That can only be used from the command line, not the Inform 7 front-end, but should cope with larger address space requirements. If you are using that, and that is running out of space, I will take a look.

curiousdannii-testing commented 2 years ago

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

Comment by DavidK :
You can see the command used to run NI by the front-end in the "Console" page of the "Results" tab after a compile. It's usually something of the form

Compilers
i -internal "Internal" -project ".inform" -format=ulx

You'd also need to set the HOME environment variable to where your "My Documents" folder is.

curiousdannii-testing commented 2 years ago

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

Comment by DavidK :
You would set it from the command prompt before running the commands to run ni and then i6, something like

set HOME=c:usersDocuments
Compilers
i -internal "Internal" -project ".inform" -format=ulx

curiousdannii-testing commented 2 years ago

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

Comment by DavidK :
The next version of Inform will likely be entirely 64-bit only on Windows. But there isn't a timescale for when that will be done.

curiousdannii-testing commented 2 years ago

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

Comment by DavidK :
That's the right command for running Inform 6. The output of the Inform 6 stage is a .ulx file that contains the Glulx game data. The last stage, that actually produces a .gblorb file, is to run cBlorb. If from the front-end you open a (smaller!) project and choose "Release" from the "Release" menu, then look at the console page, you can see how cBlorb is run.

curiousdannii-testing commented 2 years ago

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

Comment by DavidK :
Good to hear that you've got the 64-bit build going.

We don't do timescales for Inform releases for the simple reason that there's no way we'd manage to keep to them! Speaking personally, I have a lot less free time for personal software projects than I did when I was younger, so it's very much a case of doing a little when I can. Sorry.

curiousdannii-testing commented 2 years ago

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

Comment by nuku :
What would the command be?

curiousdannii-testing commented 2 years ago

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

Comment by nuku :
Just to check, as we experiment with this, but whenabouts will the 64bit version be usable from within inform's gui?

curiousdannii-testing commented 2 years ago

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

Comment by Wahn128 :
We recently added a big table of 348 rows and 79 columns, and it compiled and ran fine till today. Seems like we've bumped some limit again.

Played around a little with not loading a file that is guaranteed to work and setting up a dummy file with 6 additional entries into the table (a copy of an existing one that also works). The individual files aren't the problem, just the amount of code from what I can tell.

Commented out all the entries into the table that are spread throughout the whole game and things are compiling again, for now. Still, we got some big plans for the table, so please help us by finding the source of that memory issue.

curiousdannii-testing commented 2 years ago

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

Comment by Wahn128 :
Hm, where would one find that HOME environment variable to set it?

curiousdannii-testing commented 2 years ago

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

Comment by Wahn128 :
Hmm... I got it this far now:

The 63048-word source text has successfully been translated into an
intermediate description which can be run through Inform 6 to complete
compilation. There were 382 rooms and 1597 things.
++ 100% (Finishing work)
++ Ended: Translation succeeded: 382 rooms, 1597 things
Inform 7 has finished.

Which leaves behind a Buildauto.inf

Somehow the next step doesn't quite want to work though - I tried to copy the syntax from what Inform shows in the console, but somehow a new output.gblorb never is successfully created. Can you maybe give me a hint what's going wrong at that point?

C:Program Files (x86)Inform 7Compilers>inform6 -w~S~DG "C:UsersHolgeDocumentsInformProjectsFlexible Survival.informBuildauto.inf" "C:UsersHolgeDocumentsInformProjectsFlexible Survival.informBuildoutput.ulx"
Inform 6.33N for Win32 (30th August 2015)
In: 1 source code files 1437528 syntactic lines
1251984 textual lines 155414094 characters (ISO 8859-1 Latin1)
Allocated:
296144 symbols (maximum 13000000) 553157593 bytes of memory
Out: Glulx story file 66.190605 (31424K long):
31 classes (maximum 200) 2030 objects (maximum 4000)
231 global vars (maximum 512) 1863214 variable/array space (maximum 12500000)
370 verbs (maximum 2000) 2797 dictionary entries (maximum 5000)
823 grammar lines (version 2) 1071 grammar tokens (unlimited)
338 actions (maximum 2000) 48 attributes (maximum 56)
40 common props (maximum 256) 409 individual props (unlimited)
31564399 characters used in text 18361691 bytes compressed (rate 0. 37)
0 abbreviations (maximum 64) 22742 routines (unlimited)
1592383 instructions of code 1074134 sequence points
4071936 bytes writable memory used 28105984 bytes read-only memory used
32177920 bytes used in machine 1041563904 bytes free in machine
Compiled with 9433 suppressed warnings
Completed in 15 seconds

C:Program Files (x86)Inform 7Compilers>

curiousdannii-testing commented 2 years ago

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

Comment by Wahn128 :
Okay, thanks for the help - I got it to run now, with the build that overtaxed the old compiler's memory, plus a test run that had 500 extra rows of that colossal table.

Btw, is there any idea which timescale might be in the stars for the next Inform version that includes support for the better compiler in the frontend? Kinda hoping it might come around by the time we finally will have filled the table with content and need its full extent in the compile (which is likely to take months).

curiousdannii-testing commented 2 years ago

61eedb62875fc10070240916:

Fixed.

Comment by Graham Nelson:

A safety limit inside Inform's memory manager used to cause it to halt if what it thought was an impossible amount of memory had been allocated. It reckoned without the sheer size of projects like this. The limit has been taken out.