maptool
maptool copied to clipboard
Starting MapTool with Turkish or Arabic locale settings throws exceptions and then hangs.
Describe the bug The JETA form manager has issues with the ColorPicker XML when certain languages/locales are used which causes the panel to not be created creating other exceptions.
FormManagerUtils.openPackgedForm failed: net/rptools/lib/swing/forms/colorPanel.xml
java.lang.IllegalArgumentException: Invalid unit name 'f?ll'. Must be one of: px, dlu, pt, mm, cm, in
at com.jgoodies.forms.layout.ConstantSize$Unit.valueOf(Unknown Source)
at com.jgoodies.forms.layout.ConstantSize.valueOf(Unknown Source)
at com.jgoodies.forms.layout.FormSpec.decodeAtomicSize(Unknown Source)
at com.jgoodies.forms.layout.FormSpec.parseAndInitSize(Unknown Source)
at com.jgoodies.forms.layout.FormSpec.parseAndInitValues(Unknown Source)
at com.jgoodies.forms.layout.FormSpec.<init>(Unknown Source)
at com.jgoodies.forms.layout.ColumnSpec.<init>(Unknown Source)
at com.jgoodies.forms.layout.ColumnSpec.decodeSpecs(Unknown Source)
at com.jgoodies.forms.layout.FormLayout.<init>(Unknown Source)
at com.jeta.forms.gui.form.GridView.initialize(Unknown Source)
at com.jeta.forms.gui.form.FormComponent.setState(Unknown Source)
at com.jeta.forms.gui.formmgr.FormManagerUtils.openPackagedForm(Unknown Source)
at com.jeta.forms.components.panel.FormPanel.<init>(Unknown Source)
at net.rptools.lib.swing.ColorPicker.<init>(ColorPicker.java:96)
...
To Reproduce Steps to reproduce the behavior:
- Start MapTool with a Turkish (or Arabic) language/locale set.
java -Duser.country=tr -Duser.language=tr -jar MapTool-1.5.6.jar - Observe exceptions.
- MapTool is hung up at splash screen.
Expected behavior Expect MapTool to start without exceptions.
MapTool Info
- Version: 1.4.0.5, 1.5.1, 1.5.6, 1.5.7-beta2
- Install: New
Desktop (please complete the following information):
- OS: Windows
- Version: 10
Other
Also fails with Arabic:
java -Duser.country=SA -Duser.language=ar -jar MapTool-1.5.7-beta.2.jar
Works with Serbian, Norwegian, Spanish.
Does it matter if the OS locale is changed versus changing it in MT? I wouldn’t expect so, but...
I didn’t realize it had gotten this bad. 🙁 Something to look at.
Dunno. Feel free to change your locale to Turkish and try. ;)
NPE also reported by user.

Do we need to default MT to English if their local isn't one of the ones we translate? Or default the user Lang to English when installed?
@Melek maybe a FAQ write-up for a workaround until fixed?
Checking for Arabic or Turkish language on startup and then forcing English might be the way to go if there isn't an updated Abeille library that fixes this issue.
I may only marginally understand the issue, but I added a Selecting User Language page and added this issue & the workarounds mentioned in Discord under a 'Known Language-related MapTools Errors' subheading.
Checking for Arabic or Turkish language on startup and then forcing English might be the way to go if there isn't an updated Abeille library that fixes this issue.
I think this has been fixed before. Or at least, it sounds suspiciously familiar...
It sounds familiar because there was a discussion of this in Discord a few weeks ago.
I believe any fix would have to have been made inside of com.jeta.forms.gui.formmgr.FormManagerUtils.openPackagedForm.
After that fails, there are multiple places in ColorPicker that are going to throw NPEs.
Could be, but I was thinking of a fix from years ago. Likely in the SVN days.
Many versions later, can this be closed?
After testing on 1.14.3, I'm not seeing this issue. Not too surprised either as we handle forms quite differently now.