Forum / Bugs/Issues / Caboom exception!

So I've just tried to spawn a soldier in debug mode ("Compute match synchronously" or something like that) and got this:

[java] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
[java] at battlecode.world.GameWorld.getAllSignals(GameWorld.java:557)
[java] at battlecode.server.Match.alter(Match.java:110)
[java] at battlecode.server.Server.update(Server.java:157)
[java] at java.util.Observable.notifyObservers(Unknown Source)
[java] at battlecode.client.LocalProxy$Notifier.notify(LocalProxy.java:23)
[java] at battlecode.client.LocalProxy.writeSignal(LocalProxy.java:76)
[java] at battlecode.client.viewer.DebugState.doPopupAction(DebugState.java:147)
[java] at battlecode.client.viewer.DebugState.access$000(DebugState.java:14)
[java] at battlecode.client.viewer.DebugState$MenuListener.actionPerformed(DebugState.java:24)
[java] at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
[java] at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
[java] at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
[java] at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
[java] at javax.swing.AbstractButton.doClick(Unknown Source)
[java] at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
[java] at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
[java] at java.awt.Component.processMouseEvent(Unknown Source)
[java] at javax.swing.JComponent.processMouseEvent(Unknown Source)
[java] at java.awt.Component.processEvent(Unknown Source)
[java] at java.awt.Container.processEvent(Unknown Source)
[java] at java.awt.Component.dispatchEventImpl(Unknown Source)
[java] at java.awt.Container.dispatchEventImpl(Unknown Source)
[java] at java.awt.Component.dispatchEvent(Unknown Source)
[java] at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
[java] at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
[java] at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
[java] at java.awt.Container.dispatchEventImpl(Unknown Source)
[java] at java.awt.Window.dispatchEventImpl(Unknown Source)
[java] at java.awt.Component.dispatchEvent(Unknown Source)
[java] at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
[java] at java.awt.EventQueue.access$200(Unknown Source)
[java] at java.awt.EventQueue$3.run(Unknown Source)
[java] at java.awt.EventQueue$3.run(Unknown Source)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
[java] at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
[java] at java.awt.EventQueue$4.run(Unknown Source)
[java] at java.awt.EventQueue$4.run(Unknown Source)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
[java] at java.awt.EventQueue.dispatchEvent(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[java] at java.awt.EventDispatchThread.run(Unknown Source)
[java] Exception in thread "Thread-25" java.lang.NullPointerException
[java] at battlecode.client.viewer.AbstractDrawState.visitBroadcastSignal(AbstractDrawState.java:271)
[java] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at battlecode.engine.signal.AutoSignalHandler.visitSignal(AutoSignalHandler.java:76)
[java] at battlecode.engine.signal.Signal.accept(Signal.java:10)
[java] at battlecode.client.viewer.GameState.apply(GameState.java:13)
[java] at battlecode.client.viewer.GameStateTimeline.applyDelta(GameStateTimeline.java:118)
[java] at battlecode.client.viewer.GameStateTimeline.createKeyFrames(GameStateTimeline.java:78)
[java] at battlecode.client.viewer.GameStateTimeline$1$1.run(GameStateTimeline.java:41)

I think I managed to find out what causes the problem and made a pull request:
https://github.com/battlecode/battlecode-server/pull/11

Awesome, thanks! We'll take a look soon.

Post a reply