[I7] Compiler silently fails without generating report

As the title says, I’ve hit a point where trying to compile my current project (about 40k source words) just silently stops. There is a brief “compilation failed” message in the status bar, but no other feedback, and the normal compilation report is not generated.

The “Progress” tab of the Results part of the notebook looks like this:

/usr/lib/x86_64-linux-gnu/gnome-inform7/ni \
	-internal /usr/share/gnome-inform7 -format=ulx -project /home/patrick/Documents/programming/Inform 7 projects/We Want a Rock/We Want a Rock.inform -rng
Inform 7 build 6M62 has started.
++ 0% (Reading text)
I've now read your source text, which is 39849 words long.
++ 5% (Analysing sentences)
I've also read Standard Rules by Graham Nelson, which is 42655 words long.
I've also read English Language by Graham Nelson, which is 2297 words long.
I've also read Locksmith by Emily Short, which is 4122 words long.
I've also read Inanimate Listeners by Emily Short, which is 412 words long.
I've also read Basic Screen Effects by Emily Short, which is 2218 words long.
I've also read Rideable Vehicles by Graham Nelson, which is 1819 words long.
I've also read Bulky Items by Juhana Leinonen, which is 1480 words long.
I've also read Conversation Package by Eric Eve, which is 2347 words long.
I've also read Conversation Nodes by Eric Eve, which is 5812 words long.
I've also read Conversation Suggestions by Eric Eve, which is 3268 words long.
I've also read Conversation Responses by Eric Eve, which is 1855 words long.
I've also read Conversational Defaults by Eric Eve, which is 2247 words long.
I've also read Conversation Framework by Eric Eve, which is 5190 words long.
I've also read Epistemology by Eric Eve, which is 1500 words long.
++ 15% (Drawing inferences)
++ 20% (Binding rulebooks)
++ 23% (Binding rulebooks)
++ 26% (Binding rulebooks)
++ 29% (Binding rulebooks)
++ 32% (Binding rulebooks)
++ 35% (Binding rulebooks)
++ 38% (Binding rulebooks)
++ 41% (Generating code)
++ 44% (Generating code)
++ 47% (Generating code)
++ 50% (Generating code)
++ 53% (Generating code)
++ 56% (Generating code)

Repeated attempts always result in a stop at 56%. Turning on the debugging log and trying again shows this:

Debugging log of Inform 7
Inform called as: /usr/lib/x86_64-linux-gnu/gnome-inform7/ni -internal /usr/share/gnome-inform7 -format=ulx -project /home/patrick/Documents/programming/Inform 7 projects/We Want a Rock/We Want a Rock.inform -rng
Found language bundle 'English' (built in)
Found language bundle 'Swedish' (built in)
Found language bundle 'Spanish' (built in)
Found language bundle 'Italian' (built in)
Found language bundle 'German' (built in)
Found language bundle 'French' (built in)
Reading language definition from </usr/share/gnome-inform7/Languages/English/Syntax.preform>
720 declarations read (14183 words)


-----------------------------------------------------
Phase I ... Lexical analysis
-----------------------------------------------------

I've now read your source text, which is 39849 words long.


-----------------------------------------------------
Phase II ... Semantic analysis Ia
-----------------------------------------------------

I've also read Standard Rules by Graham Nelson, which is 42655 words long.
I've also read English Language by Graham Nelson, which is 2297 words long.
I've also read Locksmith by Emily Short, which is 4122 words long.
I've also read Inanimate Listeners by Emily Short, which is 412 words long.
I've also read Basic Screen Effects by Emily Short, which is 2218 words long.
I've also read Rideable Vehicles by Graham Nelson, which is 1819 words long.
I've also read Bulky Items by Juhana Leinonen, which is 1480 words long.
I've also read Conversation Package by Eric Eve, which is 2347 words long.
I've also read Conversation Nodes by Eric Eve, which is 5812 words long.
I've also read Conversation Suggestions by Eric Eve, which is 3268 words long.
I've also read Conversation Responses by Eric Eve, which is 1855 words long.
I've also read Conversational Defaults by Eric Eve, which is 2247 words long.
I've also read Conversation Framework by Eric Eve, which is 5190 words long.
I've also read Epistemology by Eric Eve, which is 1500 words long.


-----------------------------------------------------
Phase III ... Initialise language semantics
-----------------------------------------------------



-----------------------------------------------------
Phase IV ... Semantic analysis Ib
-----------------------------------------------------



-----------------------------------------------------
Phase V ... Semantic analysis II
-----------------------------------------------------



-----------------------------------------------------
Phase VI ... Semantic analysis III
-----------------------------------------------------



-----------------------------------------------------
Phase VII ... First pass through assertions
-----------------------------------------------------

    Regional: CONSTANT_VNT'dreamscape'-region()(I356'dreamscape')
     == region
    Regional: CONSTANT_VNT'dreamscape'-region()(I356'dreamscape')
     == region
    Regional: CONSTANT_VNT'dreamscape'-region()(I356'dreamscape')
     == region
    Regional: CONSTANT_VNT'dreamscape'-region()(I356'dreamscape')
     == region
    Regional: CONSTANT_VNT'dreamscape'-region()(I356'dreamscape')
     == region


-----------------------------------------------------
Phase VIII ... Second pass through assertions
-----------------------------------------------------



-----------------------------------------------------
Phase IX ... Making the model world
-----------------------------------------------------



-----------------------------------------------------
Phase X ... Tables and grammar
-----------------------------------------------------



-----------------------------------------------------
Phase XI ... Phrases and rules
-----------------------------------------------------

Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'crib'-region(I330_crib)(I239'crib')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region


-----------------------------------------------------
Phase XII ... Code generation
-----------------------------------------------------



==== Phase XII.1 ... Compiling the storage for the model world ====



==== Phase XII.2 ... Compiling the tables ====



==== Phase XII.3 ... Compiling the equations ====



==== Phase XII.4 ... Compiling the named action patterns ====



==== Phase XII.5 ... Compiling the action routines ====



==== Phase XII.6 ... Compiling first block of phrases ====

                                        Fail: real number (~) nothing = nothing
                                            Fail: vehicle (~) nothing = nothing
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region
Regional: CONSTANT_VNT'the bar'-region(I169_the_bar)(I82'the bar')
 == region

And the last routine in the generated I6 code, which I have only a rough idea how to read, shows this:


! No specific request
! After going from Bar Constantinople to OutsideBar:
[ R_1135 ;
    if ((((action ==##Go) &&  (actor==player) && (((MStack-->MstVON(20007,0)) == I170_bar_constantinople) && ((MStac

Notably, that particular line really does end there. without bothering to balance the parentheses in any way. That’s the very end of the displayed I6 code output. Checking the generated Build/auto.inf file shows that it, too, is cut off right there.

The generated Build/Problems.html file also cuts off in the middle of a line. After some CSS and Javascript declarations, the last few lines look like this:

</head>
<body>
    <script l

Launching Inform from a terminal, but that doesn’t result in any warnings or errors being dumped to the terminal while compilation fails. I’ve tried rolling back my last few changes, but it doesn’t make any difference. Inform is able to compile other small projects that I have lying around. I’m not sure where else to look.

This is inform 6.33/6M62, using the GNOME front-end, on x64 Linux Mint 20.

Update: installing I7 in a VirtualBox VM running Windows 10 and trying again to compile gives a little more information; it at least generates a report:

Translating the Source - Failed 
The application ran your source text through the Inform 7 compiler, as usual, but the compiler unexpectedly failed. This should not happen even if your source text is gibberish, so you may have uncovered a bug in the program.

When a program like the I7 compiler fails, it typically returns an error number: this time, the number was 10, and that probably indicates that the compiler failed to manage its data structures properly. Perhaps you created a complicated situation on which it has not been fully tested.

The best option now is probably to reword whatever was last changed and to try again. Subsequent attempts will not be affected by the failure of this one, so there is nothing to be gained by restarting the application or the computer. A failed run should never damage the source text, so your work cannot be lost.

If you think it likely that the Inform 7 compiler is at fault, please check that you have the currently distributed build of the system: if you have, please consider taking the time to fill out a bug report at the Inform bug tracker (www.inform7.com/bugs). If you think the fault may be due to a problem in an extension you're using, then please contact the extension's author directly. 


Sorry for the inconvenience.

The console tab in the output gives a backtrace:

C:\Program Files (x86)\Inform 7\Compilers\ni \
    -rng -internal "C:\Program Files (x86)\Inform 7\Internal" -project "\\VBOXSVR\Windows\exchange\programming\Inform 7 projects\We Want a Rock\We Want a Rock.inform" -format=ulx
Inform 7 build 6M62 has started.
I've now read your source text, which is 39849 words long.
I've also read Standard Rules by Graham Nelson, which is 42655 words long.
I've also read English Language by Graham Nelson, which is 2297 words long.
I've also read Locksmith by Emily Short, which is 4122 words long.
I've also read Inanimate Listeners by Emily Short, which is 412 words long.
I've also read Basic Screen Effects by Emily Short, which is 2218 words long.
I've also read Rideable Vehicles by Graham Nelson, which is 1819 words long.
I've also read Bulky Items by Juhana Leinonen, which is 1480 words long.
I've also read Conversation Package by Eric Eve, which is 2347 words long.
I've also read Conversation Nodes by Eric Eve, which is 5812 words long.
I've also read Conversation Suggestions by Eric Eve, which is 3268 words long.
I've also read Conversation Responses by Eric Eve, which is 1855 words long.
I've also read Conversational Defaults by Eric Eve, which is 2247 words long.
I've also read Conversation Framework by Eric Eve, which is 5190 words long.
I've also read Epistemology by Eric Eve, which is 1500 words long.

Process failed, stack backtrace:
Exception code 0xc0000005 at PC=0x4e8a6d
ni!Frames__Blocks__supply_kind_and_stream() at inform7\Chapter 30\Phrase Blocks.w line 159
ni!Invocations__Inline__csi_inline() at inform7\Chapter 31\Compile Invocations Inline.w line 185
ni!Invocations__Compiler__compile_single_invocation() at inform7\Chapter 31\Compile Invocations.w line 540
ni!Invocations__Compiler__compile_invocation_list() at inform7\Chapter 31\Compile Invocations.w line 83
ni!Routines__Compile__line() at inform7\Chapter 31\Compile Phrases.w line 556
ni!Routines__Compile__code_line() at inform7\Chapter 31\Compile Phrases.w line 352
ni!Routines__Compile__code_block() at inform7\Chapter 31\Compile Phrases.w line 154
ni!Routines__Compile__routine() at inform7\Chapter 31\Compile Phrases.w line 99
ni!Phrases__compile() at inform7\Chapter 28\Phrases.w line 378
ni!Rules__compile_definition() at inform7\Chapter 27\Rules.w line 534
ni!Rules__Bookings__list_compile_rule_phrases() at inform7\Chapter 27\Rule Bookings.w line 747
ni!Rulebooks__compile_rule_phrases() at inform7\Chapter 27\Rulebooks.w line 795
ni!Phrases__Manager__compile_first_block() at inform7\Chapter 28\Construction Sequence.w line 310
ni!TemplateFiles__interpret() at inform7\Chapter 38\I6 Template Interpreter.w line 786
ni!TemplateFiles__interpret() at inform7\Chapter 38\I6 Template Interpreter.w line 460
ni!Main__core_inform_main() at inform7\Chapter 38\Main Routine.w line 43
ni!main() at inform7\Chapter 38\Main Routine.w line 15
ni!__tmainCRTStartup() at \usr\src\debug\mingw64-i686-runtime-4.0.6-1\crt\crtexe.c line 334
KERNEL32!BaseThreadInitThunk()
ntdll!RtlGetAppContainerNamedObjectPath()
ntdll!RtlGetAppContainerNamedObjectPath()

Compiler finished with code 10

At times when the compiler doesn’t give you any clues as to what is going wrong, and undoing the last changes doesn’t seem to help either, usually the best option is to try bisecting the code:

  1. Comment out approximately half of your story text and try to compile it.
  2. If it works, then uncomment half of the commented section; if it still fails, then put that section back in and comment out half of the remaining never-commented text.
    • Note that if you get a Problem compiling instead, that means you’ve commented out the wrong pattern of code and you should try to tweak your comments until it either compiles properly or reproduces the same compiler crash that you’re trying to locate.
  3. Repeat (such that you’re commenting out smaller blocks each time) until you’ve narrowed it down to the smallest section you can find that causes it to choke. You can now try to figure out why, or how to rephrase it.

This can be a bit tricky to do when the code is intertwined (as Inform code in particular often is) so you may need to do it not quite on location within your source but on hierarchy – for example you’ll probably need to keep action and property definitions commented in most of the time, but you should be able to comment out most of your locations independently from each other (with perhaps just a little extra commenting on the map connections joining them).

2 Likes

Darn! Of course that makes sense. It’s just no fun.

But thank you, Gavin.

1 Like

Just in case anyone stumbles across this and is looking for more info: the rule that needed to be rewritten turned out to be:

Instead of going inside when the player is in OutsideBar, try going north.

Rewriting this on two lines, using a colon instead of a comma, solved the problem. The problem originally occurred when I rewrote definitions for a subclass of the door type. The door that’s north of OutsideBar is not of the type whose rules were being rewritten.

I cannot imagine how I could have possibly found that without taking Gavin’s suggestion and bisecting. Thanks again, Gavin!

2 Likes

You should actually be able to write that in the shorter format:

Instead of going inside in OutsideBar, try going north.

Does that evoke the same crash?

1 Like

It doesn’t. But I’ve cleaned up a bunch of things this evening, and I can no longer reproduce the original crash, either.