[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] [egit-dev] history view null pointer

Lay, Stefan skrev 2012-06-06 09.29:> A suspicious piece of coding is at releaseGenerateHistoryJob on GitHistoryPage:
>
> *if*(job.getState() != Job./NONE/)
>
> job.cancel();
>
> job.release();
>
> The job is released and subsequently the SWTCommitList is disposed although the job.cancel() may not have been effective.
>
> But with https://git.eclipse.org/r/6210 the problem should be solved, too.

Maybe https://git.eclipse.org/r/#/c/6288/ is a better solution. It waits for the job to finish.

-- robin


> *From:*egit-dev-bounces@xxxxxxxxxxx [mailto:egit-dev-bounces@xxxxxxxxxxx] *On Behalf Of *Kevin Sawicki > *Sent:* Freitag, 1. Juni 2012 02:38 > *To:* Markus Duft > *Cc:* egit-dev@xxxxxxxxxxx; jgit-dev@xxxxxxxxxxx > *Subject:* Re: [egit-dev] [jgit-dev] history view null pointer > > I have pushed an EGit fix for this NPE to Gerrit targeting stable-2.0: https://git.eclipse.org/r/6210 > > > Thanks for reporting it, > > Kevin > > On Wed, May 30, 2012 at 5:57 AM, Markus Duft <markus.duft@xxxxxxxxxx <mailto:markus.duft@xxxxxxxxxx>> wrote: > > hey > > i today switched to latest master jgit and egit, and i now have a very well reproducible (occurring every time i switch to the history view now) null pointer exception. the > .log contains: > > seems that for _some_ reason the walker is null in that case... i saw that the method is resetting that field, and immediately thought of multi-threading, so i added a > synchronized to all methods of RevCommitList that set the walker. this may not be "the" fix, but it works better now (i saw no more NPEs). if this indeed is a valid fix (i > doubt that ;)), tell me and i push it. > > 6365 !ENTRY org.eclipse.core.jobs <http://org.eclipse.core.jobs> 4 2 2012-05-30 14:45:33.743 > 6366 !MESSAGE An internal error occurred during: "Reading history from Git repository 'wamas5'". > 6367 !STACK 0 > 6368 java.lang.NullPointerException > 6369 at org.eclipse.jgit.revwalk.RevCommitList.fillTo(RevCommitList.java:331) > 6370 at org.eclipse.egit.ui.internal.history.GenerateHistoryJob.run(GenerateHistoryJob.java:82) > 6371 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) > 6372 > 6373 !ENTRY org.eclipse.core.jobs <http://org.eclipse.core.jobs> 4 2 2012-05-30 14:45:39.533 > 6374 !MESSAGE An internal error occurred during: "Reading history from Git repository 'wamas5'". > 6375 !STACK 0 > 6376 java.lang.NullPointerException > 6377 at org.eclipse.jgit.revwalk.RevCommitList.fillTo(RevCommitList.java:331) > 6378 at org.eclipse.egit.ui.internal.history.GenerateHistoryJob.run(GenerateHistoryJob.java:82) > 6379 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) > > HTH in finding a fix :) > > Regards, > Markus > _______________________________________________ > jgit-dev mailing list > jgit-dev@xxxxxxxxxxx <mailto:jgit-dev@xxxxxxxxxxx> > https://dev.eclipse.org/mailman/listinfo/jgit-dev > > > > _______________________________________________ > egit-dev mailing list > egit-dev@xxxxxxxxxxx > https://dev.eclipse.org/mailman/listinfo/egit-dev >