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]: Hero Lab token drag and drop from Library window onto map appears to be broken #3274

Closed
adventuremagic123 opened this issue Dec 12, 2021 · 10 comments · Fixed by #3285
Closed
Assignees
Labels
bug tested This issue has been QA tested by someone other than the developer.

Comments

@adventuremagic123
Copy link

adventuremagic123 commented Dec 12, 2021

Describe the Bug

Drag and drop a token from a Hero Lab POR file for a PF1e token causes the following exception:

error message

To Reproduce

  1. Use File menu "Add Resource to Library" feature to add the attached "Barmaid.por" file (below) to the library.

Barmaid.zip

  1. From the Library window, drag the "Barmaid" token to the map.

  2. You'll get an unexpected exception with the message shown in the "Describe the Bug" attachment.

Expected Behaviour

The token should appear on the map without any error messages.

Screenshots

No response

MapTool Info

MapTool 1.11.4

Desktop

Windows 10

Additional Context

I use this feature all the time. It's critical to my campaigns.

@adventuremagic123 adventuremagic123 changed the title [Bug]: Hero Lab token drag and drop from library integration appears to be broken [Bug]: Hero Lab token drag and drop from Library window integration appears to be broken Dec 12, 2021
@adventuremagic123
Copy link
Author

With the same Hero Lab POR file (see attachment above) for the Barmaid.por file, this procedure works in MapTool 1.10.4.

@adventuremagic123 adventuremagic123 changed the title [Bug]: Hero Lab token drag and drop from Library window integration appears to be broken [Bug]: Hero Lab token drag and drop from Library window onto map appears to be broken Dec 13, 2021
@adventuremagic123
Copy link
Author

There might be licensing issues with the Barmaid.zip file, so try this one if you have trouble. It only requires the core rules which comes with the basic PF1e license purchase for Hero Lab. You might have to open and resave the Fred.por file for it to work in the Library window of MapTool.

Fred.zip

@cwisniew
Copy link
Member

There might be licensing issues with the Barmaid.zip file, so try this one if you have trouble. It only requires the core rules which comes with the basic PF1e license purchase for Hero Lab. You might have to open and resave the Fred.por file for it to work in the Library window of MapTool.

Fred.zip

I have never used the functionality before, before I submit a fix do you mind checking the below screen shots to see if thats what you expect from Fred.por?

image

image

image

image

image

@adventuremagic123
Copy link
Author

Yes, I think that's right.

@adventuremagic123
Copy link
Author

I didn't test to see if that character would reproduce the problem. I assumed it would, but perhaps I was too cavalier.

@adventuremagic123
Copy link
Author

A work-around for this problem is to use MapTool 1.10.4 to create tokens from Hero Lab(R) POR files -- and then use those tokens in MapTool 1.11.4, for example.

@adventuremagic123
Copy link
Author

BTW, thank you very much about a thousand times for working on that.

@kwvanderlinde
Copy link
Collaborator

(just for future reference since this is already fixed)

Tokens created via createToken() can have the same problem of having a null sizeMap... except it's more serious because such tokens can also be saved as part of the campaign file. Trying to reopen a campaign with such tokens is impossible due to the deserailization errors.

Considering I just did this to my own campaign today, I'm pretty happy the issue willl be fixed in 1.12.0 😄

@kwvanderlinde
Copy link
Collaborator

The fix for this appears to be working as intended. It currently requires a patch to the protobuf code in PR #3443, but with that change present everything seem to function correctly.

I am seeing one exception in the console the first time I start a server or connect to one:

08:44:40.953 (ImageManager.java:428) [pool-9-thread-1] ERROR - BackgroundImageLoader.run(/home/kenneth/Nextcloud/Personal/RPGs/tools/MapTool/Resource Packs/Ken's Customizations/Fred.por/1/Fred,html, 969a799d95503b2c52b7ea25df7ba258): image not resolved
java.io.IOException: Could not load image /home/kenneth/Nextcloud/Personal/RPGs/tools/MapTool/Resource Packs/Ken's Customizations/Fred.por/1/Fred
	at net.rptools.lib.image.ImageUtil.bytesToImage(ImageUtil.java:316) ~[main/:?]
	at net.rptools.maptool.util.ImageManager$BackgroundImageLoader.run(ImageManager.java:424) [main/:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]

This doesn't seem to do any harm, nor does it really seem related to this issue. Just looks like an "expected" result of the Hero Lab statblock being returned alongside all the image assets when trying to load the token images.

@Phergus
Copy link
Contributor

Phergus commented Jun 14, 2022

Presumably this only happens if the Library pane is pointing at a folder with .por files in it.

@Phergus Phergus added the tested This issue has been QA tested by someone other than the developer. label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug tested This issue has been QA tested by someone other than the developer.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants