Go Down

Topic: Arduino 1.8.12 released (Read 18659 times) previous topic - next topic

pert

After upgrading from 1.8.5 to 1.8,12 to attempt to work with an ESP32 Dev Module, my currently working sketch (created with 1.8.5 returned the following error message, text file attached below.  If I select an Arduino Mega or Mega 2560 board, the sketch compiles with no errors?
The relevant part of @Do_Not_Give_Up's output:
Code: [Select]
C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\src\SoftwareSerial.cpp:41:27: fatal error: avr/interrupt.h: No such file or directory

The problem is that your sketch is using the SoftwareSerial library, but the SoftwareSerial library you have installed at C:\Program Files (x86)\Arduino\libraries\SoftwareSerial is written specifically for the AVR architecture used by your Arduino Mega board. There is no way to make that SoftwareSerial library work with ESP32. It may be that there is a software serial library written for ESP32, but the ESP32 has multiple hardware serial ports. It's always best to use the hardware serial ports when they are available. Software serial should only be used when you have no other option.

I don't see a likely mechanism for this issue to be caused by a switch from Arduino IDE 1.8.5 to 1.8.12. I'd need much more information to be able to investigate that possibility. However, I don't think it's worth spending time on trying to get software serial working for you if the use of software serial is pointless.

On a related note, the Arduino Mega also has multiple hardware serial ports, so it also doesn't make sense to use SoftwareSerial on the Mega.

oqibidipo

Goodmorning everyone
I would have expected only one print every second ... instead the output produces different prints every second, but if I decompose the delay (1) the answer "seems to be correct".

I don't understand if we are facing a compiler bug, or a performance limitation of the micro.

I tried with Arduino Uno and also with the Mega, with IDE ver. 1.8.10

I hope to find someone who will give me an answer .... thanks


void loop() {
  if(millis()%1000==0){
    Serial.println(num);
    //delay(1);
    num++;
  }
}
Lets assume that millis() == 1000. The condition is true, Serial.print() is executed and num incremented. How long did that take? Much less than a millisecond. The next time loop() is executed millis() still returns 1000 and that part of the code is executed again. This happens several times before millis() returns more than 1000.

carlosjz

Hello, this is my first post and although I have tried to look for this problem in several places I have not found anyone who has reported it so I would appreciate any help.

Yesterday I tried to install Arduino for the first time on win 10 pro (updated from Win 7). through the 1.8.12 Windows installer.


During the installation, which was very slow, no window appeared indicating the installation of any driver, etc. At the end, no icon appeared on the desktop. I tried to find the Arduino folder on the C: disk in C:/Program Files (x86)/Arduino and it was not there either.  I tried again to install it from the windows installer but I got the message "Arduino version 1.8.12 already installed and must be unstintalled before you install this version, This won't affect sketcher or libraries in the sketch directory Click OK to uninstall from: C:/Program Files (x86)/Arduino.  Nothing was uninstalled when you clicked OK. I tried to do a windows restore to a previous point, but it also failed saying that a file was missing.

 I have run several antivirus programs on the windows installer but it doesn't seem to have any virus.  I also tried to install an older version (1.8.11) but it gave me the same error.

Could you tell me if there is any problem reported with the installation of this version in windows 10 pro and how to fix it? thank you very much.

carlosjz

I'll answer myself. I just found out what the problem is.

It was installed in a C: folder called VTRoot (a sandbox created by the firewall Comodo). It had created several subfolders named Harddiskvolume2, 4... Inside one of them I have located the Program Files (x86)/Arduino/ path

I hope it can help someone..

salvo_sicilia

Lets assume that millis() == 1000. The condition is true, Serial.print() is executed and num incremented. How long did that take? Much less than a millisecond. The next time loop() is executed millis() still returns 1000 and that part of the code is executed again. This happens several times before millis() returns more than 1000.
Thanks

binaryking0101

Downloaded and installed 1.8.12 on to my computer. Installed fine, however does not work with FastLED. Had to revert back to 1.8.10 to properly compile FASTLED. It is reading the version of FastLED as 3.003.003 when it should read the version for 3.3.3.

pert

Installed fine, however does not work with FastLED.
If you want help with that, we'd need you to provide the full error output shown in the black console pane at the bottom of the Arduino IDE window after the compilation fails.

federicof89

Hi,
Just to recap, is ODE 1.8.12 working on XP at present or not? I have just installed it and I get the "not a valid win32 application" message, as reported by others.

Thanks

SierraGolfMike

I was looking at updating to the latest version but I believe there were issues with macOS and even more with macOS Catalina. Can anyone tell me if these issues still exist?

Thank you in advance!

manuraba

when i upload file appear this error? why is it?

processing.app.debug.RunnerException
   at cc.arduino.Compiler.callArduinoBuilder(Compiler.java:317)
   at cc.arduino.Compiler.loadPreferences(Compiler.java:216)
   at cc.arduino.Compiler.build(Compiler.java:175)
   at processing.app.SketchController.build(SketchController.java:664)
   at processing.app.SketchController.exportApplet(SketchController.java:689)
   at processing.app.Editor$UploadHandler.run(Editor.java:2047)
   at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Arduino\arduino-builder": CreateProcess error=193, %1 non è un'applicazione di Win32 valida
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
   at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
   at cc.arduino.Compiler.callArduinoBuilder(Compiler.java:297)
   ... 6 more
Caused by: java.io.IOException: CreateProcess error=193, %1 non è un'applicazione di Win32 valida
   at java.lang.ProcessImpl.create(Native Method)
   at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
   at java.lang.ProcessImpl.start(ProcessImpl.java:137)
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
   ... 8 more

pert

Caused by: java.io.IOException: CreateProcess error=193, %1 non è un'applicazione di Win32 valida
Which version of Windows are you using?

purplechrissy

MacOS 10.15.4 Current version crashes on threads 17 and 21.

DaveEvans

#72
Apr 27, 2020, 05:25 am Last Edit: Apr 29, 2020, 08:15 pm by DaveEvans
[solved] I used Putty in lieu of the Arduino serial monitor last night and found out the problem is that for an hour my sketch sends the text "reset flag" to the monitor on every pass through loop.  Apparently the Arduino serial monitor can't keep up and dies an ungraceful death.

Original Post:

I've left the Arduino IDE with serial monitor open and my project running overnight two times now, and each time in the morning both the IDE window and the serial monitor window are all black, or mostly black, and non-responsive. 

[edit] Last night it happened again for the 3rd time, but this time the IDE window allowed me to copy all messages - see attached .txt file.  (The serial monitor window was all black, same as two previous times.)  Excerpts:

Quote
Exception in thread "JmDNS(d3e3inAK-HP.local.).Timer" Exception in thread "SocketListener(d3e3inAK-HP.local.)" java.lang.IllegalStateException: Timer already cancelled.

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at javax.swing.plaf.basic.BasicTextAreaUI$PlainParagraph.<init>(BasicTextAreaUI.java:234)

Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 535396
at javax.swing.text.CompositeView.replace(CompositeView.java:187)
What's wrong?

I'm using Window 7 Home Premium, Service Pack 1, with Arduino IDE v1.8.12, and the Boards Manager version of the ESP library, v2.6.3.

For what it is worth, I've also included the sketch, which compiled without error, connected to wifi (according to output on the serial monitor), and then did what it is supposed to do last night: scrape a .bmp file from another ESP8266 around 2 am, save it to SPIFFS, and serve it upon request.

Example of black screen of death:


Code: [Select]
/*--------------------------------------------------------------
  Wesp06n - a combination of k and m

  This serves graph.bmp and legendsm.jpg only (and also the corresponding .htm files, just for testing).

  Every morning at about 2 am it "scrapes" the updated graph.bmp from the window ESP.

  To use, must also store legendsm.jpg on this device, the desktop ESP, by FTP, FSbrowser, or IDE upload in data folder.

  TO DO: update the graph.htm and legend.htm in the window ESP to point to this ESP.

*/

// from StreamHTTPClient (added to Async code)
#include <Arduino.h>
#include <ESP8266HTTPClient.h>
// end

// from Async
#include "ESP8266WiFi.h"
#include "ESPAsyncTCP.h"
#include "ESPAsyncWebServer.h"
// end

// from NTP example in Wesp06m
#include <NTPClient.h>
#include <WiFiUdp.h>
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "time.nist.gov", -28800, 1200000);
// Anchorage is eight hr behind UTC -8x60x60=28800 sec
// update every 20 min 20x60x1000=1200000, 2 times/hr just
// in case one fails
// end

// SPIFFS
#include <FS.h>
File fsUploadFile;
// end

const char* ssid = "xxxx";
const char* password =  "yyyy";

AsyncWebServer server(80);

void setup() {
  Serial.begin(115200);

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi..");
  }

  Serial.println(WiFi.localIP());

  SPIFFS.begin();
  timeClient.begin();

  //server.serveStatic("/index.htm", SPIFFS, "/index.htm");
  server.serveStatic("/graph.htm", SPIFFS, "/graph.htm");
  server.serveStatic("/legend.htm", SPIFFS, "/legend.htm");

  server.serveStatic("/legendsm.jpg", SPIFFS, "/legendsm.jpg");
  server.serveStatic("/graph.bmp", SPIFFS, "/graph.bmp");

  server.begin(); 
}

void loop() {

  static bool graphUpdated = false;

  timeClient.update(); // presumably updates actually only occur every 20 minutes, not every loop

  if (timeClient.getHours() == 2 && !graphUpdated) //on or around 2 am, get graph.bmp from window ESP
  {
    getGraph();
    graphUpdated = true; // or so one would hope
    Serial.println("got graph");
  } else if (timeClient.getHours() == 3) //on or around 3 am, set flag back to false, so will trigger next time 2 am rolls around
  {
    graphUpdated = false;
    Serial.println("reset flag");
  }

}

void getGraph() {  //all of this is from StreamHTTPClient, except the save-to-SPIFFS additions are by DAE

  // TO-DO: error handling & notification (via IFTTT?) in case of failure

  bool gotFile = false;

  Serial.println(); Serial.println("Waiting to connect for graph update...");

  while (!gotFile) {   // loop until WiFi connection (and success in getting file)

    if ((WiFi.status() == WL_CONNECTED) && !gotFile) {

      WiFiClient client;
      HTTPClient http; //must be declared after WiFiClient for correct destruction order, because used by http.begin(client,...)

      Serial.print("[HTTP] begin...\n");
      http.begin(client, "myUrlHere/graph.bmp"); // config server & URL

      Serial.print("[HTTP] GET...\n");
      int httpCode = http.GET();  // start connection and send HTTP header

      // SPIFFS additions
      String filename = "graph.bmp";
      if (!filename.startsWith("/")) filename = "/" + filename; // must start with /
      Serial.print("fileUpload Name: "); Serial.println(filename);
      fsUploadFile = SPIFFS.open(filename, "w"); // Open the file for write
      if (!fsUploadFile) Serial.println("file open failed");

      if (httpCode > 0) { // HTTP header has been sent & server response header has been handled
        Serial.printf("[HTTP] GET... code: %d\n", httpCode);

        if (httpCode == HTTP_CODE_OK) { // file found at server

          int len = http.getSize(); // doc len = -1 when server sends no Content-Length header
          Serial.print("save file of length: "); Serial.println(len);
          unsigned long startTime = millis(); //time the xfer

          uint8_t buff[128] = { 0 }; // create buff for read

          WiFiClient * stream = &client; // get tcp stream

          // read all data from server
          while (http.connected() && (len > 0 || len == -1)) {
            int c = stream->readBytes(buff, std::min((size_t)len, sizeof(buff))); // read up to buff size
            if (!c) Serial.println("read timeout");
            if (fsUploadFile) fsUploadFile.write(buff, c); // write to SPIFFS or LittleFS
            if (len > 0) len -= c;
          } //end while connected and (len > 0 or len == -1)

          Serial.println(); Serial.print("[HTTP] connection closed or file end.\n");
          Serial.print("took "); Serial.print((millis() - startTime) / 1000); Serial.println(" sec");

          if (fsUploadFile) {
            fsUploadFile.close(); // If the SPIFFS file was successfully created
            gotFile = true;
          }

        }
      } else {
        Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());
      } // end if httpCode > 0

      http.end();

    } //end if WiFi.status() == WL_CONNECTED) && !gotFile

    delay(60000); // wait and try again

  } //end while loop
}

steven_e-k_31

I have a problem for programming on this message:

Arduino: 1.8.12 (Windows 10), boards: "Arduino Leonardo"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\user\Documents\Arduino\libraries -fqbn=arduino:avr:leonardo -ide-version=10812 -build-path C:\Users\user\AppData\Local\Temp\arduino_build_687075 -warnings=default -build-cache C:\Users\user\AppData\Local\Temp\arduino_cache_423679 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\user\Documents\Arduino\libraries -fqbn=arduino:avr:leonardo -ide-version=10812 -build-path C:\Users\user\AppData\Local\Temp\arduino_build_687075 -warnings=default -build-cache C:\Users\user\AppData\Local\Temp\arduino_cache_423679 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
Using board 'leonardo' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/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=atmega32u4 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8036 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Leonardo\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\leonardo" "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_687075\\sketch\\Blink.ino.cpp" -o nul
Error while detecting libraries included by C:\Users\user\AppData\Local\Temp\arduino_build_687075\sketch\Blink.ino.cpp
Generating function prototypes...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/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=atmega32u4 -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8036 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Leonardo\"" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\leonardo" "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_687075\\sketch\\Blink.ino.cpp" -o "C:\\Users\\user\\AppData\\Local\\Temp\\arduino_build_687075\\preproc\\ctags_target_for_gcc_minus_e.cpp"
avr-g++: error: device-specs/specs-atmega32u4: No such file or directory

exit status 1
Error compiling for board Arduino Leonardo.

WHY?

ballscrewbob

@steven_e-k_31

Did you go through the basic troubleshooting in the other sticky posts ?

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up