Go Down

Topic: Lots of java errors whenever I start typing on Mac (Read 76 times) previous topic - next topic

Hi,

I installed Arduino 1.0.6 on my Mac running Mac OS X10.9.5. I have tried some sample programs on books and there is no running error. However, I noticed that whenever I start to type a program (e.g. vo in void setup() ), I get a bunch of error messages (see below). Anybody knows what is going on and how to fix it?

Thanks



javax.swing.text.BadLocationException: Invalid location
   at javax.swing.text.GapContent.getChars(GapContent.java:169)
   at javax.swing.text.GapContent.getString(GapContent.java:150)
   at javax.swing.text.AbstractDocument.getText(AbstractDocument.java:757)
   at processing.app.syntax.JEditTextArea.getText(JEditTextArea.java:928)
   at processing.app.syntax.im.CompositionTextManager.getCommittedText(CompositionTextManager.java:191)
   at processing.app.syntax.im.InputMethodSupport.getCommittedText(InputMethodSupport.java:49)
   at sun.awt.im.InputMethodContext.getCommittedText(InputMethodContext.java:285)
   at apple.awt.CInputMethod$3.run(CInputMethod.java:569)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
   at apple.awt.CToolkit$CPeerEvent.dispatch(CToolkit.java:1215)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
   at java.awt.EventQueue.access$400(EventQueue.java:82)
   at java.awt.EventQueue$2.run(EventQueue.java:676)
   at java.awt.EventQueue$2.run(EventQueue.java:674)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
java.lang.reflect.InvocationTargetException
   at apple.awt.CToolkit.invokeAndWait(CToolkit.java:1160)
   at apple.awt.CToolkit.invokeAndWait(CToolkit.java:1105)
   at apple.awt.CInputMethod.attributedSubstringFromRange(CInputMethod.java:557)
Caused by: java.lang.NullPointerException
   at java.text.AttributedString.<init>(AttributedString.java:109)
   at processing.app.syntax.im.CompositionTextManager.getCommittedText(CompositionTextManager.java:192)
   at processing.app.syntax.im.InputMethodSupport.getCommittedText(InputMethodSupport.java:49)
   at sun.awt.im.InputMethodContext.getCommittedText(InputMethodContext.java:285)
   at apple.awt.CInputMethod$3.run(CInputMethod.java:569)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
   at apple.awt.CToolkit$CPeerEvent.dispatch(CToolkit.java:1215)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
   at java.awt.EventQueue.access$400(EventQueue.java:82)
   at java.awt.EventQueue$2.run(EventQueue.java:676)
   at java.awt.EventQueue$2.run(EventQueue.java:674)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
javax.swing.text.BadLocationException: Invalid location
   at javax.swing.text.GapContent.getChars(GapContent.java:169)
   at javax.swing.text.GapContent.getString(GapContent.java:150)
   at javax.swing.text.AbstractDocument.getText(AbstractDocument.java:757)
   at processing.app.syntax.JEditTextArea.getText(JEditTextArea.java:928)
   at processing.app.syntax.im.CompositionTextManager.getCommittedText(CompositionTextManager.java:191)
   at processing.app.syntax.im.InputMethodSupport.getCommittedText(InputMethodSupport.java:49)
   at sun.awt.im.InputMethodContext.getCommittedText(InputMethodContext.java:285)
   at apple.awt.CInputMethod$3.run(CInputMethod.java:569)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
   at apple.awt.CToolkit$CPeerEvent.dispatch(CToolkit.java:1215)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
   at java.awt.EventQueue.access$400(EventQueue.java:82)
   at java.awt.EventQueue$2.run(EventQueue.java:676)
   at java.awt.EventQueue$2.run(EventQueue.java:674)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
java.lang.reflect.InvocationTargetException
   at apple.awt.CToolkit.invokeAndWait(CToolkit.java:1160)
   at apple.awt.CToolkit.invokeAndWait(CToolkit.java:1105)
   at apple.awt.CInputMethod.attributedSubstringFromRange(CInputMethod.java:557)
Caused by: java.lang.NullPointerException
   at java.text.AttributedString.<init>(AttributedString.java:109)
   at processing.app.syntax.im.CompositionTextManager.getCommittedText(CompositionTextManager.java:192)
   at processing.app.syntax.im.InputMethodSupport.getCommittedText(InputMethodSupport.java:49)
   at sun.awt.im.InputMethodContext.getCommittedText(InputMethodContext.java:285)
   at apple.awt.CInputMethod$3.run(CInputMethod.java:569)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
   at apple.awt.CToolkit$CPeerEvent.dispatch(CToolkit.java:1215)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
   at java.awt.EventQueue.access$400(EventQueue.java:82)
   at java.awt.EventQueue$2.run(EventQueue.java:676)
   at java.awt.EventQueue$2.run(EventQueue.java:674)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Nick Gammon

Sometimes missing brackets/braces do that. Press on with valid code and the error should go away.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy