Shoot-out: most annoying compiler error message

Today, I ran into a compiler error message which was hopelessly uninformative. Since I am up for something light-hearted, I thought I might as well just ask if anyone remembers his most annoying compiler message. I guess anything goes, well maybe except for the "e345: internal error message" kind of type.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Visual Basic

VB6 sometimes produces the error "Undefined Type", displayed in a message box without providing any context whatsoever (no name for the offending type and no location, not even the name of the source file - it could be anywhere in the project).
As a response you get to click "Ok" and the compilation aborts.

Disclaimer: I don't use VB6 out of personal choice ...

Run-time error '429'

ActiveX can't create object.

But which object, VB?

+1 on that, I used to hate that one.

"Error: not yet implemented"

Thanks, g++!

Notable: GHC's "Expression has type a, expected type a"

Ad majorem dei gloriam

Does that GHC error arise because there are two a's in different scopes?

Excusables

Yes, I believe so; both of the messages I listed are (IMHO) completely fair for a compiler to complain about.

Who's da man?

The scopes problem is a genuine issue, I think. There are ways to denote variables in different scopes (for example, via paths in the source, although that is for value variables not type variables), but that would complicate the message even more. Personally, I think compilers should produce precise and unambiguous messages which are not necessarily in human-readable form; then you can have one external program which processes them and makes it human-readable. That way if, for example, your compiler is being run under an IDE, the IDE could process the information and, in this case, would be able to highlight the two distinct sources of the a's.

Error messages which make you go umph!

... would have been a better title.

Anywayz, here's my own small (ocaml) pearl:

This kind of expression is not allowed as right-hand side of `let rec'.

Fortunately, these days we can google for quick fixes.

From an Overworked Student

Overheard from an overworked student in a C++ course:

Microsoft VC++: Ambigious Error
Student: Oh, I'm ambigious?!!

Least helpful explanation of an error

Way back in the old days, when I was in junior high school, I entertained myself by learning C with my trusty second-hand copy of Turbo C++ 1.0. I hadn't grasped yet that a switch statement could only switch on something of integer value, and so tried something of the following seemingly reasonable (at the time) form:

switch(someString)
{
case "someValue":
{
/* Do something */
break;
}

case "someOtherValue":
{
/* Do something else */
break;
}

default:
{
/* Complain */
break;
}
}

Anyway, what I got out of the compiler was "Non-integral switch expression." Not being immediately able to decode the meaning of this error, I decided to look it up in the manual. Borland's crystal clear explanation of the matter: "The switch expression you have attempted to use is not integral."

Or lack of message?

My greatest moment of aggravation with a compiler was actually due to the absence of an error message.

The C++ standard says "no length limits on names". Borland C++ 3.0 said "the length limit is 255 characters", which was pretty reasonable. But, in fact, the Borland linker had an undocumented limit of 63 characters--and, of course, this was on the munged name. So it was relatively easy (especially if you were using long names and/or nested classes) to hit the 63-character limit.

Now, if the compiler had thrown up an error message when it hit this limit, that would have been OK--a minor irritation, but usually a pretty easy one to work around.

It didn't. It just truncated the munged name to 63 characters.

Now, that's bad enough; but, in practice, the first 63 characters were often unique, so it could have worked. The problem was that, when the compiler called a function with a truncated name, it didn't pass any parameters on the stack.

Mind you, there was no reciprocal bug in the code generation for the function with a truncated name; it was still trying to read the parameters off the stack. If one of these parameters (say, the implicit this) was a pointer, the function then went on to trash memory. Since this was on Windows 3.1, this almost always meant at least a reboot, sometimes a reinstall.

It took me quite a while to figure out what was going on; I wound up having to inspect the generated assembly code. I submitted a bug to Borland, but, oddly enough, I never heard back. ;-)

PL-6 had "interesting" error messages

PL-6, the system programming language of the old Honeywell CP-6 Operating System had a most useful message that would occur from time to time:

"Error found between beginning and end of file."

Fortunately, once you found someone who knew what was wrong, it was fairly easy to fix. But the first time you saw this you weren't too pleased. You usually went chopping code out until you found the offending area and then deduced what was wrong. [BTW, it was an incorrectly called macro without a trailing semicolon, most times]

And, no, the manual was of no use. It just said that your code had errors.

Oz: conditional failed


{Show {fun {$ X X} foo end bar baz}}

The Oz Emulator says:

%**** Error: conditional failed *****************
%**
%** Missing else clause
%**
%** Matching: baz

Not a compiler but...

As VB and ActiveX were already mentioned, and parsers in fact are pretty close in spirit to compilers' lexers...

org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

Cause unidentified, the problem disappeared without changing the input file.

More amusing than annoying, but...

CMUCL once gave me an error something like

Error: 42 is not a number.

This was due to a type-inferencing bug incorrectly deciding that a variable could never be bound to a number at a certain point and that a runtime type-error should be signalled without checking the value.

A Ken Thompson horror

Ken Thompson is known for parsimonious error messages. (The ubiquitous "?" from ed is [in]famous.) He mentioned a (FORTRAN?) compiler once (mercifully never released) that produced only two syntax error messages: JIM and JOE, for "Junk In Middle" and "Junk Off End".

APL

APL\360 occasionally produced "nonce error", which was its abstruse way of saying that what you typed was legal, but the implementation wasn't capable of handling it. If you've seen Duff's Device you might understand why I know this.