maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Bug][1.12.0 beta]: Errors consistently occurring when starting a server with campaign file open

Open Pmofmalasia opened this issue 1 year ago • 0 comments

Describe the Bug

On 1.12.0 (both alpha and beta) when starting a server with my campaign file loaded, after a few moments I get errors in the "An unexpected error has occurred." dialog box. On my last attempt on the beta, I got two simultaneous error dialog boxes - errors pasted below. These dialog boxes just persistently reopen when closed, upon interacting with the window again:

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 11 at net.rptools.maptool.client.ui.token.MultipleImageBarTokenOverlay.paintOverlay(MultipleImageBarTokenOverlay.java:82) at net.rptools.maptool.client.ui.token.BarTokenOverlay.paintOverlay(BarTokenOverlay.java:133) at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderTokens(ZoneRenderer.java:3452) at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderTokens(ZoneRenderer.java:2891) at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderZone(ZoneRenderer.java:1278) at net.rptools.maptool.client.ui.zone.ZoneRenderer.paintComponent(ZoneRenderer.java:846) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(Unknown Source) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source) at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source) at java.desktop/javax.swing.RepaintManager.paint(Unknown Source) at java.desktop/javax.swing.JComponent._paintImmediately(Unknown Source) at java.desktop/javax.swing.JComponent.paintImmediately(Unknown Source) at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source) at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source) at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source) at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:54) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.desktop/java.awt.WaitDispatchSupport.enter(Unknown Source) at java.desktop/java.awt.Dialog.show(Unknown Source) at java.desktop/java.awt.Component.show(Unknown Source) at java.desktop/java.awt.Component.setVisible(Unknown Source) at java.desktop/java.awt.Window.setVisible(Unknown Source) at java.desktop/java.awt.Dialog.setVisible(Unknown Source) at net.rptools.maptool.client.swing.MapToolEventQueue.displayPopup(MapToolEventQueue.java:109) at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:73) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Second:

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 11 at net.rptools.maptool.client.ui.token.MultipleImageBarTokenOverlay.paintOverlay(MultipleImageBarTokenOverlay.java:82) at net.rptools.maptool.client.ui.token.BarTokenOverlay.paintOverlay(BarTokenOverlay.java:133) at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderTokens(ZoneRenderer.java:3452) at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderTokens(ZoneRenderer.java:2891) at net.rptools.maptool.client.ui.zone.ZoneRenderer.renderZone(ZoneRenderer.java:1278) at net.rptools.maptool.client.ui.zone.ZoneRenderer.paintComponent(ZoneRenderer.java:846) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintToOffscreen(Unknown Source) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(Unknown Source) at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source) at java.desktop/javax.swing.RepaintManager$PaintManager.paint(Unknown Source) at java.desktop/javax.swing.RepaintManager.paint(Unknown Source) at java.desktop/javax.swing.JComponent._paintImmediately(Unknown Source) at java.desktop/javax.swing.JComponent.paintImmediately(Unknown Source) at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source) at java.desktop/javax.swing.RepaintManager$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source) at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source) at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:54) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

On testing, I have noticed the following:

  • When opened campaign file first, server second, the errors above appear. The server is not listed in the LAN tab for connecting to a server on a separate instance of MT.
  • When opened server first, campaign file second, no errors appear on starting the server. The server appears in the LAN tab, but when joined, the instance of MapTool joining the server gets the errors instead.
  • Server first, second client joining second, campaign file third: The second client can join in successfully without the campaign file loaded. When opening the campaign file, the first client gets no errors on starting the server. The second client does receive errors when loading the server.

Additional note: With the second two permutations above, the client that started the server gets those same errors after disconnecting from the server.

These are all the combinations I can think to test as of right now.

I then found that deleting all of the tokens on the Library map allowed the campaign file to run. Therefore, I removed all tokens that the server could run with. This left me with two tokens preventing the campaign from running, which I have attached in the zipped file. Notably, it still is able to run with the addon loaded in.

To Reproduce

  1. Open campaign file: Testing Server Errors.zip
  2. Attempt to start server
  3. Get errors
  4. Optionally, attempt other permutations outlined above
  5. Reopen campaign file
  6. Delete the tokens on the map
  7. Reattempt to start server, it should work

Expected Behaviour

Not getting errors.

Screenshots

No response

MapTool Info

1.12.0 beta

Desktop

Windows 10

Additional Context

No response

Pmofmalasia avatar Aug 10 '22 02:08 Pmofmalasia