Open Source Development Lab - 1
Yousef Rabah
Open Source Development Lab - 1
Website: USEF-ONLINE
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FIRST Attempt:
KBear, a graphical ftp client for KDE:
Admin:
- Bjorn Sahlstrom
Url:
http://kbear.sourceforge.net/
Monday,April 7, 2003
First I spent time looking at the introduction, then the features of the
program.
Looked really interesting and I wanted to be part of the project. I
joined the mailing list. Overall 2 hours
Tuesday April 8, 2003
I downloaded the source code, I extracted the tar
ball file into the dirctory. After that I looked at the REDME file, INSTALL
file.In the process I learned many things. I set ./configure to the correct
path using prefix and then compiled the code. The first time it did not work to
erros from my side, but then I complied it correctly. Thereafter I did a make,
then make install. Everything was good till I wanted to run the program. When I
ran the program and it crashed. It seems that the error came from the source's
side because its not a compilation error. I then looked at the bug list wanting
to place a bug but I noticed that someone had already placed one. Overall 4 hours.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The Emilia Pinball Project
Admin:
- Henrik Enqvist
Developers:
- Pedro Ferreira
- Philippe COVAL
URL:
http://sourceforge.net/projects/pinball/
----------------------------------
* Note: There is no mailing list for this project =(
FIRST BUG:
Wednesday 9, 2003
I looked at the introduction, what the program
does. Its a 3D ball game. I thought it would be interesting to see how you
impliment graphics with c++ code. Took 1 hr
I downloaded the source code, I extracted the tar
ball file into the dirctory. After that I looked at the REDME file, INSTALL
file. I set ./configure to the correct path using prefix and then compiled the
code.After compilation I ran the program and it worked. I then started to test
the program and play around with it in order to see where it might crash. I
also looked at the bug list as well. Took 3 hrs
Thursday 10, 2003
I found many bugs. It looks like a mojor issue with the program menu. The
reported bug says that if you in menu, then config, then Audio, then after
the off if you press on the left arrow the program will crash. Before we
attempt to fix this problem specifically when deployment at this point, because
you would want to see if the same error fault occurs in different places. The
idea is that we do not want the program to crash when pressing the left
botton. We want it either to do nothing when left arrow key is pressed or we
want it to give the last option of the same loop that we would have. Took 2 hrs
Friday 11, 2003
First I looked at the Fourm, nothing much was there. I went again to see if
anything new was added to bug list.I went ahead and check out other places
where the program mightcrash, or to be more exact, a segmentation fault occurs. What I found out that there are multiple
places where the program crashes because of the left arrow key botton. If you
were in graphics section of the configure menu. The first thing you have is
View: Standard, which basically means that view is in standard form. Now if you
want to change that you can using the right arrow, but if the view was in
standard and you pressed the left arrow botton the program will give you a
segmentation fault. The same segmentation fault occurs when your also in
graphics, when at screen size: 640*480 if you pressed on the left key botton 3
times the program will crash yet it will not if you use the right arrow key
botton.
Here is another example, if you were in graphics, if you were at Brightness option the first
option is low. If you pressed the left arrow the program would crash, yet if
you pressed on the right key it would give you either Medium, then if you press
again it would give high and again it would bring you back to low. What we then
need is when you press on left key, it would either do nothing or what we can
do is have it give the end option which in this case is high, as if this option
will take you backwards. Overall 4 hrs
Sunday 13, 2003
Looking over and understanding cpp files of the program in order to work on
the bug. Kept doing that most of today. I got to know some of the code. I have
been looking at libraries and cpp files. Overall 4 hrs.
Monday 14, 2003
I was introduced to a great tool today, DDD. With this I have been running
the code. It looks like the left arrow is a problem at different places like I have found while
testing the program and running DDD has showed that in most cases it showed the
same file that was making the error.At this point, it shows me what function is
doing the error, which is strncat () from /lib/i686/libc.so.6 So I will locate the file and then I will start debugging
I am not sure what this means but I think the program DDD has forzen or got
stuck in a loop somehow .. here is what it has been giving me:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 25892)]
0x42080dd0 in strncat () from /lib/i686/libc.so.6
//Until here it was ok. It located the function that caused the segmentation
fault yet after this point when I tried to see different things. It was as if
the program was stuck, all it gave was a Cannot find thread 1024: generic
error. Even when I force quit on the termial, it did yet the program DDD was
still there.
(gdb) Quit
Cannot find thread 1024: generic error
(gdb) list 'strncat () from /lib/i686/libc.so.6'
Function "strncat () from /lib/i686/libc.so.6" not defined.
(gdb) watch strncat () from /lib/i686/libc.so.6
A parse error in expression, near ` /lib/i686/libc.so.6'.
(gdb) graph display strncat () from /lib/i686/libc.so.6
A parse error in expression, near ` /lib/i686/libc.so.6'.
(gdb) graph plot strncat () from /lib/i686/libc.so.6
A parse error in expression, near ` /lib/i686/libc.so.6'.
(gdb) run
Cannot find thread 1024: generic error
(gdb) run
Cannot find thread 1024: generic error
(gdb) quit
Cannot find thread 1024: generic error
(gdb) print strncat () from /lib/i686/libc.so.6
A parse error in expression, near ` /lib/i686/libc.so.6'.
(gdb) list 'strncat () from /lib/i686/libc.so.6'
Function "strncat () from /lib/i686/libc.so.6" not defined.
(gdb) quit
Cannot find thread 1024: generic error
(gdb) quit
//Which as you can see, its not even quiting the programI have opened
DDD another time and hopefully now things will go somewhat smoother.
After a while strncat sounded familiar, and after looking at man strncat
turns that the function is a built in fux so the problem is not neccessarly
from the function as a function. Took 3 hrs
Tuesday April 15, 2003
I've been looking at source code. I tried DDD again and when I looked at
where the program was pointing it was pointing to /lib/i686/libc.so.6 and I
can't find this in my code, the lib directory does not exist and then I
realized that it might be pointing to the built in function strncat(). So I am
at point 0 again. I will now move to looking at the source code and trying to
get something out of DDD. Took 30 min
Thursday April 17, 2003
I located the correct file I need to debug. Understanding the code. I
started debugging. 1 hr
Friday April 18, 2003
Working with the code, compiling usig ./configure -prefix /clients/.. ,
make, make install and then oberving results. 3 hrs
Saturday April 19, 2003
I figured out a new bug. I will still work on the first one and when I am
done I will start with the new one. For the first bug, I have progess and I
have an idea in mind which i will pusdo code for myself then impliment it on
the real code.
When you press the left arrow key in Config setup, as I said earlier would
cuase a segmentation fault.
The program does not crash anymore. What I did is the following:
In basic terms, the concern for the bug was 2 functions. next() and
prev(). When pressing the right key arrow the next() function is called and this
was functioning normally. When you press the left key arrow it gives a
segmentation fault and here the prev() function is called. What I figured was
that the prev() function had --counter but it was not actually going back, so
I added -1 to an if statment as if(soemthing) some_fux()-1 where now it would
actually go back and it does not crash at all. Also this worked for the rest of
the programs, so it worked for everything.
It also worked for the bug that was placed on sourceforge. Take
me there
It took a while to understand the code, but once I did the puzzle started to
make sence and hence I was able to work the bug out. The fix also fixed 4 other
bugs that were apparent due to the same left arrow key. Overall 4 hrs
-----------------------------------------------------------------------------------------------------
Second Bug
Saturday April 19, 2003
The second bug that I found was in the Professor level of the
game. There is only 2 levels. In the Professor level, the score is always 0,
where it does not change at all.
After looking at the cpp files, it seems that the Professor level is
missing alot of code. I am guessing that if I copied and pasted some from the first
level with slight modifications that it would solve the bug and other bugs as
well. Took 2 hrs
Ovserving and understanding bother levels, the Tux and the Professor.
I
started to copy , paste and modify the code but its compliated and needs a lot
of time to do. When you fix and and more then you are actually debugging
more. Like when I started to add to the Professor level. The program gave lots
of errors so it did not compile. So at this point I deleted out most of the
code I did for the Professor level so that the program can compile and work for
theTux level. I am going to find another bug on the main level Tux. Took
3 hrs
Monday April 21, 2003
Looking for another bug. I have been playing the pinball game, trying to
see if it somehow crashes for any reason. Also I have been looked at the bug
list on the sourseforge emilia pinball. Took 3 hrs.
Tuesday April 22, 2003
I have decided to chanllenge myself and work with the professor
level. Build it up slowly, keep testing and work it out. I have made alot of
progress though when compiling it takes a long while, becuse of make and make
install, but usually if there is an error it comes out in the early stages of
running make.
As as I said before, in the Professor level, the score was always 0 all the
time.
I took a huge step FWD when I realized that one part of getting score was
working, where if the ball hits the bumps on the either 2 sides it gets the
score while other places it does not. But now that I have this done I am sure
that I will be able to work the other parts and get the score to work proparly
in the correct manner.I referenced alot from the Tux level mode. I will be done
hopefully by tomorrow. Took 4 hrs
Wednesday April 23, 2003
From yesterday, I have been working more on the code. I was able to get the basic structure
with reference from the Tux level. The score is working in the professor
level. What I did first was that I got the idea from the Tux structure and so
slowky I added the missing parts to the professor level. I added all the
necessary variables needed, then added the signal form the loader and put in
the variables.
After that, I worked on the missing gadgets that were worked on before but were not
finished in the Professor level.Each step I did I made sure I recompiled
everything before I got too much done, becuse it is better to work on small
bugs with less code to debug at a time.I had some problems but things worked
out. I got the basic code done, not all the places take the score, but at least
the score on the pinball program works.
I compiled the code with no problems. I also did make check and
then make install, I also ran the program and it works.Overall 4
------------------------------
During the semester we heard alot about Open Source Software, yet we
never had the chance to work with open source software until this lab. Working on an
assignment like this gave me the opportunity to work with Open Source Software
face-to-face. I have to say that I have learned and interacted with alot with
an Open Source project and that itself made the difference. Its great to know
that you are able to contribute to projects form around the world. Its a great
opportunity as a student to get the feel of actual projects and programs. I
have to admit at first I was a bit confused and worried that I will not be able
to contribute anything but at the same time I was excited and ready to work
with an Open Source project. I have learned a great deal while interacting with the code.
I think that Open Source Software is more reliable, and better software due to
the fact that you have the code in front of you to work with, you have many
people around the world who actually use the code and report/fix bugs that
occur. You know where the source is coming from, you know that most likely
there isn't any backdoor. Its more interactive and more reliable in most cases.
I would interact with Open Source software because I get the chance to
contribute for something that I know might be useful to me as well as
others. Also because I would have the chance to learn and most importantly work
hand in hand with real developers and software.