Skip to content

Arduino disconnect and reconnect causes exception when uploading if serial monitor left open #3382

Open
@pfeerick

Description

@pfeerick

Related partly to #3379 (actually discovered due to testing repeatability).

An exception error will occur if the serial monitor is opened, the arduino is unplugged, plugged back in, and then uploaded to. When you click upload a second time, it disables the serial monitor properly and uploads.

java.io.IOException: jssc.SerialPortException: Port name - COM6; Method name - setEventsMask(); Exception type - Can't set mask.
    at processing.app.Serial.dispose(Serial.java:146)
    at processing.app.SerialMonitor.close(SerialMonitor.java:108)
    at processing.app.AbstractMonitor.suspend(AbstractMonitor.java:206)
    at processing.app.Editor$DefaultExportHandler.run(Editor.java:2375)
    at java.lang.Thread.run(Thread.java:745)
Caused by: jssc.SerialPortException: Port name - COM6; Method name - setEventsMask(); Exception type - Can't set mask.
    at jssc.SerialPort.setEventsMask(SerialPort.java:279)
    at jssc.SerialPort.removeEventListener(SerialPort.java:1064)
    at jssc.SerialPort.closePort(SerialPort.java:1090)
    at processing.app.Serial.dispose(Serial.java:143)
    ... 4 more

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions