Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Copying table by copyTable() and deleting it spit errors #3913

Closed
fw opened this issue Apr 11, 2023 · 0 comments · Fixed by #3920
Closed

[Bug]: Copying table by copyTable() and deleting it spit errors #3913

fw opened this issue Apr 11, 2023 · 0 comments · Fixed by #3920
Assignees
Labels

Comments

@fw
Copy link

fw commented Apr 11, 2023

Describe the Bug

Calling the copyTable() function, I got the error: java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because "this.visible" is null.
But that duplicating is complete and can be used usually.

After calling the copyTable() twice, and deleting a copied table on the "Tables", the deleting is successful but I got the "Warning" dialog contained below:

java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because "this.visible" is null
	at net.rptools.maptool.model.LookupTable.toDto(LookupTable.java:551)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at net.rptools.maptool.model.CampaignProperties.toDto(CampaignProperties.java:518)
	at net.rptools.maptool.client.ServerCommandClientImpl.updateCampaign(ServerCommandClientImpl.java:101)
	at net.rptools.maptool.client.ui.lookuptable.LookupTablePanel.lambda$initDeleteTableButton$3(LookupTablePanel.java:209)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.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)

To Reproduce

  1. Add tables by "Add Default Tables" from the menubar.
  2. Run the macro [h: copyTable("D20", "X")] at the chat.
  3. Getting error message below.

java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because "this.visible" is null error executing expression copyTable("D20", "X").
Error trace : chat

  1. Then, run the macro [h: copyTable("D10", "Y")].
  2. Delete the duplicated table "Y" at the "Tables" UI (using the ⛔ button).
  3. Getting the "Warning" dialog.

Expected Behaviour

Getting no error.

Screenshots

No response

MapTool Info

1.12.2, 1.13.0-beta.1

Desktop

Windows 10 Pro

Additional Context

  • Deleting another copied table is successful without errors.
  • Using the macro function deleteTable at the deleting action, also spit similar errors to the chat window: java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because "this.visible" is null error executing expression deleteTable("X")..

In another story, after creating a table by createTable and copying by copyTable, deleting the former table show a "Warning" dialog.

  1. Run the macro [h: createTable("X",1,1)][h: copyTable("X","Y")] at the chat.
  2. Deleting "X" table (not "Y") at the "Tables" UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants