Open fw opened 1 year ago
I haven't tried to reproduce this yet (I'd have to figure out my system's language support first) but I have noticed there are some concurrency issues in HtmlEditorSplitGui
, particularly the constructor. Two parts to that:
Platform.runLater()
to initialize the JavaFX portions of the UI. But that logic is not guaranteed to complete by the time the constructor finishes, meaning it's possible for other methods to access uninitialized or partially initialized fields (in particular htmEditor
). This probably wouldn't result in a hang, but could result in NPEs or something if the JFX initialization took unusually long for some reason.Platform.runLater()
, we are calling jfxPanel.setScene()
. That should happen on the Swing thread, not the JavaFX thread. This can cause hanging as some Swing components take locks meant only for the Swing thread.We should go through that class and double-check that tasks complete when we expect, and that we respect thread confinement.
Describe the Bug
MapTool hung up when using the HTML WYSIWYG editor in the Notes and GM Notes of token edit dialog with Japanese input sources (and probably other CJK input sources too) on macOS.
To Reproduce
System Preferences
on macOS.Keyboard
contained theSystem Preferences
.Input Source
tab within theKeyboard
.Japanese
language.Show Input menu in the menu bar
(probably, it is the default).Hiragana
,Katakana
orRomaji
within input source in menubar at macOS. It can select when clicking the flag of U.S. in the menu bar.Expected Behaviour
I want to use the rich editor without my Mac locking up.
Screenshots
No response
MapTool Info
1.13.0-beta.1
Desktop
macOS 10.15 (Catalina)
Additional Context
Probably, the cause of this issue is the same as #2635.