IDE trashes itself Arduino 1.8.19

The Debug window ignored the tab and multiple (\n\n\t)new line characters and a tab, nothing was printed. Restarting the IDE solved the problem as the print out was correct from the previous compile that gave the missed characte4rs.

Another problem is it appears to destroy itself. When entering auto format from the menu after a successful compile I get this:

arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/gil/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/gil/.arduino15/packages -libraries /home/gil/Desktop/C_source/libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=1A86_7523 -ide-version=10819 -build-path /tmp/arduino_build_772931 -warnings=none -build-cache /tmp/arduino_cache_468036 -prefs=build.warn_data_percentage=75 -verbose /home/gil/Desktop/C_source/ReadAnalogVoltage/ReadAnalogVoltage.ino
arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/gil/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/gil/.arduino15/packages -libraries /home/gil/Desktop/C_source/libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=1A86_7523 -ide-version=10819 -build-path /tmp/arduino_build_772931 -warnings=none -build-cache /tmp/arduino_cache_468036 -prefs=build.warn_data_percentage=75 -verbose /home/gil/Desktop/C_source/ReadAnalogVoltage/ReadAnalogVoltage.ino
Using board 'nano' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Using core 'arduino' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Detecting libraries used...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/eightanaloginputs" "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/eightanaloginputs" "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp" -o "/tmp/arduino_build_772931/preproc/ctags_target_for_gcc_minus_e.cpp"
"/usr/bin/arduino-ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/arduino_build_772931/preproc/ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/eightanaloginputs" "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp" -o "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core
Linking everything together...
"/usr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p   -o "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.elf" "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp.o"  "/tmp/arduino_build_772931/../arduino_cache_468036/core/core_arduino_avr_nano_cpu_atmega328old_1621df717313d057c92202babd71649a.a" "-L/tmp/arduino_build_772931" -lm
"/usr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0  "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.elf" "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.eep"
"/usr/bin/avr-objcopy" -O ihex -R .eeprom  "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.elf" "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.hex"
Sketch uses 3512 bytes (11%) of program storage space. Maximum is 30720 bytes.
Global variables use 286 bytes (13%) of dynamic memory, leaving 1762 bytes for local variables. Maximum is 2048 bytes.
/usr/bin/avrdude -C/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/tmp/arduino_build_772931/ReadAnalogVoltage.ino.hex:i 

avrdude: Version 7.1
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is /etc/avrdude.conf
         User configuration file is /home/gil/.avrduderc
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom                 65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash                  65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           hfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           efuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           lock                    0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           calibration             0     0     0    0 no          1    1      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino for bootloader using STK500 v1 protocol
         Hardware Version: 2
         Firmware Version: 1.16

avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably m328p)
avrdude: reading input file /tmp/arduino_build_772931/ReadAnalogVoltage.ino.hex for flash
         with 3512 bytes in 1 section within [0, 0xdb7]
         using 28 pages and 72 pad bytes
avrdude: writing 3512 bytes flash ...

Writing | ################################################## | 100% 1.07s

avrdude: 3512 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_772931/ReadAnalogVoltage.ino.hex

Reading | ################################################## | 100% 0.79s

avrdude: 3512 bytes of flash verified

avrdude done.  Thank you.

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 'java.lang.String cc.arduino.packages.formatter.AStyleInterface.AStyleMain(java.lang.String, java.lang.String)'
	at cc.arduino.packages.formatter.AStyleInterface.AStyleMain(Native Method)
	at cc.arduino.packages.formatter.AStyle.run(AStyle.java:80)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

This is a new install on Linux Mint 22.1.

Here is the test code:

/*
  ReadAnalogVoltage

  Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor.
  Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/ReadAnalogVoltage
*/

float voltage = 0;
  int sensorValue = 0;

void showvolt(){
  voltage = sensorValue * (5.0 / 1023.0);   // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  Serial.print(voltage);             // print out the value you read:
  Serial.print(F("  "));
}

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 115200 bits per second:
  Serial.begin(115200);
  Serial.print("\n\n\n\tHi Gil!\n\tFile: ");
  Serial.print(__FILE__);
  
}

// the loop routine runs over and over again forever:
void loop() {
  Serial.print(F("\n\t"));
  sensorValue = analogRead(A0);    // read the input on analog pin 0:
  showvolt();
  sensorValue = analogRead(A1);    // read the input on analog pin 0:
  showvolt();
  sensorValue = analogRead(A2);    // read the input on analog pin 0:
  showvolt();
  sensorValue = analogRead(A3);    // read the input on analog pin 0:
  showvolt();
  sensorValue = analogRead(A4);    // read the input on analog pin 0:
  showvolt();
  sensorValue = analogRead(A5);    // read the input on analog pin 0:
  showvolt();
  sensorValue = analogRead(A6);    // read the input on analog pin 0:
  showvolt();
  sensorValue = analogRead(A7);    // read the input on analog pin 0:
  showvolt();
//  Serial.print(F("\n\t"));
  delay(500);
}
This is modification of one of the examples to try out the install.

I don't think that I can help but some additional information might be useful.

What is the debug window? Serial Monitor?

Where? Assuming the serial monitor is that in the input window or the output window?

What was your previous install? Where OS and IDE the same? If not which Operating System and IDE version in the past?

Can't help you with that. Did you modify the formatter text file and maybe made a mistake?

The debug monitor is the serial monitor. In my previous life it was called the Debug monitor.

That was the serial monitor it did just ignored them. I closed the IDE and reopened it and it then worked, I did not recompile the code.

Yes this is a new install on Linux Mint 22.1. I also installed it a few weeks back on another machine without any problems. The only change on this machine was the hard drive and OS, from 18.3 to 22.1

I have not modified anything, I have no reason to do so.

I also get this type of error sometimes on other earlier versions of the IDE on several different machines and versions of mint but only when I miss a bracket or something. Sometimes it works some times I reload.

The file loaded OK and formatted fine on the other mint 22.1 machine.

If it means anything I installed it with the terminal
"sudo apt install arduino"

Thanks for the concern it is appreciated. I still have to do the run in on the system but I do not expect any problems as it is a WD drive which I have always had work out of the box. I was lazy so I used the same thumb drive I used on other machines. No problems with any of them.

It would be worth trying the official build of Arduino IDE. I don't have any specific reason to think this is caused by using the 3rd party version of Arduino IDE from the package repository, but in the past we have seen strange problems that are related to the changes the package maintainers make to Arduino IDE.

You can download the official build from the links on the "Software" page here:

https://www.arduino.cc/en/software/#legacy-ide-18x

The Arduino IDE installation you get from that page can happily coexist with an existing APT installation of Arduino IDE on your machine. So you don't need to uninstall the APT installed copy of Arduino IDE from your computer before trying the official build.

You don't need to do any installation of the official build. Just extract the downloaded archive file to any convenient location on your hard drive and then run the arduino executable from the the extracted folder. After performing the experiment, if you want to go back to using the APT installed copy of Arduino IDE and don't have any more interest in using the official build, you can simply delete the folder to remove the installation of the official build.

1 Like

A great Bit Thank You From start to it running without a problem took maybe two minutes including downloading. The formatting works as does the compiler etc. It will take a few days to be certain but it looks great at this point.

1 Like