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]: NPE when loading campaign with old macros. #4051

Closed
kwvanderlinde opened this issue May 10, 2023 · 0 comments · Fixed by #4052
Closed

[Bug]: NPE when loading campaign with old macros. #4051

kwvanderlinde opened this issue May 10, 2023 · 0 comments · Fixed by #4052
Assignees
Labels

Comments

@kwvanderlinde
Copy link
Collaborator

Describe the Bug

Once upon time, macros apparently did not have tooltips. Opening a campaign with such a macro causes NPE and prevents the campaign from loading.

To Reproduce

  1. Find an old campaign without tooltips
  2. Open campaign
  3. See the dialog telling you about the NPE.

Expected Behaviour

No NPE should be thrown when loading such a campaign.

Screenshots

No response

MapTool Info

1.13.0, 1.12.2

Desktop

Linux Mint 21

Additional Context

In 1.11.5 and prior, I don't see this issue.

Here's a stacktrace as it is on develop (9fa5c9fa2):

java.lang.NullPointerException: null
	at net.rptools.maptool.server.proto.MacroButtonPropertiesDto$Builder.setToolTip(MacroButtonPropertiesDto.java:2488) ~[main/:?]
	at net.rptools.maptool.model.MacroButtonProperties.toDto(MacroButtonProperties.java:1160) ~[main/:?]
	at net.rptools.maptool.model.Token.lambda$toDto$14(Token.java:3088) ~[main/:?]
	at java.util.HashMap.forEach(HashMap.java:1429) ~[?:?]
	at net.rptools.maptool.model.Token.toDto(Token.java:3088) ~[main/:?]
	at net.rptools.maptool.model.Zone.lambda$toDto$29(Zone.java:2360) ~[main/:?]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
	at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1787) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
	at net.rptools.maptool.model.Zone.toDto(Zone.java:2360) ~[main/:?]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
	at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1921) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
	at net.rptools.maptool.model.Campaign.toDto(Campaign.java:786) ~[main/:?]
	at net.rptools.maptool.client.ServerCommandClientImpl.setCampaign(ServerCommandClientImpl.java:83) ~[main/:?]
	at net.rptools.maptool.client.AppActions$CampaignLoader.done(AppActions.java:2627) ~[main/:?]
	at javax.swing.SwingWorker$5.run(SwingWorker.java:750) ~[?:?]
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:848) ~[?:?]
	at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) ~[?:?]
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:858) ~[?:?]
	at javax.swing.Timer.fireActionPerformed(Timer.java:311) ~[?:?]
	at javax.swing.Timer$DoPostEvent.run(Timer.java:243) ~[?:?]
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) ~[?:?]
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) ~[?:?]
	at java.awt.EventQueue$4.run(EventQueue.java:720) ~[?:?]
	at java.awt.EventQueue$4.run(EventQueue.java:714) ~[?:?]
	at java.security.AccessController.doPrivileged(AccessController.java:400) [?:?]
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) [?:?]
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:742) [?:?]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant