1

我们目前在 RinSim 上运行仓库 AGV 问题。有时在执行过程中我们会收到以下错误:

Exception in thread "main" java.lang.NullPointerException
at com.github.rinde.rinsim.core.model.road.GraphSpatialRegistry.getConnection(GraphSpatialRegistry.java:133)
at com.github.rinde.rinsim.core.model.road.GraphRoadModelImpl.getConnection(GraphRoadModelImpl.java:478)
at com.github.rinde.rinsim.ui.renderers.AGVRenderer$VehicleUI.update(AGVRenderer.java:294)
at com.github.rinde.rinsim.ui.renderers.AGVRenderer.renderDynamic(AGVRenderer.java:98)
at com.github.rinde.rinsim.ui.SimulationViewer.paintControl(SimulationViewer.java:492)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Composite.WM_PAINT(Unknown Source)
at org.eclipse.swt.widgets.Control.windowProc(Unknown Source)
at org.eclipse.swt.widgets.Canvas.windowProc(Unknown Source)
at org.eclipse.swt.widgets.Display.windowProc(Unknown Source)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at com.github.rinde.rinsim.ui.View.show(View.java:153)
at com.github.rinde.rinsim.core.Simulator.start(Simulator.java:186)
at Environment.run(Environment.java:136)
at Environment.main(Environment.java:61)

这个错误不会在每次执行时发生,更不用说在同一点发生了(我们认为这是正常错误的情况,因为我们RandomGenerator对每个“随机”都使用 a)。我们的代码Viewbuilder

 View.Builder viewBuilder = View.builder()
  .with(WarehouseRenderer.builder()
    .withMargin(VEHICLE_LENGTH))
  .with(AGVRenderer.builder()
    .withDifferentColorsForVehicles())
  .with(PDPModelRenderer.builder().withDestinationLines());
4

1 回答 1

0

从RinSim v4.4.6 开始,此 NPE 已修复。

于 2018-06-11T04:52:36.583 回答