Report a bug of R2017a on MacBook Pro 2016, java.lang.reflect.InvocationTargetException
Afficher commentaires plus anciens
Hi, I use MacBook Pro 2016 with Japanese Keyboard Layout.
I have installed MATLAB R2017a on macOS Sierra 10.12.4.


Following red error messages will appear in Command Window sometimes.
java.lang.reflect.InvocationTargetException
at sun.lwawt.macosx.LWCToolkit.invokeAndWait(LWCToolkit.java:572)
at sun.lwawt.macosx.CInputMethod.attributedSubstringFromRange(CInputMethod.java:586)
Caused by: java.lang.IllegalArgumentException: Invalid range
at javax.swing.text.JTextComponent$InputMethodRequestsHandler.getCommittedText(JTextComponent.java:4595)
at sun.awt.im.InputMethodContext.getCommittedText(InputMethodContext.java:302)
at sun.lwawt.macosx.CInputMethod$3.run(CInputMethod.java:598)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:302)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:699)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:713)
at java.awt.EventQueue$4.run(EventQueue.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:710)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
There was a thread reported this bug. She gave a method to solve the problem, but I think she haven't solved the problem because I tried her method and it doesn't work well.
I think I find something useful for fixing the bug.
This bug was caused by Chinese Input Method. I installed Chinese Input Method into a MacBook Pro (2016) with Japanese Keyboard Layout. After running a script, if I clicked command window immediately under Chinese Input Method, the error messages will appear.
Temporary Solution:
After running a script, before clicking the command window,
change your input method to any other input methods if your current method is Chinese;
or click one of the other window blocks first, such as workspace.
I hope this bug can be fixed as soon as possible.
Thank you.
5 commentaires
Meixu Chen
le 29 Juin 2017
I found the same bug and I also think it's the Chinese input method bug.
shilei su
le 22 Juil 2017
the same to you
Donglei Zhang
le 18 Sep 2017
the same to you
Jianqiu Wu
le 21 Oct 2017
Same!
haidi zhu
le 16 Déc 2017
the same to you
Réponses (1)
Swathik Kurella Janardhan
le 19 Avr 2017
1 vote
Thank you for reporting this error. I forwarded this information to my development team for further investigation. Starting MATLAB with admin privileges can resolve these errors.
Catégories
En savoir plus sur 环境和设置 dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!