briandealwis / ferret

An Eclipse plugin providing automatic structured information about the local context of the selected program elements.
Other
7 stars 2 forks source link

NPE #45

Open briandealwis opened 7 years ago

briandealwis commented 7 years ago

Noticed the following on my console:

!ENTRY org.eclipse.ui 4 0 2017-03-30 16:42:00.439
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
    at ca.ubc.cs.ferret.Consultancy.submitWork(Consultancy.java:541)
    at ca.ubc.cs.ferret.Consultancy.boost(Consultancy.java:318)
    at ca.ubc.cs.ferret.model.Consultation.boostPriority(Consultation.java:399)
    at ca.ubc.cs.ferret.views.QueriesDossierView.basicPerformQuery(QueriesDossierView.java:1169)
    at ca.ubc.cs.ferret.views.QueriesDossierView.performQuery(QueriesDossierView.java:1145)
    at ca.ubc.cs.ferret.views.QueriesDossierView$30.run(QueriesDossierView.java:1476)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4033)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3700)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1146)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1035)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:145)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
briandealwis commented 7 years ago

I suspect this is the following line:

if(top.compareTo(activeWork) < 0) {     // is top-most higher priority than active?
      activeWork.cancel();                         // if so, cancel active
       if(isAwaited(activeWork.getConsultation())) {
            outstandingConsultations.offer(activeWork);     // ensure outstanding is eventually completed
       }
       if(isAwaited(activeWork.getConsultation())) {

and activeWork is being modified outside of synchronization.