Skip to content

Compiler Never terminates if compilation error occurs #2085

Open
@marcusobrien

Description

@marcusobrien

Describe the problem

Have a ESP32 sketch loaded. Hit the compile Button (tick mark top left on IDE GUI), the system compiles the sketch - but encounters an error, reports the error through the output terminal, and compilation has stopped - but GUI has not registered this state change, so the GUI has

  1. The Notification message "Compiling", which stays on the screen and wont clear unless I explicitly clear it via Notification button
  2. All re compile buttons greyed out in the menus eg Sketch->Verify/Compile, Sketch->Upload, Sketch->Configure and Upload, Sketch->Upload using programmer, and Sketch->Export compiled binary
  3. I can still edit the sketch file and press other buttons - so the App hasn't crashed, and the GUI is still repsonding
  4. The round Upload Arrow button is now yellow and cant be clicked, the round Verify button is still green and also cant be clicked

To reproduce

  1. Open .ino Sketch
  2. Press Round Right Arrow button on GUI to Compile and Upload
  3. Make sure the compilation fails
  4. Should now be in the same state as me, cant now re-compile as the GUI still thinks the compilation process is running.

Only was to now recover is reset application ie close it and re-open

Expected behavior

Should be able to re-compile when compilations has stopped, without having to shut down and restart the IDE

Arduino IDE version

2.1.0

Operating system

Windows

Operating system version

10

Additional context

Compiling project for ESP32S3 using libraries GFX and LVGL

Issue checklist

  • I searched for previous reports in the issue tracker
    I verified the problem still occurs when using the latest nightly build
    My report contains all necessary details

Activity

self-assigned this
on Jun 1, 2023
removed their assignment
on Jun 1, 2023
per1234

per1234 commented on Jun 1, 2023

@per1234
Contributor

Hi @marcusobrien. Thanks for taking the time to submit an issue.

I believe this is caused by a bug in the Arduino CLI tool that handles the compilation for Arduino IDE: arduino/arduino-cli#2169

That bug has already been fixed in Arduino CLI, so the only work that remains is to update the version of Arduino CLI used by Arduino IDE, which is already in progress: #2083

If you would like, you can test that fix by downloading the tester build for #2083. There are instructions for doing that here:

https://github.com/arduino/arduino-ide/blob/main/docs/contributor-guide/beta-testing.md#testing-pull-requests

marcusobrien

marcusobrien commented on Jun 3, 2023

@marcusobrien
Author

Hi @per1234 - thanks for the info - I followed the instructions - but this doesnt fix my bug of control returning back to the Application

I downloaded and installed the Windows zip from this page
https://github.com/arduino/arduino-ide/actions/runs/5141327564

And I used this version (taken from the About Menu) - the 0.33.0 matches the above page version so its the right CLI I tested - just doesnt do anything different to what it did before - never terminates.

Version: 2.1.1-snapshot-f6453a1
Date: 2023-06-01T07:03:41.627Z
CLI Version: 0.33.0

Copyright © 2023 Arduino SA

added
topic: codeRelated to content of the project itself
and removed
topic: CLIRelated to Arduino CLI
on Jun 3, 2023
per1234

per1234 commented on Jun 5, 2023

@per1234
Contributor

Thanks so much for testing the potential fix and reporting your results. It is unfortunate the fault still occurs for you.

Does the problem of the IDE not returning to a usable state after compilation error occur for any sketch compiled for any board, or is it specific to the board and project you mentioned?:

Compiling project for ESP32S3 using libraries GFX and LVGL

For example, what happens if you select Tools > Board > Arduino AVR Boards > Arduino UNO from the Arduino IDE menus and then compile this sketch?:

void setup() {
  oops
}
void loop() {}
marcusobrien

marcusobrien commented on Jun 10, 2023

@marcusobrien
Author

Hi,

Using the simple project with the Uno as the target (but no real target is connected - so executing compile not upload from the GUI) , causes the IDE to fails to compile and then the compilation phase terminates excatly as expected (so the fauilt is not replicated in that simple project/sketch case).

I noticed on the instance of the IDE that is failing - the LVGL and ESP32S3, this session is complaining about the language server when I open the sketch. Then the compilation phase starts working ie it starts to build the project, then the link phase fails (due to undefined reference), then the toolchain never terminates (linker I presume ?).

If there is no board connected then the compialtion phase does terminate on my project also ie with ESP32 S3 and LVGL - so the problem is easier to reproduce when their is a target connected, so maybe its that ?

3 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: waiting for informationMore information must be provided before work can proceedtopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Compiler Never terminates if compilation error occurs · Issue #2085 · arduino/arduino-ide