IDE 2.04 for MAC Hangs During Compile

I keep running into this problem where the IDE hangs during a compile and never completes. The IDE needs to be terminated ignorer to recover.

Thanks

Kurt

Hi @ispybadguys. 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 which might provide a clue that eventually leads to a solution.


Please do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Check the box next to "Show verbose output during: ☐ compilation".
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait until you are sure the compilation has gone into the hang state
    (as indicated by no additional output being printed to the "Output" panel at the bottom of the IDE window).
  6. Right click on the black "Output" panel at the bottom of the Arduino IDE window.
  7. From the context menu, click Copy All.
  8. Open a forum reply here by clicking the Reply button.
  9. 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
  10. Press Ctrl+V.
    This will paste the compilation output into the code block.
  11. Move the cursor outside of the code tags before you add any additional text to your reply.
  12. Click the Reply button to post the output.

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
  6. 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.

Sorry it quit doing this.

I'm glad it is working now. thanks for taking the time to post an update.

Regards,
Per

Here is the hang. It always hangs at this point in the compile.

hang.txt (3.5 MB)

Please try this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Select "None" from the "Compiler warnings" menu.
  3. Uncheck the box next to Show verbose output during: compilation.
  4. Click the "OK" button.

Now try compiling your sketch again, just as you did before. Does the compilation still hang?

The reason behind this experiment is there is a known bug in Arduino IDE 2.1.0 that causes the compilation to hang sometimes when the compilation process produces a lot of output. If that is the cause of the hang you are experiencing, it should no longer occur after you reduce the quantity of output.

Thanks. That may have done it. I need a little more testing to be sure.

Kurt

OK, great. So if that bug was the cause of the hang then the good news is that the Arduino developers already fixed the bug. That fix was made after the time of the Arduino IDE 2.1.0 release, so Arduino IDE users are still affected by it, but it will definitely no longer be a problem when the next release of Arduino IDE comes out.

Until then, you can use the workaround of reducing the amount of compilation output. I went to the extreme with my instructions by turning off both the compiler warnings and the verbose output. I personally don't find the verbose compilation output to be valuable except when I'm troubleshooting a problem in Arduino IDE itself (not with my sketch) so I recommend leaving that setting off. But compiler warnings are very useful. So you might consider turning those back on in the preferences (e.g., changing the "Compiler warnings" preference from "None" to "All") and see whether having the verbose output alone turned off will be sufficient to avoid the hang.

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