Hugo compiler bug

If I try to compile the following source with Hugo on Mac:


The compiler crashes with a segmentation fault after showing the correct error message. If I include the Hugo library it gets stuck apparently in an infinite loop.

Can someone confirm that this happens to them too? Or even better, figure out where the problem is in the compiler?

Yep. Confirmed. These are two unrelated bugs. Your example code triggers both.

I just pushed fixes for them. Some testing on bigger Hugo source code would be welcome in order to check that they don’t break anything.

1 Like

Wait, the entirety of the file to be compiled is just the word routine twice?


Ok. For future Hugo historians - if I try to compile the file that Juhana noted for Windows, I get:

Error: Illegal routine declarations

If I try it using the Mac/Unix compiler before RealNC’s fix, I get the above statement AND an additional statement, which is: “Segmentation fault (core dumped)”.

I’ll use the updated compiler for Mac and Unix going forward. Thanks RealNC!

I tried the new version and it worked correctly. Thanks for the quick fix!

The IF Wiki page for Hugo has separate locations for the Mac and Unix version of the compiler. I’ll:

  1. Correct that
  2. Compile it and change the download link for a compiled version
  3. Upload the compiled version to the IF Archive

The Hugo page for IF Wiki is ok, but I still think probably overwhelming to anyone new trying to make a new Hugo game. (I can say that because I wrote most of the page; not a shot at anyone else’s work but my own.)

For macOS, you can point people to homebrew:

Outstanding. I said in a different thread that it has never been easier to make and play Hugo games. But now it is easier than it was before!