Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [stellation-res] Question about Merging NPE

Hello,

Okay, I see.  Last night, when I first tried this merge, I tried it
with --location postgresql:stellation.  When the client threw the NPE,
I then tried --location remote:localhost:6060:stellation.  In the
latter case, the server threw an NPE.  I didn't look closely enough.
They are, in fact, NPEs in two different places.  The one you fixed
was the one I didn't check just now when testing to see if the fix
worked.  Sorry 'bout that.

So, now that that's straightened out, the change from == to != does
fix the merge when I use --location remote:localhost:6060:stellation.
:) Going through the server works just fine now.

The other NPE is still there and shows up when using --location
postgresql:stellation.

Jeffrey


On Wed, Dec 25, 2002 at 02:47:30PM +0000, Mark C. Chu-Carroll wrote:
> 
> Grumble grumble... So there's more than one bug in NCA, because that
> thing I find is clearly a bug, and it was the NPE in at least one of
> the stacktraces that you sent me. Once I finish with this wretched
> systems configuration stuff, I'll try to hunt down this other bug.
> 
> 	-Mark
> 
> On Wed, 2002-12-25 at 19:43, Jeffrey Howard wrote:
> > Hello,
> > 
> > I changed the two lines, but unforunately I'm still getting the
> > exception.  It's being thrown from inside the nearestCommonAnswer
> > method below the one which your fix of the == changes.  The signature
> > of the method that's actually throwing the NPE is 
> > 
> > 	public BranchSpec nearestCommonAncestor(
> > 		String projectName,
> > 		BranchSpec leaf,
> > 		BranchSpecSet targetParents)
> > 		throws RepositoryException;
> > 
> > I think the exception is coming about because the call to
> > hc.getAllParents() shown below is returning null.  When nextParents is
> > used in the allParents.addAll call in the next line, that method
> > (BranchSpecSet.addAll) throws an NPE.
> > 
> > 	BranchSpecSet nextParents = hc.getAllParents(parentsIt.next());
> > 	allParents.addAll(nextParents);
> > 
> > Assuming I'm right in thinking that I didn't add any logging
> > statements that would change the line numbers, the
> > allParents.addAll(nextParents) call that's throwing an exception is on
> > line 1832 of the file.
> > 
> > Jeffrey
> > 
> > 
> > 
> > 
> > 
> > On Wed, Dec 25, 2002 at 11:26:10AM +0000, Mark C. Chu-Carroll wrote:
> > > Argh. I just took one look at the code, and it's an astonishingly stupid
> > > error. Downright idiotic to be truthful.
> > > 
> > > The code reads:
> > > 
> > > if (leafParents == null && leafParents.contains(target)) {
> > > 	return target;
> > > }
> > > 
> > > In other words, "if leafParents is null, please crash".
> > > 
> > > That's supposed to be a "!=".
> > > 
> > > I'm about 99% sure that just changing the two "=="s in that
> > > stretch of code to "!="s will fix it. I just did a reinstall of my
> > > system to a newer version of Linux, and I haven't finished rebuilding
> > > my environment, so I need to finish setting things up before I can test
> > > it. At this point, it'll be at least a day before I'm done with all
> > > the setup (I'm not able to work full time right now because I'm home
> > > with my daughter, and I need to fit in little bursts of works whenever
> > > she's occupied with something else. So things that would normally take
> > > only an hour or two of uninterrupted work are taking a lot longer.)
> > > 
> > > I'll make the change and test it as soon as I can. If you're in a hurry,
> > > just try changing the two statements that compare to null, and see what
> > > happens.
> > > 
> > > 	-Mark
> > > 	
> > > 
> > > 
> > > On Wed, 2002-12-25 at 15:59, Jeffrey Howard wrote:
> > > > On Wed, Dec 25, 2002 at 09:57:05AM +0000, Mark C. Chu-Carroll wrote:
> > > > 
> > > > > You've almost certainly found an edge case that my nearestCommonAncestor
> > > > > code doesn't cover. One thing that I'd like, just to make sure, is to
> > > > > see the sequence of commands your using to checkout, branch, checkin
> > > > > changes, and do the merge.
> > > > > 
> > > > > 	-Mark
> > > > 
> > > > Right.  The first time I ran across this, the branches, adds, and
> > > > checkins were all done by the Eclipse client.  I was only using the
> > > > command line client for the merge.  I started over with a new test
> > > > project using only the command line client.  All of these commands
> > > > were given with the options: "--location postgresql:stellation -u
> > > > jhoward -p password"
> > > > 
> > > > svc create testproject
> > > > svc co testproject
> > > > svc fork jhoward-sandbox
> > > > echo testfile > testfile
> > > > svc add testfile
> > > > svc checkin
> > > > svc -r main co testproject
> > > > svc merge jhoward-sandbox
> > > > 
> > > > At the final merge command I get the NPE thrown from within the NCA
> > > > method.
> > > > 
> > > > Jeffrey
> > > > 
> > > > _______________________________________________
> > > > stellation-res mailing list
> > > > stellation-res@xxxxxxxxxxxxxxx
> > > > http://dev.eclipse.org/mailman/listinfo/stellation-res
> > > -- 
> > > Mark Craig Chu-Carroll,  IBM T.J. Watson Research Center  
> > > *** The Stellation project: Advanced SCM for Collaboration
> > > ***		http://www.eclipse.org/stellation
> > > *** Work Email: mcc@xxxxxxxxxxxxxx  ------- Personal Email: markcc@xxxxxxxxxxx
> > > 
> > > 
> > > _______________________________________________
> > > stellation-res mailing list
> > > stellation-res@xxxxxxxxxxxxxxx
> > > http://dev.eclipse.org/mailman/listinfo/stellation-res
> > _______________________________________________
> > stellation-res mailing list
> > stellation-res@xxxxxxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/stellation-res
> -- 
> Mark Craig Chu-Carroll,  IBM T.J. Watson Research Center  
> *** The Stellation project: Advanced SCM for Collaboration
> ***		http://www.eclipse.org/stellation
> *** Work Email: mcc@xxxxxxxxxxxxxx  ------- Personal Email: markcc@xxxxxxxxxxx
> 
> 
> _______________________________________________
> stellation-res mailing list
> stellation-res@xxxxxxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/stellation-res


Back to the top