Pages: [1]   Go Down
Author Topic: Why does the compiler spit out things like this?  (Read 875 times)
0 Members and 1 Guest are viewing this topic.
Anacortes, WA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 91
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Every once in awhile while I'm editing the complier spits out nonsense like this..

Binary sketch size: 16014 bytes (of a 32256 byte maximum)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 41
   at processing.app.syntax.JEditTextArea.xToOffset(JEditTextArea.java:672)
   at processing.app.syntax.JEditTextArea$DragHandler.mouseMoved(JEditTextArea.java:2034)
   at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:312)
   at java.awt.Component.processMouseMotionEvent(Component.java:6419)
   at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3285)
   at java.awt.Component.processEvent(Component.java:6143)
   at java.awt.Container.processEvent(Container.java:2085)
   at java.awt.Component.dispatchEventImpl(Component.java:4736)
   at java.awt.Container.dispatchEventImpl(Container.java:2143)
   at java.awt.Component.dispatchEvent(Component.java:4566)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4295)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
   at java.awt.Container.dispatchEventImpl(Container.java:2129)
   at java.awt.Window.dispatchEventImpl(Window.java:2478)
   at java.awt.Component.dispatchEvent(Component.java:4566)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
   at java.awt.EventQueue.access$000(EventQueue.java:86)
   at java.awt.EventQueue$1.run(EventQueue.java:639)
   at java.awt.EventQueue$1.run(EventQueue.java:637)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
   at java.awt.EventQueue$2.run(EventQueue.java:653)
   at java.awt.EventQueue$2.run(EventQueue.java:651)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
   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)


Does anyone know what this is all about?

Thanks!

-jim lee
Logged

Holland
Offline Offline
Jr. Member
**
Karma: 0
Posts: 93
Troubles are there to be solved!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the first line tells the size of the compiled sketch. this messages is always printed after a compile run.
the next things it spits out, is something that went wrong i geus,

it says: java.lang.ArrayIndexOutOfBoundsException
it means the compilers code tryed to acces a part of an array wich didnt exist.

im no expert, but since the compiled sketch size is bieng told, i think the compiler solved the error itself and continued compiling.

nick
Logged

humankind cannot obtain anything without
sacrificing something of equal value.

0
Offline Offline
Shannon Member
****
Karma: 159
Posts: 10409
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Its a bug in the editor user interface code I think (AWT = abstract windowing toolkit in Java) - looks like you were dragging some text?

Not seen it myself, it could be a platform-specific problem.

The actual compiler isn't involved.
Logged

[ I won't respond to messages, use the forum please ]

UK
Offline Offline
Shannon Member
****
Karma: 183
Posts: 11114
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Java exception dump indicates errors within the IDE, rather than any problems in your sketch. I see this sort of thing occasionally if I interact with the IDE while it's busy doing something - I suppose there are probably some race conditions in the IDE's event handling.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Anacortes, WA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 91
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe its my IDE? I'm using 1.0 on a Mac. It also randomly decides to scroll my window around and that's kinda annoying and confusing.

-jim lee
Logged

North Queensland, Australia
Offline Offline
Edison Member
*
Karma: 52
Posts: 1770
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems like a common thing. I have had lists of errors pop up occasionally from version 0022 to 1.0.2, especially when cutting or pasting text. Haven't had random scrolling though.

Might be something to do with the IDE virtualizing the files to be compiled.

This is on windows XP / 7.
Logged


Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The first line is the error:

Code:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 41

So, at line 41 some index got out of bounds. The rest is a "backtrace" which shows the calling stack (that is, which function called what, at that time).

I don't know Java, nor how the IDE works internally, so I can't explain more than that.
Logged

Offline Offline
Edison Member
*
Karma: 27
Posts: 2033
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the error appears to have occured in Processing.   Is the Arduino IDE written using Processing ?
And it appears to be related to a mouse movement.
Logged

UK
Offline Offline
Shannon Member
****
Karma: 183
Posts: 11114
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the error appears to have occured in Processing.   Is the Arduino IDE written using Processing ?
And it appears to be related to a mouse movement.

Yes, it's written in Processing.

The Arduino event handling doesn't seem very robust. I should have learned by now not to provoke the problem, but I routinely have a face/palm moment when the Arduino window locks up because I have dragged it between monitors. Sometimes it seems to get confused about what COM ports have Arduinos plugged in and I have to disconnect everything and start again, or the window just goes away for no obvious reason. If I was paying for professionally produced software I'd be pretty unhappy with the quality - but it's free, so I'm grateful for what we have got.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

UK
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3969
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

the error appears to have occured in Processing.   Is the Arduino IDE written using Processing ?
And it appears to be related to a mouse movement.

Yes, it's written in Processing.

The Arduino event handling doesn't seem very robust. I should have learned by now not to provoke the problem, but I routinely have a face/palm moment when the Arduino window locks up because I have dragged it between monitors. Sometimes it seems to get confused about what COM ports have Arduinos plugged in and I have to disconnect everything and start again, or the window just goes away for no obvious reason. If I was paying for professionally produced software I'd be pretty unhappy with the quality - but it's free, so I'm grateful for what we have got.
It's the price you pay for Java...  I have just as much problem with the "professionally produced" MPLAB-X.  If you click any of the projects in the project list before it has completely loaded 100% it just crashes and vanishes without a trace.  If you click upload while it's in the process of uploading it completely locks up and you have to manually kill the process...
Logged

Why not visit my eBay shop? http://stores.ebay.co.uk/Majenko-Technologies
Replacement for the Arduino IDE: UECIDE - Proper serial terminal, graphing facilities, plugins, overhauled internals.
Java isn't bad in itself, but it has enabled morons to write programs.

Pages: [1]   Go Up
Jump to: