Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

We are using some open source libraries in our projects. Sometimes there are some issues found in some of them (most likely library bugs, but it may also be a wrong usage from our side, especially when sometimes documentation is not exactly 100 % complete). As the libraries are often quite complex, debugging them to pinpoint the source of the problem is sometimes quite hard. Can you help me to summarize what other options are there and how to exactly proceed with them?

I have just recently hit some strange problems when using TCMalloc (Google scalable memory allocator) on Windows, so I would most welcome answers which would apply to this particular library, but more general answers are good as well.

1) Ask the maintainer/owner of the project for assistance. How can this be done?

2) Hire someone to identify and fix the issue. How to do this? How can I find someone with enough expertise in some particular library?

... any other options?

share|improve this question
1  
I would highly recommend option (1), all open source project site has the place for filing defect or try to contact developers through their mailing list. You should be able to get the answer sooner considering if the project is still alive. –  NinjaCoder Jan 27 '11 at 16:06
1  
@NinjaCoder: using a dead project with poor documentation might be a bad decision, activity on the project should be considered when electing it. –  Matthieu M. Jan 27 '11 at 20:01
    
@Matthieu - I completely agree with you. –  NinjaCoder Jan 27 '11 at 20:08
    
Ask the project, not specific people on the project. IE, make a forum comment or equivalent. You don't really need to worry about debugging the code (unless you want to pitch in on the development), you just need to provide a means for the devs to reproduce the bugs. Devs get regular emails updates containing posts from the dev pages. Do a good job of profiling the problem and the devs will find you. Also, don't expect an immediate fix as it will most likely be included in the next release. –  Evan Plaice Jan 28 '11 at 0:49

6 Answers 6

up vote 14 down vote accepted

I usually try the following, in order:

1) Check the mailing list or forums to see whether my bug is new, it's already on the tracker, or is fixed in a newer version/SVN/whatever

2) If the bug isn't known, ask about it in the mailing list. This is when you get told it's a feature, not a bug, and/or RTFM ;)

3) If the bug is indeed a bug and it's new, you can either wait until someone fixes it (you can help by providing additional info, testing or debugging) or fix it yourself and submit a patch

If you need the bug fixed urgently, your best bet is to do steps 2 and 3 together (report the bug and propose a patch). Otherwise your bug may or may not be fixed in a timely manner, depending on whether someone else finds it worth fixing. I guess you can "bribe" the developers or other community members to work on your bug, although I never tried that one.

share|improve this answer
    
+1 for checking the mailing list. I forgot to mention that. –  Matt Ellen Jan 27 '11 at 14:23
    
Also, in step #2 a short test case can really help. (This approach applies equally to non-open source libraries/components/...: the easier you make seeing the bug, the easier to get a fix.) –  Richard Jan 27 '11 at 14:51
    
@Matt: Thanks. To be fair, not every project has an active mailing list or forum behind it. Fortunately, the projects I hacked the most (which isn't too much) are SDL and Ogre, which do have very active communities. –  ggambett Jan 27 '11 at 15:17
5  
You forgot... If you want someone else to look at the bug, present the conditions needed to accurately reproduce the bug. Users who chime in and say 'your code's broke' will get ignored whereas, a responsible user who provides a good profile of what triggered the bug will usually receive help the quickest (as long as there are active maintainers). Fixing a bug that affects a user directly will usually be a top priority. Just, don't discount that the devs time is valuable (and they may already be consumed with their own development on the project). –  Evan Plaice Jan 27 '11 at 17:58

Just because it hasn't been mentioned yet, give "How To Ask Questions The Smart Way" a read. It has lots of invaluable advise on how to approach asking questions and asking for help from a development community. A lot of it boils down to: understand the way the community works and make sure you play by the rules. If you are respectful, ask an intelligent question by providing all the necessary details (and reproduction recipe if it's a possible bug), you will likely get a reasonable response.

share|improve this answer

Write a clean test case, then submit it to the mailing list.

IME more often than not you find an error in your own code while writing the test case.

share|improve this answer

If you have a good idea how to reproduce the bug, then writing a unit test exposing the bug would be a good starting point. (Often, open source projects already have large test suites).

The failing unit test is a good way to communicate the "bug" to the project maintainer. If it is not a bug but simply you who are using it incorrectly, then the maintainer would point out that this is by design, and most often with a reason why.

share|improve this answer
1  
Unfortunatelly the only repro I have so far requires several GBs of data, our application and several hours to run. I will try to reduce this somehow as my first step, as I understand the repro will be crucial to both maintainers or anybody external who might be looking at the issue. –  Suma Jan 27 '11 at 16:44

The most sensible way I have found, when you have an issue with a library and you don't have the skills to find the problem yourself, is to contact the maintainers. They know the code and will be grateful to find out about bugs, if that's what it is, or will point you in the direction of how to use the library correctly.

For example, I had a problem I couldn't solve when I was developing a site that used SVG Web. I don't have any action scripting skills, so I started a thread asking about the issue and I was told to log a bug with a minimal test case, so I did. It turned out the problem was in the browser, so I had to tweek my code slightly.

If you are smart enough to fix it yourself, don't forget to give back what you learned.

share|improve this answer

The great thing about OSS is that you have the source code!

So you can make the fix yourself, or hire someone to do it.

The important thing is to give back to the community and check in your fix!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.