Report a bug of R2017a on MacBook Pro 2016, java.lang.​reflect.In​vocationTa​rgetExcept​ion

1 回表示 (過去 30 日間)
Jun
Jun 2017 年 4 月 13 日
コメント済み: haidi zhu 2017 年 12 月 16 日
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 件のコメント
haidi zhu
haidi zhu 2017 年 12 月 16 日
the same to you

サインインしてコメントする。

回答 (1 件)

Swathik Kurella Janardhan
Swathik Kurella Janardhan 2017 年 4 月 19 日
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.
  1 件のコメント
Jun
Jun 2017 年 4 月 24 日
Thank you very much.
I tried
sudo open -a matlab_r2017a
,it solved the problem partly, but it haven't solved these errors totally.
Sometimes, following errors message appeared
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)
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)
It seems that the same error message appeared twice each time. And I can not use clc to clean the Command Window under Chinese input method. It seems that using clc under Chinese input method to clean those error messages will make the same error. Under English input method, clc can clean those error message from the Command Window.
Thanks again.
Sincerely,
WU

サインインしてコメントする。

カテゴリ

Help Center および File Exchange编程 についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!