A demonstration of why horrendous error messages can destroy usability

At the unfortunate risk of reopening a poisonous argument, I just wanted to relate an experience I had just earlier today to emphasize a point that I and others tried to make a couple of weeks ago. For the last couple of days I have been trying to get Digikam to compile on my machine using MacPorts. Getting software written for Linux to compile on OSX is always a bit of a black art, so I wasn't surprised when I started running into hurdles. The first problem that I ran into was that I had set Python 3.1 to be my default rather than Python 2.7, which screwed up the libplist CMake configuration script; fortunately, although I had to scratch my head for a few minutes, it was clear roughly where the error was taking place and that gave me enough information to eventually figure out where the problem was. I also went ahead and filed a bug report to MacPorts to let them know about this problem. After that it was smooth sailing until I got to the final package, Digikam itself. Unfortunately, it refuses to build. Why is that? For reasons that apparently took an overwhelming *56 kilobytes of error message* to explain. (See attached, if you dare. ) Now, you could argue that this is the fault of the compiler for not being more helpful, the fault of Digikam for using deprecated methods, the fault of MacPorts for creating a bad environment for configuration, or whatever else you want. You could also argue that were I familiar with Boost and/or the Digikam codebase then the implication of this message would be obvious --- heck, maybe it even *is* obvious to many of the people here. All of this is beside the point, though. I am not an expert in any of these codebases and I really don't care whether it is ultimately the fault of Boost, Digikam, Qt, MacPorts, or the compiler for producing such horrendous error messages. All that matters to me is that these pages of error messages are so overwhelming that they make it very difficult for me to get any sense at all of what kind of thing is going wrong so that I can track down what needs to be done to fix it. Furthermore, the error message is such a mess that it is hard for me to even *motivate* myself to *want* to go through it to figure out where is going on, and seeing the impact that this kind of thing can have on end users really turns me off a bit from the idea of continuing to use Boost libraries in my projects in the future. That is to say, I had heard people in the past say that they actively avoid Boost (and sometimes even C++) because of the way they introduced nasty complexities (like horrible error messages), and I used to (politely :-) ) scoff at them because I figured that they were overstating the problems in practice. Now however, having experienced these problems from the viewpoint of a casual user who just wants to get some darn code to compile so that I can run a program I wanted to try out, I can really appreciate their point. To be perfectly clear, I am not saying that this has made me never want to use Boost again, for I really hate rolling out my own code to solve a problem when somebody else has already developed and tested a solution for me. :-) My point is exactly and *only* the following: horrendous error messages are a *big deal* with a *serious impact* on usability not only for the developers using a library, but for end-users who want to compiler and use the software being developed. Most people here fortunately already seem to recognize this, but I have been truly shocked to hear so many arguments that horrendous error messages are *not* a serious problem, either because they are someone else's fault, because they only occur when the code is wrong, or --- worst of all --- because it is ultimately the fault of the user for being ignorant or lazy when he or she cannot quickly figure out what the problem causing the message was. So I just wanted to share this anecdote to provide a real-world example where horrendous error messages have added an incredible cost for a relatively technically experienced end-user to actually use a particular piece of software. And once more, I am sorry to bring this tired point up again, it's just that the experience I had today really reminded me just how frustrating these kinds of error messages can be, and the absurdity of denying that this is in any way a problem. I feel very strongly that the ultimate goal of writing software is not merely to push the boundaries of what we can do but to provide people with tools that make their lives easier. Horrendous error messages, even when there is no better design to accomplish a particular task (in C++, at least), are *really bad things* and should *not* be dismissed as something not worth fussing about, *especially* when fault is then placed on the *user* (as in some cases it sadly seemed to be) for being too ignorant or lazy to be willing to go to the trouble to decipher them. I am not claiming to know what the solution is to these kinds of issues, and in many cases there might not even be better solutions given the current design of C++. I was just very concerned to see that in the eyes of many the presence of such error messages are not considered in any way to be a problem (*) with a library, and to hear it claims that if anything users turned off by horrendous messages are simply being lazy by not just sucking them up for the good of the cause. Cheers, Greg (*) And let me be clear that by "problem" here I really do mean "less than ideal circumstance" rather than "flaw", because in many cases these libraries are very elegantly designed codes which are probably close to the optimal solution given the limits imposed by the C++ language.

On 12/11/2011 02:29 PM, Gregory Crosswhite wrote:
Unfortunately, it refuses to build. Why is that? For reasons that apparently took an overwhelming *56 kilobytes of error message* to explain. (See attached, if you dare. )
I'd quite like to see the attached "horrendous" error message, but you didn't attach anything.
My point is exactly and *only* the following: horrendous error messages are a *big deal* with a *serious impact*
Indeed, though knowing how to use your tools correctly can go a long way in lessening that impact. Compilers are very verbose in diagnosing generic errors because sometimes that verbosity is needed. Often it isn't. The most important thing to know is that compilers don't stop at the first error, but usually the first error is the one causing all subsequent errors. So you need to look at the beginning and discard the end. Redirecting stderr to stdout and piping to less is therefore very helpful so that you don't lose the beginning due to short terminal history. With GCC, you can also use the -Wfatal-errors flag to stop at the first error. Then it is important to know that certain compilers such as GCC start with the instantiation stack of the error rather than the error message itself. Again, this is often unnecessary, so just discard it. If you piped to less, simply type "/error" to search for the first error message. This is mostly a compiler problem. Various postprocessors and perl scripts exist to make error messages better. It would be much better if certain flags could be used to tell the compiler what kind of output to generate. In the current state of affairs, it's not even possible to tell GCC to print the full instantiation stack (very verbose, but also very useful in certain cases). Only clang supports it.

On Dec 12, 2011, at 12:15 AM, Mathias Gaunard wrote:
On 12/11/2011 02:29 PM, Gregory Crosswhite wrote:
Unfortunately, it refuses to build. Why is that? For reasons that apparently took an overwhelming *56 kilobytes of error message* to explain. (See attached, if you dare. )
I'd quite like to see the attached "horrendous" error message, but you didn't attach anything.
Hmm, I actually did (I just checked my sent box to confirm this), but somehow it got dropped. I'll try attaching it a text file at the end rather than a ZIP file this time. Cheers, Greg

On Sun, Dec 11, 2011 at 3:51 PM, Gregory Crosswhite <gcrosswhite@gmail.com> wrote:
Hmm, I actually did (I just checked my sent box to confirm this), but somehow it got dropped. I'll try attaching it a text file at the end rather than a ZIP file this time.
Mailing lists don't like attachments. Try pastebin or so. -- Olaf

On 11 December 2011 15:27, Olaf van der Spek <ml@vdspek.org> wrote:
On Sun, Dec 11, 2011 at 3:51 PM, Gregory Crosswhite <gcrosswhite@gmail.com> wrote:
Hmm, I actually did (I just checked my sent box to confirm this), but somehow it got dropped. I'll try attaching it a text file at the end rather than a ZIP file this time.
Mailing lists don't like attachments. Try pastebin or so.
We generally prefer attachments to pastebin because they will be archived better. I've never had any trouble with them. Gregory, it looks like you're using Apple Mail to send them. It might be that the list software doesn't like the way Mail handles attachments (it does an odd inline thing), you might have more luck with gmail's web interface.

On Sun, Dec 11, 2011 at 10:37 AM, Daniel James <dnljms@gmail.com> wrote:
On 11 December 2011 15:27, Olaf van der Spek <ml@vdspek.org> wrote:
On Sun, Dec 11, 2011 at 3:51 PM, Gregory Crosswhite <gcrosswhite@gmail.com> wrote:
Hmm, I actually did (I just checked my sent box to confirm this), but somehow it got dropped. I'll try attaching it a text file at the end rather than a ZIP file this time.
Mailing lists don't like attachments. Try pastebin or so.
We generally prefer attachments to pastebin because they will be archived better. I've never had any trouble with them. Gregory, it looks like you're using Apple Mail to send them. It might be that the list software doesn't like the way Mail handles attachments (it does an odd inline thing), you might have more luck with gmail's web interface.
Also, Boost has a 75K limit on the size of attachments to protect those with slow email connections. As a courtesy, you might do far better to post the 7zipped error message on the web, and just point people to it. --Beman

On 11 December 2011 14:51, Gregory Crosswhite <gcrosswhite@gmail.com> wrote:
On Dec 12, 2011, at 12:15 AM, Mathias Gaunard wrote:
On 12/11/2011 02:29 PM, Gregory Crosswhite wrote:
Unfortunately, it refuses to build. Why is that? For reasons that apparently took an overwhelming *56 kilobytes of error message* to explain. (See attached, if you dare. )
I'd quite like to see the attached "horrendous" error message, but you didn't attach anything.
Hmm, I actually did (I just checked my sent box to confirm this), but somehow it got dropped. I'll try attaching it a text file at the end rather than a ZIP file this time.
Could it be this issue: https://bugs.kde.org/show_bug.cgi?id=287772 There's an error message attached to the bug report (also note the comment there). Can you try building with 1.47 to see if that fixes this?

Thank you to the many people who graciously offered feedback to my original message! :-) On Dec 12, 2011, at 12:15 AM, Mathias Gaunard wrote:
On 12/11/2011 02:29 PM, Gregory Crosswhite wrote:
Unfortunately, it refuses to build. Why is that? For reasons that apparently took an overwhelming *56 kilobytes of error message* to explain. (See attached, if you dare. )
I'd quite like to see the attached "horrendous" error message, but you didn't attach anything.
My point is exactly and *only* the following: horrendous error messages are a *big deal* with a *serious impact*
Indeed, though knowing how to use your tools correctly can go a long way in lessening that impact. [...]
I agree with everything you say here and I truly appreciate and have noted your advice on how to better distill useful information from error messages; perhaps someday when I am procrastinating from working on something else I will take a second shot at figuring out where the problem is. :-) However, my point still remains: I just wanted to get a piece of software I wanted to run to compile so I could try it out. I am sufficiently technologically experienced that I am able and willing to put out a certain level of effort to fix bugs that I ran into, and the error message was so overwhelming as to raise beyond that level. On Dec 12, 2011, at 1:27 AM, Olaf van der Spek wrote:
Mailing lists don't like attachments. Try pastebin or so.
Thank you! That idea had not occurred to me but in retrospect it was the obvious solution. The pastebin is here: http://pastebin.com/TRkJwuER (Expiration has been set to one month so that I am not polluting their servers indefinitely. :-) ) On Dec 12, 2011, at 1:35 AM, Daniel James wrote:
Could it be this issue:
https://bugs.kde.org/show_bug.cgi?id=287772
There's an error message attached to the bug report (also note the comment there).
It could very well be.
Can you try building with 1.47 to see if that fixes this?
Unfortunately, MacPorts (unlike systems such as Gentoo) doesn't seem to let you pick which version of Boost you are using trying to compile digikam with Boost 1.47 is non-trivial since I would first have to potentially recompile every other package that depended on Boost 1.48 to make sure that something didn't break. One possibility I could consider would be to create a new local environment for MacPorts and then to build everything from scratch there, making sure that it pulled in Boost 1.47; in fact, if that is not too much trouble, I might just go ahead and play with that since one the process has been started it doesn't require too much intervention on my part, and honestly for the last couple weeks I have (very frustrating) been too sick to get real work done anyway. (I also ran into problems simply downloading the digikam sources and getting them successfully to configure.) On Dec 12, 2011, at 7:37 AM, Beman Dawes wrote:
Also, Boost has a 75K limit on the size of attachments to protect those with slow email connections. As a courtesy, you might do far better to post the 7zipped error message on the web, and just point people to it.
--Beman
Yes, I definitely see now that posting it elsewhere is the way to go, though it is worth noting that after compression the file was only ~ 4kb. Thanks again everyone! Greg

On 12/12/2011 10:10 AM, Gregory Crosswhite wrote:
The pastebin is here: http://pastebin.com/TRkJwuER
(Expiration has been set to one month so that I am not polluting their servers indefinitely. :-) )
The message says the error is in imagehistorygraph_boost.h at line 1418. There is no overload that matches the arguments given to the "target" function. (edge_desc_impl, reverse_graph<adjacency_list>) It could be that those arguments are incorrect or that the header that declares that overload wasn't included. It could also be that these overload was removed in a newer version of Boost. I'm not familiar with Boost.Graph, but I couldn't find among the overloads of target which one it was supposed to call.
participants (5)
-
Beman Dawes
-
Daniel James
-
Gregory Crosswhite
-
Mathias Gaunard
-
Olaf van der Spek