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

MapTool 1.4.4.0: Edit -> Preferences generates unexpected error #28

Closed
dracwyrm opened this issue Nov 25, 2017 · 8 comments
Closed

MapTool 1.4.4.0: Edit -> Preferences generates unexpected error #28

dracwyrm opened this issue Nov 25, 2017 · 8 comments
Labels
fixed bug fix is committed for next release question

Comments

@dracwyrm
Copy link

I say that the 1.4.4.0 branch had fixes for the adding a new state error that I keep receiving on 1.4.3.20, so I thought I would give it a try. I did gradlew build and it completed without errors. I found in the build/distributions folder a tar file, which I extracted. I changed directory to the extracted dir and ran ./bin/MapTool. The program seems to load alright, but when I go to Edit --> Preferences, I get the following error:

java.lang.UnsatisfiedLinkError: no packager in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at jdk.packager.services.userjvmoptions.LauncherUserJvmOptions.<clinit>(LauncherUserJvmOptions.java:53)
	at jdk.packager.services.UserJvmOptionsService.getUserJVMDefaults(UserJvmOptionsService.java:58)
	at net.rptools.maptool.util.UserJvmPrefs.getJvmOption(UserJvmPrefs.java:60)
	at net.rptools.maptool.client.ui.PreferencesDialog.setInitialState(PreferencesDialog.java:873)
	at net.rptools.maptool.client.ui.PreferencesDialog.<init>(PreferencesDialog.java:294)
	at net.rptools.maptool.client.AppActions$13.execute(AppActions.java:575)
	at net.rptools.maptool.client.AppActions$ClientAction.actionPerformed(AppActions.java:2828)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at de.muntjak.tinylookandfeel.TinyMenuItemUI.doClick(Unknown Source)
	at de.muntjak.tinylookandfeel.TinyMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Component.java:6533)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6298)
	at java.awt.Container.processEvent(Container.java:2237)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2295)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
	at java.awt.Container.dispatchEventImpl(Container.java:2281)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:38)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

The message on the console output seems to repeat the above:
Logging stacktrace to Sentry.IO! :: no packager in java.library.path

What packager is this talking about? A Google search of "no packager in java.library.path" doesn't return anything helpful. Is this a depend that needs to be added to gradle.build so it's bundled with it?

@dracwyrm
Copy link
Author

Relavent info from gather debug information:

==== MapTool Information ====
MapTool Version: DEVELOPMENT
MapTool Home...: /home/user/.maptool
Max mem avail..: 3,556M
Max mem used...: 478,150,656M

==== Java Information ====
Java Vendor.: Oracle Corporation
Java Home...: /opt/oracle-jdk-bin-1.8.0.152/jre
Java Version: 1.8.0_152
Result of executing 'java -version':
............: Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
............: Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)


==== OS Information ====
OS Name........: Linux
OS Version.....: 4.13.7-gentoo
OS Architecture: amd64
PATH...........: /usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0:/usr/x86_64-pc-linux-gnu/aarch64-unknown-linux-gnu/gcc-bin/6.4.0:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/games/bin
Number of Procs: 12

@JamzTheMan JamzTheMan added fixed bug fix is committed for next release question labels Nov 25, 2017
@JamzTheMan
Copy link
Owner

JamzTheMan commented Nov 25, 2017

I now store some preferences (JVM parameters) using the packager class (this is so the native executable can access them before launching the jar).

To run it manually you need the dll/so lib for your OS and add a -Djava.library.path={path} to those files. I've included windows/linux versions here: https://github.com/JamzTheMan/maptool/tree/1.4.4.0/lib

Alternatively, you can simply run the command gradle run which defaults the needed args/jvm options for you in a fresh checkout from github.

Or, you can also run the command gradle deploy which will create a native installer for you and you can install it as normal. (you'll find them in your releases\release-{version}\bundles dir)

I'll close this issue as this is intended behavior, but feel free to reopen if you have further issues.

@dracwyrm
Copy link
Author

dracwyrm commented Nov 25, 2017

doing ./gradlew deploy yields this:

:deploy FAILED
:deploy (Thread[Task worker for ':',5,main]) completed. Took 0.004 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':deploy'.
> A problem occurred starting process 'command 'javapackager''

Also, when I try ./gradlew run, the settings for stack, min and max heap sizes don't save.

@dracwyrm
Copy link
Author

I start MapTools with the script in the bin dir via ./bin/MapTools. It loads and the Preferences Dialog box now opens with your libpackages.so file (is it 32 or 64 bit?).

However, when I enter a value for stack, 128M, the value is saved but it's not used when MT starts. I opened a campaign that made on a previous version that uses Bag of tricks for doors that toggles and Fog of War. No matter what I put in the stack size box, I get the error when trying to toggle the door that I ran out of stack space and that I should increase it.

When I add these arguments to the start options in the script, "-Xms512M" "-Xmx2560M" "-Xss128M", everything works. No longer a stack size error. Why isn't the values being used on start up?

@JamzTheMan
Copy link
Owner

The values are only used if you start from the installed version. The native executable is launching the jvm and using those values. If you launched manually for testing you have to user your own values as you did...

As for deploy, what OS? Search for javapackager as part of Java and it will tell you what you need. I only package for x64 so there libs I provide are for x64.

You also should have Java 1.8 installed to create deploy (151 is latest)

@dracwyrm
Copy link
Author

dracwyrm commented Nov 25, 2017

I use Gentoo Linux. Apparently, they forgot to link in javapackage in /usr/bin. All java files are in a different directory, so I symlinked to /opt/oracle-jdk-bin-1.8.0.152/bin/javapackager and it appears to build.

It created a RPM (is there a way to have it do a tar.gz version that can be extracted?), which I had to extract, but I was able to run it. However, is the text for the tokens on the left side being weird and overlapping normal? https://imgur.com/a/ruYza

Thanks for your help. :)

@JamzTheMan
Copy link
Owner

I've only tested ubuntu and Deb disto. But I went core Java this time so less shenanigans than with jwrapper.

It does also just create a unified jar as well. I will need to put a try catch in the and disable the jvm prefs though if people plan to run without the installed version...

Re the text, no, I've never seen that before. It just uses a system font and nothing special.

@dracwyrm
Copy link
Author

Thanks for all your help. I got the launcher working fine with Gentoo, so that's one more tested platform. The RPM needs to be manually extracted and the files copied to the right folder. The desktop file goes to a different location as well. Nothing an ebuild can't fix.

The new launcher works a heck of a lot better than JWrapper. I had nothing but issues with it on Gentoo and the constant fighting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed bug fix is committed for next release question
Projects
None yet
Development

No branches or pull requests

2 participants