2.3.6 hangs Ubuntu

I have installed 2.3.6 on Ubuntu.
When trying to open the recent Marlin.ino it freezes the system.
My impression is that this is because arduino tries to open ALL related files (al LOT!) as tabs in the editor. This was not the case with older versions of the ide.
Is there a way to have the 2.3.6 ide NOT open all files by default?

Normal operation is to open all files in the project folder. If you don't want them opened, place them in a folder BUT I don't know if the compile will be correct.

In your case, what do you mean by

Unless you have a bizarre case of several thousands of files, opening additional files in the tabs takes a fraction of a second per file.

Hi @wolfgang6444.

Please explain exactly what you mean by "recent". It is true that there is a known problem using older versions of Marlin with Arduino IDE 2.x. However, that problem does not occur with Marlin versions 2.0.0 and newer.

Marlin 2.0.0 was released six years ago, so it would be quite odd to call one of the Marlin 1.x versions "recent".

Arduino IDE always opens the code files from the root of the sketch. There are only four code files in the root of the Marlin 2.x sketch, so that is no problem. All the other hundreds of files in Marlin are under the src subfolder of the sketch. Arduino IDE does not automatically open the code files from subfolders of the sketch (it only opens them on demand), so those files don't have any impact on opening the sketch in Arduino IDE.

Many thanks for the replies!
I am trying to open
Marlin-2-0-x-Anycubic-i3-MEGA-S-master

Knutwurst's i3 MEGA M/S/P/X/Chiron/4MP2 Hybrid Firmware
(based on Marlin 2.1.x)

This opens and compiles fine with arduino-1.8.19
but when trying to open with arduino-ide_2.3.6_Linux_64bit
this eventually freezes the entire PC (not even ssh is possible any longer)
arduino-ide_2.3.6_Linux_64bit works fine for other, smaller projects.

The main difference I realize is, that arduino-1.8.19 only opens a few files, while
arduino-ide_2.3.6 tries to open a lot of source and include files in the editor and eventually hangs - long before I can even try to start compilation. So my impression was this is related ...

I am on Ubuntu 24.04.3 LTS (Noble Numbat)
Wolfgang

No experience with Marlin so I don't know anything about configurations.

Is this the library: https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S?

Which file do you try to open?

Using IDE 2.3.6 on Win11, when opening C:\Users\bugge\Downloads\ArduinoLibs\Marlin-2-0-x-Anycubic-i3-MEGA-S-master.zip\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin\Marlin.ino it only opens 4 files. [edit]see correction in post #8[/edit]

Can you provide the steps that you took and which file you tried to open?

===

PS
It does not compile for a Mega with plenty of errors (in white ??) like below. Might be because I have an invalid board selected or I don't don't have Marlin configured properly

Detecting libraries used...
C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\bugge\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\bugge\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega C:\Users\bugge\AppData\Local\arduino\sketches\33EC3CD28C304844DE637B682B1C860F\sketch\Marlin.ino.cpp -o nul
C:\Users\bugge\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\bugge\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\bugge\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega C:\Users\bugge\AppData\Local\arduino\sketches\33EC3CD28C304844DE637B682B1C860F\sketch\src\HAL\AVR\HAL.cpp -o nul
Error while detecting libraries included by C:\Users\bugge\AppData\Local\arduino\sketches\33EC3CD28C304844DE637B682B1C860F\sketch\src\HAL\AVR\HAL.cpp

And other warnings / errors; the last part of the output

:\Users\bugge\Downloads\ArduinoLibs\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin\src\inc\SanityCheck.h:3301:1: error: static assertion failed: DEFAULT_MAX_ACCELERATION requires X Y Z E elements.
 static_assert(COUNT(sanity_arr_3) >= LOGICAL_AXES,  "DEFAULT_MAX_ACCELERATION requires " _LOGICAL_AXES_STR "elements.");
 ^~~~~~~~~~~~~
C:\Users\bugge\Downloads\ArduinoLibs\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin\src\inc\SanityCheck.h:3303:1: error: non-constant condition for static assertion
 static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive.");
 ^~~~~~~~~~~~~
C:\Users\bugge\Downloads\ArduinoLibs\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin\src\inc\SanityCheck.h:3306:36: error: 'HOMING_FEEDRATE_MM_M' was not declared in this scope
   constexpr float sanity_arr_4[] = HOMING_FEEDRATE_MM_M;
                                    ^~~~~~~~~~~~~~~~~~~~
C:\Users\bugge\Downloads\ArduinoLibs\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin\src\inc\SanityCheck.h:3306:36: note: suggested alternative: 'HOMING_BUMP_MM'
   constexpr float sanity_arr_4[] = HOMING_FEEDRATE_MM_M;
                                    ^~~~~~~~~~~~~~~~~~~~
                                    HOMING_BUMP_MM
C:\Users\bugge\Downloads\ArduinoLibs\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin\src\inc\SanityCheck.h:3307:3: error: static assertion failed: HOMING_FEEDRATE_MM_M requires X Y Z elements (and no others).
   static_assert(COUNT(sanity_arr_4) == NUM_AXES,  "HOMING_FEEDRATE_MM_M requires " _NUM_AXES_STR "elements (and no others).");
   ^~~~~~~~~~~~~
C:\Users\bugge\Downloads\ArduinoLibs\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin\src\inc\SanityCheck.h:3308:3: error: non-constant condition for static assertion
   static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
   ^~~~~~~~~~~~~
exit status 1

Compilation error: #error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."
1 Like

Yes,
that should be the project.
I am trying to open Marlin/Marlin.ino

Does the IDE show the four files and then hangs? Or don't you see anything in tabs? Or does it try to open more files than those four?

Or does your problem start when you try to compile?

PS
I see that there was a mistake in my previous post; what I opened is C:\Users\bugge\Downloads\ArduinoLibs\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin-2-0-x-Anycubic-i3-MEGA-S-master\Marlin\Marlin.ino and not the ino in the zip.

After selecting Marlin.ino arduino-ide 2.3.6 starts to open one file after another opening a new tab for each. This continues for some time but then the pc freezes in the process - way before I could think of compiling. This is why I think it is releated to the ide trying to open too may files at the same time in the editor.

Which version did you install?

  1. AppImage from https://www.arduino.cc/en/software/
  2. Zip from https://www.arduino.cc/en/software/
  3. Unknown from the package manager

I've tried both the AppImage and an extracted ZIP (1 and 2 above) and both only open 4 files. Operating system some version of Fedora; not really actively using Linux at this moment.

That's strange.
I have installed the .zip file.
What is controlling which files the ide is opening?

In that case I can unfortunately not help further.

When it does that, are there more than the four tabs shown in the screenshot @sterretje shared in post #6?

Arduino IDE always opens all the code files that are present in the root of the sketch folder. You can see those files here:

You can also manually open arbitrary additional files by either of two mechanisms:

  • Double clicking on files from subfolders of the sketch in Arduino IDE's "Sketchbook" panel (dependent on having the "Show files inside Sketches" preference enabled)
  • Using the "Go to Definition" feature on a reference to an object from an additional file.

Arduino IDE will remember which additional files you had open manually at the time you last closed a given sketch and will reopen those files the next time you open that sketch again.