IDE restarts while compiling sketch

When compiling the sample sketch LVGL_Arduino for LVGL version 9.2.2 with the ESP32 board package 2.0.17, the Arduino IDE restarts.

(I looked up the IDE and IDF requirements for LVGL version 9, but couldn't find a clear description, so I just went ahead and compiled it :sweat_smile:)

When this issue occurred, I was trying to combine LVGL v9 with a program that only works with 2.0.17.

I hope this helps...

I'm going to ask you to provide some additional information that might help us to identify the problem.


:red_exclamation_mark: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select Arduino IDE > Quit Arduino IDE from the Arduino IDE menus if it is running.
  2. Open macOS Launchpad.
  3. Type terminal in the "Search" field.
  4. Click on the "Terminal" icon.
    A "zsh" window will open.
  5. Type the following command in the zsh window:
    "/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE"
    
  6. Press the Enter key
  7. Wait for Arduino IDE to finish starting.
  8. Compile the "LVGL_Arduino" sketch, just as you did before.
  9. Wait for Arduino IDE to restart.
  10. Switch back to the Terminal window.
  11. Press the Command+A keyboard shortcut.
    This will select all the text in the Terminal window.
  12. Press the Command+C keyboard shortcut.
    This will copy the selected text to the clipboard.
  13. Open a forum reply here by clicking the "Reply" button.
  14. 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 output is correctly formatted.
  15. Press the Command+V keyboard shortcut.
    This will paste the output into the code block.
  16. Move the cursor outside of the code block markup before you add any additional text to your reply.
  17. Click the "Reply" button to post the output.

Please let me know if you have any questions or problems while following those instructions.

My report is as follows.

Test environment

Test procedure

  1. Clear the cache in /Users/{username}/Library/Caches/arduino/sketches/.
  2. Open the terminal, and exec "/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE".
  3. Execute "Verify" with "v" button on the IDE.
  4. After restart the IDE, copy all the text in the terminal window ("LOG1")
  5. Close the terminal window, and open a new one.
  6. Execute "/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE" again.
  7. Again, execute "Verify" with "v" button on the IDE.
  8. At this time, the IDE did not restart after finishing the verify. So I quit the IDE and copy all the text in the terminal window ("LOG2").

Logs

Note: I tried to paste the logs and post them, but I couldn't because of the character limit. Therefore, I'm attaching a text file. (LVGL compiles so many files :sweat_smile:)

LOG1.txt (830.8 KB)
LOG2.txt (109.3 KB)

I hope these could help you.
Thanks again!

This looks like the relevant part:

time="2025-04-05T11:45:47+09:00" level=info msg="Adding libraries dir" dir=/Users/{username}/Documents/Arduino/libraries isSingleLibrary=false location=user
2025-04-05T02:48:22.220Z root INFO socked closed
2025-04-05T02:48:22.220Z root INFO closing connection for 1
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/localization-server'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/os'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/commands'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/keyboard'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/logger'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/messageService'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/ChannelCloseService'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/remote-filesystem'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/envs'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/authentication-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/sketches-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/config-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/workspace'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/notification-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/arduino-daemon'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/stopwatch'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/application'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/i18n'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/quickInput'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/debug'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/shell-terminal'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/quickPick'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/task'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/search'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/hostedPlugin'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/plugin-ext'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/plugin-paths'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/cli-preferences'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/boards-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/response-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/file-system-ext'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/core-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/example-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/library-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/executable-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/arduino-firmware-uploader'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/formatter'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/search-in-workspace'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/request-service'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/keyStore'.
2025-04-05T02:48:22.220Z root INFO Closing channel on service path '/services/languagePackService'.
2025-04-05T02:48:22.224Z root ERROR Uncaught Exception:  Error: transport error
2025-04-05T02:48:22.224Z root ERROR Error: transport error
    at /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:521775
    at Map.forEach (<anonymous>)
    at /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:521754
    at /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:6419512
    at s.invoke (/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:6419602)
    at a.fire (/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:6421405)
    at /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:1868407
    at Map.forEach (<anonymous>)
    at Object.<anonymous> (/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:1868377)
    at e.dispose (/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:4849531)
2025-04-05T02:48:22.225Z root ERROR Uncaught Exception:  Error: transport error
2025-04-05T02:48:22.226Z root ERROR Error: transport error
    at /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:521775
    at Map.forEach (<anonymous>)
    at /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:521754
    at /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:6419512
    at s.invoke (/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:6419602)
    at a.fire (/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:6421405)
    at /Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:1868407
    at Map.forEach (<anonymous>)
    at Object.<anonymous> (/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:1868377)
    at e.dispose (/Applications/Arduino IDE.app/Contents/Resources/app/lib/backend/main.js:2:4849531)

Unfortunately I was not able to reproduce the fault, but another user submitted a formal bug report about this problem, so it is now being tracked by the Arduino IDE developers:

Hello again @embeddedkiddie.

Per our conversation in your recent topic, I see that you were only ever able to work around this fault by using version 2.3.4 of Arduino IDE:

In the interest of helping you to update to the latest compatible Arduino IDE version 2.3.8, I'll suggest another technique for investigating this problem. The technique I have in mind is to compile the problematic sketch using a command line tool named Arduino CLI. This is an official tool created by Arduino. It is the tool that actually performs the sketch compilation for Arduino IDE under the hood. If you can reproduce the same fault when compiling the sketch using Arduino CLI directly, then it is possible it will produce some more informative output that will give us a clue about what specifically is going wrong.

I'll provide instructions you can follow to do that:

  1. Click the following link to download the version of Arduino CLI used by Arduino IDE 2.3.8:
    https://downloads.arduino.cc/arduino-cli/arduino-cli_1.4.1_macOS_64bit.tar.gz
    Your web browser will start a file download.
  2. Wait for the download to finish.
  3. Extract the downloaded arduino-cli_1.4.1_macOS_64bit.tar.gz file.
  4. Control-click on the extracted arduino-cli_1.4.1_macOS_64bit folder.
    A context menu will open.
  5. Select "New Terminal at Folder" from the menu.
    A "Terminal" window will open.
  6. Type the following command in the Terminal window:
    ./arduino-cli compile --fqbn esp32:esp32:esp32 --verbose "<sketch path>"
    
  7. Replace the <sketch path> placeholder in the command with the path to the problematic LVGL sketch on your hard drive.
  8. Press the Enter key.
  9. You should now see output printed to the Terminal window as a sketch compilation operation proceeds. Wait until the process finishes, as indicated by the output, and by the reappearance of the % shell prompt at the line following the end of the output.
  10. Press the Command+A keyboard shortcut.
    This will select all the text in the Terminal window.
  11. Press the Command+C keyboard shortcut.
    This will copy the selected text to the clipboard.
  12. Open a reply here on this forum topic by clicking the "Reply" button.
  13. 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 output is correctly formatted.
  14. Press the Command+V keyboard shortcut.
    This will paste the output into the code block.
  15. Move the cursor outside of the code block markup before you add any additional text to your reply.
  16. Click the "Reply" button to publish the post.

Hi @ptillisch,

Thank you very much for conducting the follow-up investigation.

At this point, I suspect that an unexpected error occurred in gcc or g++, causing the IDE to hang-up.

I've never used the Arduino CLI before, so it might take some time, but I'd like to investigate further.

I will provide feedback on the results in this thread.

Thank you again!