Skip to content

java.lang.ArrayIndexOutOfBoundsException #2169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ermakov0 opened this issue Jul 6, 2014 · 6 comments
Closed

java.lang.ArrayIndexOutOfBoundsException #2169

ermakov0 opened this issue Jul 6, 2014 · 6 comments

Comments

@ermakov0
Copy link

ermakov0 commented Jul 6, 2014

version: 1.5.6-r2

Error repainting line range {18,34}:
java.lang.ArrayIndexOutOfBoundsException: 13
at javax.swing.text.Utilities.drawTabbedText(Utilities.java:149)
at javax.swing.text.Utilities.drawTabbedText(Utilities.java:106)
at javax.swing.text.Utilities.drawTabbedText(Utilities.java:84)
at processing.app.syntax.SyntaxUtilities.paintSyntaxLine(SyntaxUtilities.java:156)
at processing.app.syntax.TextAreaPainter.paintSyntaxLine(TextAreaPainter.java:647)
at processing.app.syntax.TextAreaPainter.paintLine(TextAreaPainter.java:606)
at processing.app.syntax.TextAreaPainter.paint(TextAreaPainter.java:415)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
at javax.swing.RepaintManager.paint(RepaintManager.java:1249)
at javax.swing.JComponent._paintImmediately(JComponent.java:5167)
at javax.swing.JComponent.paintImmediately(JComponent.java:4978)
at javax.swing.RepaintManager$3.run(RepaintManager.java:808)
at javax.swing.RepaintManager$3.run(RepaintManager.java:796)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718)
at javax.swing.RepaintManager.access$1100(RepaintManager.java:62)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
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)

@Alienwaren
Copy link

More info? Arduino code? Something more?

@ermakov0
Copy link
Author

ermakov0 commented Jul 7, 2014

I am sorry. Working code and the code is not important. Repeat the error failed.

*@Debian:$ uname -a
Linux debian 3.2.0-4-686-pae #1 SMP Debian 3.2.57-3 i686 GNU/Linux
*@Debian:
$

Code:

#include SPI.h>
#include Ethernet.h>

byte mac[] = {0x00,0x13,0xd4,0x94,0x81,0xe2};
IPAddress ip(10,10,10,10);
EthernetServer server(80);
EthernetClient client;

void eth() {
  digitalWrite(23, HIGH);
  do {
    client = server.available();
  } while (!(client && client.connected()));
  while (client.available()) {
    client.read();
  }
  digitalWrite(23, LOW);
}

void log(char* str){
  if (!client.connected()){
    eth(); 
  }
  //client.print(str);             //460 KB/sec
  //client.write(str,strlen(str)); //470 KB/sec
  client.write(str);               //490 KB/sec
}

void setup() {
  pinMode(22, OUTPUT);
  pinMode(23, OUTPUT);
  digitalWrite(22, LOW); 
  digitalWrite(23, HIGH); 

  Ethernet.begin(mac, ip);
  server.begin();
  eth();   //ждём клиента
  log("All ok\n");
}

void loop() {
  //delay(5000);
  log("ok\n");
}

@ffissore
Copy link
Contributor

ffissore commented Jul 7, 2014

What did you do to generate the error? Can you help me reproduce it?

@ermakov0
Copy link
Author

ermakov0 commented Jul 7, 2014

I clicked button "compile" (ctrl + r). I am sorry, but i not can help reproduce it. I myself can not reproduce

@Alienwaren
Copy link

java.lang.ArrayIndexOutOfBoundsException error suggests that You somewhere try to index an array out of bounds.

@ffissore
Copy link
Contributor

ffissore commented Jul 7, 2014

Closing as Works For Me. If you manage to reproduce the issue, please open an new issue. Thank you.

@ffissore ffissore closed this as completed Jul 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants