[Bug]: NPE when onCampaignLoad creates Lib:Token
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Reproduce the issue using the supplied onCampaignLoad macro, then trace the server-side token creation path reached by createToken and the first-connect handling that produces the NPE. The report names no source files or tests, so locate the relevant code and tests from those entry points; done means the first connection reports a meaningful error for a real failure or no error for a false positive.
Written by the indexing model from the issue text.
Description
Describe the Bug
When you create a library token through onCampaignLoad, you can produce the attached NPE error on the server when the player connects for the first time. Subsequent reconnects do not produce the error. To reproduce a second time you have to delete the Lib:token that was created, and close the MapTool server session, open MapTool, load the campaign, start server, issue should repeat
To Reproduce
On an existing Library token, create an onCampaignLoad macro.
This code:
[h: tokenImage = getTokenImage("",findToken(getMacroLocation()))]
[h: tokenTemplate = json.set("{}",
"name", tokenName,
"tokenImage", tokenImage,
"size","medium",
"layer","token",
"gmName","",
"relativeto", "map",
"x", 0,
"y", 0
)]
[h: tokenID = createToken(tokenTemplate)]
Expected Behaviour
A meaningful error if it is a real failure or "" if it's a false/positive
If true/positive I'd expect it to be somehow mitigated (not exactly sure how yet though)
Screenshots
MapTool Info
v1.18.6
Desktop
Win 11
Additional Context
No response
- Dominant language
- Java
- Stars
- 927
- Forks
- 286
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 94
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RPTools/maptool
-
[Bug]: An initiative list with no current entry logs an error on every changePossibly taken @dwizard0 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
[Maintenance]: Migrate gradle dependency submission to modern alternativePossibly taken @VelpulaGangavardhan claimed this 18 days ago. Opencode-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
RPTools/maptool#6156 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
code-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
Similar issues
-
Cleanup: restore the interrupt flag in AiFailureAnalyzerPossibly taken @Rishankgupta08 claimed this today. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seleniumboot/selenium-boot#258 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
johanhaleby/occurrent#1505 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
FasterXML/jackson-databind#6443 ·
Maintainers usually reply within 1 day
-
Docs: 2 broken linksOpen
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day