sepinf-inc / IPED

IPED Digital Forensic Tool. It is an open source software that can be used to process and analyze digital evidence, often seized at crime scenes by law enforcement or in a corporate investigation by private examiners.
Other
884 stars 209 forks source link

NullPointerExceptions in AppMapPanel class #2121

Closed lfcnassif closed 2 months ago

lfcnassif commented 3 months ago

While testing #1613, I just saw exceptions like this in the analysis log:

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
    at iped.geo.impl.AppMapPanel.hasItem(AppMapPanel.java:571)
    at iped.geo.impl.MapViewer.applyCheckedItems(MapViewer.java:174)
    at iped.geo.impl.AppMapPanel.update(AppMapPanel.java:365)
    at iped.geo.impl.MapViewer$1.run(MapViewer.java:95)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

Not sure if it affects just master or also 4.1.5.

lfcnassif commented 3 months ago

Another NullPointerException:

java.lang.NullPointerException
    at iped.geo.openstreet.MapCanvasOpenStreet.updateUI(MapCanvasOpenStreet.java:475)
    at iped.geo.openstreet.MapCanvasOpenStreet.update(MapCanvasOpenStreet.java:463)
    at iped.geo.impl.AppMapPanel.update(AppMapPanel.java:366)
    at iped.geo.impl.MapViewer$1.run(MapViewer.java:95)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
wladimirleite commented 2 months ago

I am getting the first exception in some cases here (processed with the master branch).

patrickdalla commented 2 months ago

Another NullPointerException:

java.lang.NullPointerException
  at iped.geo.openstreet.MapCanvasOpenStreet.updateUI(MapCanvasOpenStreet.java:475)
  at iped.geo.openstreet.MapCanvasOpenStreet.update(MapCanvasOpenStreet.java:463)
  at iped.geo.impl.AppMapPanel.update(AppMapPanel.java:366)
  at iped.geo.impl.MapViewer$1.run(MapViewer.java:95)
  at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
  at java.base/java.security.AccessController.doPrivileged(Native Method)
  at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
  at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
  at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
  at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
  at java.base/java.lang.Thread.run(Unknown Source)

@lfcnassif Did the above exception occur in master branch? It seems to refers to a line (475) that would never be reached in case of NullException as the unique object variable referenced is also referenced in the line just before.

lfcnassif commented 2 months ago

@lfcnassif Did the above exception occur in master branch? It seems to refers to a line (475) that would never be reached in case of NullException as the unique object variable referenced is also referenced in the line just before.

I think it did, I should have pointed the commit reference, sorry. If you are not able to reproduce it, I can try in the end of this week.

lfcnassif commented 2 months ago

Another NullPointerException:

java.lang.NullPointerException
    at iped.geo.openstreet.MapCanvasOpenStreet.updateUI(MapCanvasOpenStreet.java:475)
    at iped.geo.openstreet.MapCanvasOpenStreet.update(MapCanvasOpenStreet.java:463)
    at iped.geo.impl.AppMapPanel.update(AppMapPanel.java:366)
    at iped.geo.impl.MapViewer$1.run(MapViewer.java:95)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

@lfcnassif Did the above exception occur in master branch? It seems to refers to a line (475) that would never be reached in case of NullException as the unique object variable referenced is also referenced in the line just before.

Just reproduced the stacktrace above with master commit 5585ade testing with a case without georeferenced items. I'll test the proposed PR.