Report a bug of R2017a on MacBook Pro 2016, java.lang.reflect.InvocationTargetException
이전 댓글 표시
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
Meixu Chen
2017년 6월 29일
I found the same bug and I also think it's the Chinese input method bug.
shilei su
2017년 7월 22일
the same to you
Donglei Zhang
2017년 9월 18일
the same to you
Jianqiu Wu
2017년 10월 21일
Same!
haidi zhu
2017년 12월 16일
the same to you
답변 (1개)
Swathik Kurella Janardhan
2017년 4월 19일
1 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 环境和设置에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!