Arduino IDE 2.1.1 ?

Hello.
Been running IDE 2.1.0 on desktop and Laptop.
Exact same sketches on both (Arduino Uno 3).
Yesterday ran the Desktop, IDE says Update to 2.1.1 available.
I ran the update, and also updated the libraries.
After the updates, my sketch (code) would Upload okay from the Desktop.
The code Starts running, but quickly stops, and hangs there.
No error messages.

Connect my Laptop, with IDE 2.1.0 (Don't Update).
Upload same sketch, runs no problem.

Back to the Desktop, De-Install Arduino IDE 2.1.1 completely, as well as Libraries.
Download IDE 2.1.0, install. Copy old libraries from Laptop to Desktop.
Upload to Uno, but same issue, code stops running.

Desktop also has Arduino 1.6.9 code application (I've never used it before).
Open 1.6.9, open the same sketch, Upload, works no problem.

Does anyone know what might be going on here with my Desktop Arduino IDE ?

Really ?

Is this the IDE or something else ?

I just cant figure this one out.
Been Uploading and running this exact same code, from both the Laptop and the Desktop, to several different Uno boards, for six months. Never had an issue. I even use the same USB cable.
I did that update to IDE 2.1.1 on the Desktop, as well as updating the Libraries, and now it doesn't work.
I thought for sure going back to IDE 2.1.0 would fix it, but not the case.
I am going to step through the code to find out exactly where/what causes it to stop running.
looks like it might have something to do with the communications between the UNO board and the DFPlayerMini. But how that would work on an Upload from the Laptop, and NOT from the Desktop... makes no sense.

Hi @pilotwoody. I'm going to ask you to post some additional information that might help us to identify the problem.


:exclamation: NOTE: These instructions will not solve the problem. They are only intended to gather more information about the problem.


Please do this:

  1. Start Arduino IDE 2.x on your desktop machine.
  2. Select File > Preferences... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  3. Check the box next to "Show verbose output during: ☐ compilation" in the "Preferences" dialog.
  4. Click the OK button.
  5. Select Sketch > Verify/Compile from the Arduino IDE menus.
  6. Wait for the compilation to finish.
  7. Right click on the black "Output" panel at the bottom of the Arduino IDE window.
  8. From the context menu, click Copy All.
  9. Open a forum reply here by clicking the Reply button.
  10. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code tags icon on toolbar
  11. Press Ctrl+V.
    This will paste the compilation output into the code block.
  12. Move the cursor outside of the code tags before you add any additional text to your reply.
  13. Click the Reply button to post the output.

Now repeat the process above but this time using Arduino IDE 1.6.9 from your laptop machine.


In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the Reply button.
  5. Click the "Upload" icon (image) on the post composer toolbar:
    Upload icon on toolbar
    A dialog will open.
  6. In the dialog, select the .txt file you saved.
  7. Click the Open button.
  8. Click the Reply button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

Arduino IDE 2.1.0 VerifyCompile DESKTOP.txt (10.9 KB)

Arduino 1.6.9 VerifyCompile DESKTOP.txt (24.7 KB)

UPDATE.
I wanted to play with the failing code to see if I could identify where it was stopping.
I had the failing code (MyCode) open in IDE 2.1.0.
Did a Save_As and gave it a new name MyCode_TEST.
That saved it as a new sketch.
Closed the original sketch (MyCode).
Opened the new sketch (MyCode_TEST) in IDE 2.1.0.
Made NO changes, Uploaded the code, it works!
Gone back and forth a few times now.
MyCode always fails.
MyCode_TEST always works.

So, this is not a show stopper for me, I can obviously work with what I have.
Appreciate your help, if you need any further details, please just let me know.

I am wondering though, should I go ahead and Update to 2.1.1 now, or stick with 2.1.0?

Thanks for the output. I had a hypothesis that the cause of the different results between the two machines might be that different dependencies were being used from one computer to the other. But after looking at the output it actually appears that the dependencies are identical.

And anyway, you most recent findings further contradict my hypothesis:

That is certainly odd. My new hypothesis is that there is something wrong with the compilation cache for the "MyCode" sketch. Arduino IDE caches the objects generated by compiling each of the dependencies of your sketch in a temporary folder. If this cache is found, Arduino IDE reuses it instead of recompiling everything in order to make the compilation go faster. Each sketch has its own compilation cache, so when you made the new "MyCode_TEST" sketch, a fresh cache was generated for it. So if something went wrong with the files in the compilation cache of the "MyCode" sketch, that would explain why the identical code has a different behavior when saved to a new folder.

I don't know of any specific relevant problem with the caching system of Arduino IDE. Arduino IDE is smart about clearing the cache and recompiling the dependency if anything has changed (e.g., you updated to a new version of the library). In the rare cases where I have seen reports of the cache being somehow corrupted, it usually only caused the compilation to fail. So this would only occur under exceptional circumstances.

You could test my hypothesis by deleting the temporary build folder of the "MyCode" sketch which contains the cache. This will force Arduino IDE to recompile the previously cached objects the next time you compile the sketch:

  1. Use Windows File Explorer or the terminal to delete the folder at this path:
    C:\Users\Will\AppData\Local\Temp\arduino\sketches\D9E776989FEB362B5C740AAFA12B4DB8
    
    :exclamation: If looking for it with your file manager or command line, note that the <!-- TODO: path --> folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
    :warning: Please be careful when deleting things from your computer. When in doubt, back up!
  2. Open the "MyCode" sketch in Arduino IDE on your desktop computer.
  3. Select Sketch > Upload from the Arduino IDE menus.

If my hypothesis was correct, we would expect the sketch program to now behave the same as "MyCode_TEST" on the board.

The only difference between 2.1.0 and 2.1.1 is a fix to a problem that caused uploads to the UNO R4 Minima board. If you own that board then you should definitely update. If you don't own an UNO R4 Minima board then it doesn't matter whether you update or not. I don't expect that you will experience any new problems with 2.1.1 compared to 2.1.0 and updating will mean you won't be annoyed by the update offers the IDE shows on startup when you are using an outdated version.

Hi.
Deleted the compilation cache folder for MyCode as requested.
Opened IDE 2.1.0.
Opened MyCode sketch.
Uploaded........
Back to normal, code is now running fine again!
Thanks so much for your help with this problem.
If there is anything further you need from me, just let me know.
Thanks again.

You are welcome. I'm glad that the "MyCode" sketch is back to a working state again.

Regards,
Per

A post was split to a new topic: Compilation error: redefinition of 'Servo myservo'

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.