MapTool hangs when using HTML5 with CJK input sources on macOS
Describe the bug MapTool suddenly hanged up when using HTML5 features with Japanese input sources (and other CJK input sources) on macOS.
To Reproduce Steps to reproduce the behavior:
- Open
System Preferenceson macOS. - Launch
Keyboardcontained theSystem Preferences. - Choose
Input Sourcetab within theKeyboard. - Add
Japaneselanguage. - Check the
Show Input menu in menu bar(Probably, it is default). - Run MapTool. And run a macro using
frame5with button ([frame5('test'):{<button>Push</button>}]). - Select
Hiragana,KatakanaorRomajiwithin input source in menubar at macOS. It can select when click flag of U.S. in menu bar. - Click the button some times (probably up to ten times).
- MapTool hanged with getting the Spinning Wheel.


MapTool Info
- Version: 1.8.4 and 1.9.0-beta.2
- Install: New
Desktop (please complete the following information):
- OS: macOS
- Version 10.15 (Catalina)
Additional context
- Using
dialog5()andoverlay()also got same result. - Not only clicking button, MapTool suddenly hanged when dragging frames (probably does not hang with dragging dialog), entering input text, or clicking empty area on frame or dialog.
- My mac is Japanese environment. I changed language and region preferences to English for this examination. So I am not sure that getting same behaviors as real English environment.
- This problem also appeared with other input sources, such as Chinese and Korean. (I did not try it with other input sources.)
Was there any info in the log file?
@Phergus Thanks for reply.
I found a log file named maptool.log in ~/.maptoo-rptools/logs.
Is it that? Or is it in other location?
This contained bellow:
2021-05-23 19:16:01.183 INFO net.rptools.maptool.client.MapTool - ********************************************************************************
2021-05-23 19:16:01.407 INFO net.rptools.maptool.client.MapTool - ** **
2021-05-23 19:16:01.408 INFO net.rptools.maptool.client.MapTool - ** MapTool Started! **
2021-05-23 19:16:01.409 INFO net.rptools.maptool.client.MapTool - ** **
2021-05-23 19:16:01.409 INFO net.rptools.maptool.client.MapTool - ********************************************************************************
2021-05-23 19:16:01.410 INFO net.rptools.maptool.client.MapTool - AppHome System Property: /Users/fowz/.maptool-rptools/logs
2021-05-23 19:16:01.410 INFO net.rptools.maptool.client.MapTool - Logging to: /Users/fowz/.maptool-rptools/logs/maptool.log
2021-05-23 19:16:01.411 INFO net.rptools.maptool.client.MapTool - getting MapTool version from manifest: 1.9.0-beta.2
2021-05-23 19:16:01.411 INFO net.rptools.maptool.client.MapTool - getting MapTool vendor from manifest: RPTools
2021-05-23 19:16:01.510 INFO net.rptools.maptool.client.MapTool - argument passed via command line: -v=1.9.0
2021-05-23 19:16:01.511 INFO net.rptools.maptool.client.MapTool - overriding MapTool version from command line to: 1.9.0
2021-05-23 19:16:01.511 INFO net.rptools.maptool.client.MapTool - MapTool vendor: RPTools
2021-05-23 19:16:03.101 INFO net.rptools.maptool.client.AppSetup - Installing ui theme: /Users/fowz/.maptool-rptools/themes/ui/Default.theme
2021-05-23 19:16:03.103 INFO net.rptools.maptool.client.AppSetup - Installing ui theme: /Users/fowz/.maptool-rptools/themes/ui/RT_Default_Dark.theme
2021-05-23 19:16:03.104 INFO net.rptools.maptool.client.AppSetup - Installing ui theme: /Users/fowz/.maptool-rptools/themes/ui/MT_Flat_Green_Sans_13.theme
2021-05-23 19:16:03.105 INFO net.rptools.maptool.client.AppSetup - Installing ui theme: /Users/fowz/.maptool-rptools/themes/ui/RT_Flat_Default_Green.theme
2021-05-23 19:16:03.106 INFO net.rptools.maptool.client.AppSetup - Installing ui theme: /Users/fowz/.maptool-rptools/themes/ui/TL_Golden_Sans_13.theme
2021-05-23 19:16:03.107 INFO net.rptools.maptool.client.AppSetup - Installing ui theme: /Users/fowz/.maptool-rptools/themes/ui/TL_Forest_Sans_11.theme
2021-05-23 19:16:03.108 INFO net.rptools.maptool.client.AppSetup - Installing ui theme: /Users/fowz/.maptool-rptools/themes/ui/TL_Forest_Sans_13.theme
2021-05-23 19:16:03.109 INFO net.rptools.maptool.client.AppSetup - Installing ui theme: /Users/fowz/.maptool-rptools/themes/ui/TL_Golden_Sans_11.theme
2021-05-23 19:16:03.331 INFO net.rptools.maptool.client.AppUpdate - Implementation-Version from Manifest: 1.9.0-beta.2
2021-05-23 19:16:03.332 INFO net.rptools.maptool.client.AppUpdate - Cleaned version: 1.9.0.2
That's it though no error were reported. Is that after MapTool has locked up?
Yes. I first removed the log file then launched MapTool.
I guess that the link bellow is related to this issue.
https://bugs.openjdk.java.net/browse/JDK-8241709
Using JavaFX Webview via JFXPanel in Swing, the application freezes on the selection of the keyboard layout (input source) such as Japanese in Mac OSX. It works fine with other keyboard layouts such as US international.
If MapTool uses Swing and WebView, I look like two are very similar.
That is how MT is using JFX so it is likely the source of the issue. The issue you reference points out that it is a duplicate of https://bugs.openjdk.java.net/browse/JDK-8221261 which is scheduled for a Java 17 fix.
Thank you for the information. I understood. I will wait to use HTML5 macros untill MapTool include Java 17.
@fw Does this problem still occur with newer versions of MapTool?