maptool icon indicating copy to clipboard operation
maptool copied to clipboard

Starting MapTool with Turkish or Arabic locale settings throws exceptions and then hangs.

Open Phergus opened this issue 6 years ago • 10 comments

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:

  1. Start MapTool with a Turkish (or Arabic) language/locale set. java -Duser.country=tr -Duser.language=tr -jar MapTool-1.5.6.jar
  2. Observe exceptions.
  3. 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.

Phergus avatar Oct 25 '19 17:10 Phergus

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.

Azhrei avatar Oct 25 '19 18:10 Azhrei

Dunno. Feel free to change your locale to Turkish and try. ;)

Phergus avatar Oct 25 '19 20:10 Phergus

NPE also reported by user. Ek_Acklama_2019-11-11_210634

Phergus avatar Nov 11 '19 21:11 Phergus

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?

JamzTheMan avatar Nov 11 '19 22:11 JamzTheMan

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.

Phergus avatar Nov 11 '19 23:11 Phergus

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.

melek avatar Nov 11 '19 23:11 melek

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...

Azhrei avatar Nov 11 '19 23:11 Azhrei

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.

Phergus avatar Nov 12 '19 00:11 Phergus

Could be, but I was thinking of a fix from years ago. Likely in the SVN days.

Azhrei avatar Nov 12 '19 00:11 Azhrei

Many versions later, can this be closed?

bubblobill avatar Dec 19 '23 15:12 bubblobill

After testing on 1.14.3, I'm not seeing this issue. Not too surprised either as we handle forms quite differently now.

kwvanderlinde avatar Jun 02 '24 04:06 kwvanderlinde