A story about SVN logging

This is a place for everything and nothing.

Moderator: PPS-Leaders

Post Reply
User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

A story about SVN logging

Post by beni » Thu Nov 26, 2009 1:06 am

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.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: A story about SVN logging

Post by 1337 » Fri Nov 27, 2009 11:12 am

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?
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
greenman
Baron Vladimir Harkonnen
Posts: 360
Joined: Wed Oct 03, 2007 2:53 pm
Contact:

Re: A story about SVN logging

Post by greenman » Fri Nov 27, 2009 12:35 pm

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 ...
There are only 10 types of people in the world: Those who understand binary, and those who don't.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: A story about SVN logging

Post by x3n » Fri Nov 27, 2009 1:06 pm

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.
Fabian 'x3n' Landau, Orxonox developer

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Re: A story about SVN logging

Post by beni » Fri Nov 27, 2009 3:39 pm

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.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
greenman
Baron Vladimir Harkonnen
Posts: 360
Joined: Wed Oct 03, 2007 2:53 pm
Contact:

Re: A story about SVN logging

Post by greenman » Fri Nov 27, 2009 8:02 pm

: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
There are only 10 types of people in the world: Those who understand binary, and those who don't.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests