How to start fixing bugs in open source software

debuggingissue-trackingopen source

I'm a student with good knowledge in C programming and like to contribute any open source project which is developed in C. I searched SourceForge and selected 7-Zip because its widely used one and developed using C.

I thought to start first by fixing bugs (which was suggested by many people in their websites) and gone through few bugs but couldn't understand how to respond to them and how to start fixing them. I didn't understand anything.

Could you please explain how to approach this? I have even gone through some files in the source code which I downloaded but didn't understood anything.

Best Answer

Here is one suggestion:
Feature Requests: use "move" instead of "copy" from temp folder - ID: 1615140

Can you change behaviour of 7-zip to use "move" instead of "copy" when 7-zip unzips the files. Issue is with single HDD systems and big files, this will speed up things significantly. WinRAR does it right now.

And I will explain why I pick this bug as example.

Before you decide to pick this project...

  • Are you comfortable with this project's source code?
    • Can you understand both the C code (mainly the core compression algorithms)?
    • And also the C++ code (most of the "application", GUI and command line, and also all interactions with the operating systems)?
    • And also the coding style (typical to Win32 programming; not using MFC/ATL)?
  • Will you invest your time and effort into this Operating System?

First step: can you reproduce the bug?

  • To choose a bug to work on, one needs to be able to reproduce the problem on a similar computer environment.
    • This bug will require you to test on a computer which (1) the temp folder has low free space (1-2 GB), (2) the extraction destination is on same drive as temp folder.
  • How much time needed to "setup" the environment for reproducing it?
    • Choose bugs that are easy to reproduce and easy to fix.
  • Is the bug really a bug?
    • Always try to reproduce it yourself. Don't just rely on other's words.
    • As a software engineer/programmer, see if you can explain the bug's behavior in terms of your understanding. Sometimes users have unrealistic expectations of how software/hardware systems work and make impossible feature requests.
  • How do I confirm my understanding? How do I know if it is copying or moving the file?
    • You'll need diagnostic tools, like Process Monitor. You may also tweak your test machine setup to test different scenarios.

Second step: Can you locate the code responsible for this behavior?

  • A rough overall understanding of the project is needed, according to Larry Coleman's answer.
  • It is best if you have Visual Studio (an integrated development environment and debugger) so that you can set breakpoints and understand the program's flow.

Third step: Make modifications and see how it affects the program's behavior.

Fourth step: Present your changes to your coworkers/peer developers and get feedback.

Related Topic