there seems to be an Error inside Serial.<init>()
Answered
- Need more info
- Answered
- Working on it
in
Core Library Questions
•
3 years ago
Hi Everyone,
I'm having an issue accessing the serial ports with a very simple processing sketch used to drive an arduino.
I've been reading around the forums but all related issues are either slightly different or legacy.
In short, Processing gives me an error when I try to open the serial port that the arduino is connected to. It is seeing the port in use, though I'm fairly sure nothing else is using it. There are no other applications open and I've restarted. To troubleshoot, I've used Terminal and am able to open the port, talk to the arduino, and close the port with no problems at all.
I know variations of this problem have cropped up in the past. Help would be greatly appreciated as I'm not sure what else to try.
Thanks in advance.
Here we go:
OSX 10.5.8
Processing 0187 pre-release
Preferred Java version Java 5.0 64-bit
CODE:
Serial prt;
void setup() {
size(400, 400);
println(Serial.list());
prt = new Serial(this, Serial.list()[0], 9600);
}
CONSOLE:
Error inside Serial.<init>()
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
[0] "/dev/tty.usbserial-A800eKiK"
[1] "/dev/cu.usbserial-A800eKiK"
[2] "/dev/tty.Bluetooth-PDA-Sync"
[3] "/dev/cu.Bluetooth-PDA-Sync"
[4] "/dev/tty.Bluetooth-Modem"
[5] "/dev/cu.Bluetooth-Modem"
gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
at processing.serial.Serial.<init>(Serial.java:139)
at processing.serial.Serial.<init>(Serial.java:105)
at processingTest01.setup(processingTest01.java:61)
at processing.core.PApplet.handleDraw(PApplet.java:1583)
at processing.core.PApplet.run(PApplet.java:1503)
at java.lang.Thread.run(Thread.java:613)
processing.app.debug.RunnerException: RuntimeException: Error inside Serial.<init>()
at processing.app.Sketch.placeException(Sketch.java:1543)
at processing.app.debug.Runner.findException(Runner.java:583)
at processing.app.debug.Runner.reportException(Runner.java:558)
at processing.app.debug.Runner.exception(Runner.java:498)
at processing.app.debug.EventThread.exceptionEvent(EventThread.java:367)
at processing.app.debug.EventThread.handleEvent(EventThread.java:255)
at processing.app.debug.EventThread.run(EventThread.java:89)
Exception in thread "Animation Thread" java.lang.RuntimeException: Error inside Serial.<init>()
at processing.serial.Serial.errorMessage(Serial.java:591)
at processing.serial.Serial.<init>(Serial.java:151)
at processing.serial.Serial.<init>(Serial.java:105)
at processingTest01.setup(processingTest01.java:61)
at processing.core.PApplet.handleDraw(PApplet.java:1583)
at processing.core.PApplet.run(PApplet.java:1503)
at java.lang.Thread.run(Thread.java:613)
I'm having an issue accessing the serial ports with a very simple processing sketch used to drive an arduino.
I've been reading around the forums but all related issues are either slightly different or legacy.
In short, Processing gives me an error when I try to open the serial port that the arduino is connected to. It is seeing the port in use, though I'm fairly sure nothing else is using it. There are no other applications open and I've restarted. To troubleshoot, I've used Terminal and am able to open the port, talk to the arduino, and close the port with no problems at all.
I know variations of this problem have cropped up in the past. Help would be greatly appreciated as I'm not sure what else to try.
Thanks in advance.
Here we go:
OSX 10.5.8
Processing 0187 pre-release
Preferred Java version Java 5.0 64-bit
CODE:
Serial prt;
void setup() {
size(400, 400);
println(Serial.list());
prt = new Serial(this, Serial.list()[0], 9600);
}
CONSOLE:
Error inside Serial.<init>()
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
[0] "/dev/tty.usbserial-A800eKiK"
[1] "/dev/cu.usbserial-A800eKiK"
[2] "/dev/tty.Bluetooth-PDA-Sync"
[3] "/dev/cu.Bluetooth-PDA-Sync"
[4] "/dev/tty.Bluetooth-Modem"
[5] "/dev/cu.Bluetooth-Modem"
gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
at processing.serial.Serial.<init>(Serial.java:139)
at processing.serial.Serial.<init>(Serial.java:105)
at processingTest01.setup(processingTest01.java:61)
at processing.core.PApplet.handleDraw(PApplet.java:1583)
at processing.core.PApplet.run(PApplet.java:1503)
at java.lang.Thread.run(Thread.java:613)
processing.app.debug.RunnerException: RuntimeException: Error inside Serial.<init>()
at processing.app.Sketch.placeException(Sketch.java:1543)
at processing.app.debug.Runner.findException(Runner.java:583)
at processing.app.debug.Runner.reportException(Runner.java:558)
at processing.app.debug.Runner.exception(Runner.java:498)
at processing.app.debug.EventThread.exceptionEvent(EventThread.java:367)
at processing.app.debug.EventThread.handleEvent(EventThread.java:255)
at processing.app.debug.EventThread.run(EventThread.java:89)
Exception in thread "Animation Thread" java.lang.RuntimeException: Error inside Serial.<init>()
at processing.serial.Serial.errorMessage(Serial.java:591)
at processing.serial.Serial.<init>(Serial.java:151)
at processing.serial.Serial.<init>(Serial.java:105)
at processingTest01.setup(processingTest01.java:61)
at processing.core.PApplet.handleDraw(PApplet.java:1583)
at processing.core.PApplet.run(PApplet.java:1503)
at java.lang.Thread.run(Thread.java:613)
1