I am only getting this error on one of my Windows 10 PC's. On another windows 10 PC and Mac, the board (Mega 2560) is working fine.
Any hellp or advice on this would be appreciated.
THE PROBLEM
After uploading the sketch and then attempting to open the serial monitor, Java error messages (shown below) are displayed in the information window in the IDE. The serial monitor fails to open. Other sketches that do not use the serial monitor work fine.
ANYTHING UNUSUAL ABOUT THIS PC?
The only thing that is perhaps unusual about this PC is that Serial Ports COM1: AND COM2: are real RS432 hardware serial ports.
The Ardunio IDE connects to the board via USB Serial Port COM5:
REMEDIES TRIED SO FAR
Uninstalled and reinstalled the software (including purging Arduino settings in Documents\ folder
Trying the board on other PC's / MAC (to verify that it is not a faulty board). Tests confirm that board itself is fine
THE ERROR MESSAGES
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 2 at processing.app.AbstractMonitor.(AbstractMonitor.java:68) at processing.app.AbstractTextMonitor.(AbstractTextMonitor.java:53) at processing.app.SerialMonitor.(SerialMonitor.java:42) at cc.arduino.packages.MonitorFactory.newMonitor(MonitorFactory.java:49) at processing.app.Editor.handleSerial(Editor.java:2193) at processing.app.Editor.lambda$buildToolsMenu17ドル(Editor.java:723) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access500ドル(EventQueue.java:97) at java.awt.EventQueue3ドル.run(EventQueue.java:709) at java.awt.EventQueue3ドル.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue4ドル.run(EventQueue.java:733) at java.awt.EventQueue4ドル.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
-
What version of the IDE are you using, and how did you install it?Majenko– Majenko2020年04月26日 09:04:26 +00:00Commented Apr 26, 2020 at 9:04
-
Try running the ArduinoIDE as Administrator, test the com port to use with a terninal program like PUTTY.Codebreaker007– Codebreaker0072020年04月26日 09:13:41 +00:00Commented Apr 26, 2020 at 9:13
-
The version of the IDE that I am using, on both windows PC's is 1.8.12 (Windows Store Version 1.8.33.0). The software was obtained by going directly to the Arduino.cc downloads page which then redirected me to the Windows Store. Both Windows PC's are 64 Bit, and I log into both using my Microsoft Account. I tried using Putty as suggested, but that just bleeped when trying to communicate with any serial port, even the ones connected to my Chess board with the RS432 interface. The Chessboard still works fine. For the time being, I will just use the other PC for the Arduino.Mike M0ITI– Mike M0ITI2020年04月28日 06:15:02 +00:00Commented Apr 28, 2020 at 6:15
-
Just as an experiment, I downloaded one of the 'nighly releases' directly from the Arduino site. And, guess what - it works! Bit of a mystery why the same Windows Store version works on one of my PC's and not the other but, for the teim ebing, problem solved.Mike M0ITI– Mike M0ITI2020年04月28日 06:55:35 +00:00Commented Apr 28, 2020 at 6:55