tom connolly rob liddel scott lucas. © 2008 tom connolly, rob liddel, and scott lucas this...
TRANSCRIPT
Tom ConnollyRob Liddel
Scott Lucas
© 2008 Tom Connolly, Rob Liddel, and Scott LucasThis presentation is Copyrighted by Tom Connolly,
Rob Liddel, and Scott LucasThis presentation is distributed under the Creative
Commons Attribution License 3.0:
http://creativecommons.org/licenses/by/3.0
You are free to Reuse and Remix, provided that you give credit to the authors
Agenda
IntroductionProcessBug DiscussionFirst Impressions of Open SourceConclusion
Introduction
GoalImmerse ourselves in an open source
communityBe able to accomplish something and
contribute in a meaningful wayTo understand the scope of a established open
source project and the difficulty inherent to entering
ProcessDecide on a project Enter the community
Download the source code
Join the mailing listDiscover and discuss
possible bugsSquash the bugsContribute fixes back
to the community
Improve Print() in JavaBug #0007886
C++ version of Print()Starts by printing class name and addressUseful when debugging
Java version of Print()Class name and address are not as useful when
debuggingNeed information about the Java objects
Process
Found and examined the Print() function Upon rereading the description, saw that
a .patch file was supplied and that the problem had already been solved
Learned about .patch filesReviewed .patch changes and confirmed that
the changes were correct
Solution/CommentsSolution Comments
In actuality, the solution was already solved
Nothing additional needed to be done
Bugs that have been fixed need to be marked appropriately
Time would have been better allocated working on a new bug
Consolidate getline functionsBug #0006446
Multiple “my_getline” functions are declared in various .cxx files
Place function in separate file
Process
Located the different my_getline functionsExamine discrepancies between different
versions of the functionCreate the new my_getline functionUpdate existing files and test
Solution/CommentsSolution Comments
Reached by examining various versions of the function
Simple to implement, given that it is already written
Tough to fix existing code
Currently testing the fix
Early identification of issue would have saved time
Fix QVtkWidgetBug #0007065
Uses key presses as intReferences an array of size 256Only checked for non negative valuesPotential for array reference with too large a
number
Process
Found and examined the ascii_to_key_sym() function
Examined array being referencedReplaced logic to check for both upper and
lower boundsTested the changes for expected outcomes
Solution/CommentsSolution Comments
Relatively basic Could have been avoided if initial implementation had been better tested
Shows importance of bounds checking for both upper and lower bounds
Fix Boundary representationBug #0007760
vtkImplicitPlaneRepresentation Edges Property Not Set Important for when a plane intersects with
boundaryBug submission provided a proposed solution
Lack of function understanding led to question of if this would actually work
Required extensive testing that is ongoing
Process
Found and located area of proposed changeExamined structure of related actorsMade proposed changeTested
Solution/CommentsSolution Comments
Implement proposed correction
Test with various scenarios
Difficult to fix a bug if you do not know what you think you are fixing works
Still not assured that the fix works all of the time
Stop vtkVariant CrashesBug #0006851vtkObject* o = NULL;
vtkVariant v(o); // <- crashesAlso a
vtkVariant v(NULL);gives me a compiler warningwarning: passing NULL to non-pointer argument 1 of ‘vtkVariant::vtkVariant(long int)’
ProcessContact the reporter of the bug to request
additional information.Turns out that the reporter abandoned the
approach which led to this bug and took a different route. However he was still interested in a fix.
Locate possible crash locations in vtkVariant.cxx
Implement fixes and testForward results to reporter
Solution/CommentsSolution CommentsThe fix was as simple as
adding a conditional statement which checked to see if the constructor parameter was a null pointer
Unfortunately, the testing files do not directly test the vtkVariant.cxx file, so the bug is not caught by automatic testing
Makes one wonder how often implementations are dropped due to simple mistakes
If subversion is used to save previous testing files, this sort of problem becomes a matter of matching the bug’s report date with the version of the source code. Source control becomes key for large, long term projects
First Impressions of Open Source
Accessing the source code is simple, but fixing foreign code is tough
Lack of experience lowered overall efficiencyThe current design of VTK’s bug tracking is
unfriendly to newcomers
Conclusion
Experience we have gained will increase our efficiency in the future open source projects we work on
Organization and communication are keyStrength in numbers