Page 1 of 1

A story about SVN logging

Posted: Thu Nov 26, 2009 1:06 am
by beni
So the other day I was compiling a program with GCC4.4 and because the code was written for Windows it had a lot of errors. So while debugging and trying to find a solution for all those little sloppy inaccuracies, I stumbled upon a very curious error:

Code: Select all

error: jump to label ‘exit’
The concerning line in code said just:

Code: Select all

__END__;
Google had only 111 results for exactly that kind of error and as I read further the code it is used in, is exclusively for OpenCV. In other words: only OpenCV and people writing extensions for OpenCV are using this kind of construct, that I stumbled upon.

The first result from Google was a mailing list excerpt. I usually don't like to read those, but what can I do with just 111 results, right? In the mail they talked about a revision in the OpenCV SVN repository, that did not compile on Linux. My error was the same, but they had a more elaborate error message (I later learned, that I should not have compiled with the -Wfatal-errors flag). However I still didn't know what it was all about. The answer to the mail was: "Oh thanks, I fixed it." Or something similar, so that was not really a help. Also, the mail was already 9 months old.

Now luckily the first guy mentioned the SVN revision number, so I had a look at the OpenCV SVN repository and searched for the revision number. They have a similar http thing like Orxonox to browse the repository. To my great delight the revision log for the mentioned commit plus 1 said "fixed errors in GCC" and I quickly found the file and I had a look at the changes. Now that I saw, that they just basically moved around lines of code and since the more elaborate error message was consisting of errors in earlier lines of code, it was kind of easy to find out what I had to do.

Code: Select all

error:   from here
error:   crosses initialization of '...'
...
So after I moved around some lines and declared variables before I later initialized them, I was able to solve that error.

I think the lessons from this story should be this:
  • Discuss errors in the open (open mailing lists).
  • Write good and simple SVN log messages.
  • Have an easy to browse repository.
Not that we don't have this, I don't want to lecture you, but I think this is a beautiful story about the OpenSource community and its strengths.

Re: A story about SVN logging

Posted: Fri Nov 27, 2009 11:12 am
by 1337
Indeed it is. Thank god we almost never have empty svn logs anymore ;)
The log search function in TortoiseSVN is helpful too. It will even search the names of the files changed. It has proved to be useful on many occasions so far.

And yes, even tough tedious to read, I have collected much of my knowledge about things around CMake (libraries, linking, compiling, etc.) and platform dependent stuff through mailing lists. I would almost think that my brain has dedicated an entire area to efficient mailing list processing ^^

I'm curious: __END__ was a macro I suppose?

Re: A story about SVN logging

Posted: Fri Nov 27, 2009 12:35 pm
by greenman
i think if we want to discuss such bugs through a mailinglist in future we should also have an archive of it (there are archives now but they somehow don't work ...)
otherwise the information would just lay around in our mailboxes and vanish after some time ...

Re: A story about SVN logging

Posted: Fri Nov 27, 2009 1:06 pm
by x3n
no, mailing lists suck, dusty leftovers of an ancient culture. no formatting, no thread view, etc.
we rather continue discussing stuff in this forum like civilized people.

Re: A story about SVN logging

Posted: Fri Nov 27, 2009 3:39 pm
by beni
1337 wrote:I'm curious: __END__ was a macro I suppose?
This was a macro indeed. It's used to somehow indicate the end of the implemented function. It's hard to explain, when you didn't understand it yourself. The thing was, that the error wasn't in this line, but that the compiler first noticed the error when it reached that line. Strangely the errors after the one mentioned occurred earlier in the file. Obviously it was an error throw, which would jump at the end of the function. Somehow the compiler didn't like to jump all the way down there, skipping some declarations of variables. That's why I had to declare all variables before any jump to end. Other compilers do not seem to be that picky.

I also like forums. However there you have always those messages:

"I have problem X and Y and my computer says Z." And you think: "Yes, exactly, that's my problem, what's the solution?" and then you scroll down and the same guy says: "Nevermind, figured it out, bye." And you still don't know how to solve it.

Re: A story about SVN logging

Posted: Fri Nov 27, 2009 8:02 pm
by greenman
:D

but i think this problem is the same with mailinglist
i think fabian is right, it's not really neccessary ... i like the commit and ticket mailinglist, but the forum provides a better overview and structure to discuss problems