Skip to content

IDE startup hangs due to folder-structure recursion in the sketch folder #381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
nielsnl68 opened this issue May 18, 2021 · 16 comments
Closed
3 tasks done
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@nielsnl68
Copy link

nielsnl68 commented May 18, 2021

Describe the problem

After starting i get the splashscreen and the window with a running wait icon.
nothing happens after this.

To reproduce

  1. Start Arduino IDE.
    No errors are found in the console.
  2. Try to open en skatch

🐛 it crashes with a message behind the splashscreen.

Expected behavior

That it at least removed the splashscreen and gives an overview of the workwindow.

Arduino IDE version

Not stated

Operating system

Windows

Operating system version

10

Additional context

It seems to have been introduced by 2.0.0-beta.3 or 2.0.0-beta.4


I run the latest version of Arduino IDE 1.18.5 as well.


I like to help out on finding what is happening. when someone can politely ask the right questions i will do what i can to updated this bug report

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
@NikilXYZ
Copy link

Have experienced a similar issue on Surface Go laptops and some older Acer laptop, Windows 10 (student computers).

Seems to hang on that splash screen

@NikilXYZ
Copy link

NikilXYZ commented May 18, 2021

For the record, the IDE opened fine for a couple of weeks and then all of a sudden started this freezing. Not sure what changed

@nielsnl68
Copy link
Author

Did you do an upgrade?
Which version did you use when it worked fine?

@NikilXYZ
Copy link

NikilXYZ commented May 18, 2021 via email

@kittaakos
Copy link
Contributor

3. when i try to open en skatch it crashes with a message behind the splashscreen.

Could you please start the IDE from a CMD.exe (instead of clicking on the application icon) and share the terminal output with us after the app crash? Thank you!

@nielsnl68
Copy link
Author

nielsnl68 commented May 20, 2021

Here is the output of the cmd line:

Starting backend process. PID: 17596
...
daemon INFO Error during sketch processing: Filesystem bottom is too deep (directory recursion or filesystem really deep): c:\...\Arduino\sketch_jan31a\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader
daemon ERROR Error during sketch processing: Filesystem bottom is too deep (directory recursion or filesystem really deep): c:\...\Arduino\sketch_jan31a\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader
root ERROR Uncaught Exception:
root ERROR Error: 13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: read ECONNRESET
    at Object.callErrorFromStatus (C:\...\AppData\Local\Programs\arduino-ide\resources\app\node_modules\@grpc\grpc-js\build\src\call.js:31:26)
    at Object.onReceiveStatus (C:\...\AppData\Local\Programs\arduino-ide\resources\app\node_modules\@grpc\grpc-js\build\src\client.js:387:49)
    at Object.onReceiveStatus (C:\...\AppData\Local\Programs\arduino-ide\resources\app\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:299:181)
    at C:\...\AppData\Local\Programs\arduino-ide\resources\app\node_modules\@grpc\grpc-js\build\src\call-stream.js:145:78
    at processTicksAndRejections (internal/process/task_queues.js:76:11)
daemon INFO Daemon exited with exit code: 1.

let of warning as i saw looking around. I hope it helps.

@kittaakos
Copy link
Contributor

Thank you! This is the problematic part from the logs:

daemon ERROR Error during sketch processing: Filesystem bottom is too deep (directory recursion or filesystem really deep): c:\Users\HP\Documents\Arduino\sketch_jan31a\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader\rfid-reader
root ERROR Uncaught Exception:

The IDE cannot start because there is a folder-structure recursion under: c:\Users\HP\Documents\Arduino\sketch_jan31a\rfid-reader\rfid-reader. If you know how to reproduce it, or if you remember what you did with the IDE, please share the steps so that someone can fix it.

always been on beta 2.0 v4

😕 Unfortunate. A recursion-related issue was fixed as part of 2.0.0-beta.4 the release.

I had the same issue previously on Windows, and there is a workaround. I had to wipe the corrupted folder structure manually. Unfortunately, I am not aware of any kind of solution other than deleting c:\Users\HP\Documents\Arduino\sketch_jan31a\rfid-reader\rfid-reader from your file system.

For me, it was tricky. Deleting the file recursion took forever on Windows. I tried with Explorer, CMD.EXE, and Total Commander. Finally, I ended up using Git Bash for deletion. If you use Git Bash, you have to do the followings to delete the folder recursively:

Please make sure to make a backup before you perform some unrecoverable deletion

rm -rf ~/Documents/Arduino/sketch_jan31a/rfid-reader/rfid-reader

@per1234, do you happen to know any other less invasive solution than rm -rf? Thank you!

@nielsnl68
Copy link
Author

nielsnl68 commented May 21, 2021

I had the same issue previously on Windows, and there is a workaround. I had to wipe the corrupted folder structure manually. Unfortunately, I am not aware of any kind of solution other than deleting c:\Users\HP\Documents\Arduino\sketch_jan31a\rfid-reader\rfid-reader from your file system.

For me, it was tricky. Deleting the file recursion took forever on Windows. I tried with Explorer, CMD.EXE, and Total Commander. Finally, I ended up using Git Bash for deletion. If you use Git Bash, you have to do the followings to delete the folder recursively:

Owww, i should have read the whole message, then i would not have taken so much time to try the same options. I managed to move the folder away from the Arduino skatch folder, after that arduino-ide started up again.

Please make sure to make a backup before you perform some unrecoverable deletion

rm -rf ~/Documents/Arduino/sketch_jan31a/rfid-reader/rfid-reader

@per1234, do you happen to know any other less invasive solution than rm -rf? Thank you!

Thanks for your help, sadly the rm -rf solution was not working for me. I'm getting a 'File name too long' message. So for me de damage is more serious, then yours.
I think

@nielsnl68 nielsnl68 changed the title V2 beta 4 and up, does not startup and is only showing the splashscreen Arduino-ide hangs on folder-structure recursion in the skatchbook folder introduced by Beta3 or Beta4 May 21, 2021
@nielsnl68
Copy link
Author

@dev's could you share the code that created this issue. Maybe it can be used to resolve the issue as well. when it can create so many sub-folders maybe it can delete them as well.

@kittaakos
Copy link
Contributor

I'm getting a 'File name too long' message.

Please share the entire error/output so that we can figure out what's wrong. Thanks!

@nielsnl68
Copy link
Author

noting much only a lot of \rfid-reader after i called rm -rf <recursingfolder> in the git bash as you suggested above. Btw. The error message is from rm -rf
So the number of recursion folders was just to much for rm.

@per1234
Copy link
Contributor

per1234 commented May 29, 2021

Hi all. I apologize for being so slow to respond. I had this same problem and also had trouble removing the deep folder structure.

I had resigned myself to having the folder as a permanent memento of my beta testing work then when I was providing support to someone on the forum who had the same problem it was mentioned that rm -rf with Git Bash had worked for them to remove it. Even though I had already tried it without success, I gave it another try and was pleasantly surprised to find that it worked. My hypothesis was that some process attempting to deal with the difficult folder structure had gone zombie and locked it. At some point after my initial attempts, I restarted my computer, which killed the process and unlocked the folder, allowing it to be deleted.

I just did some experiments and, after a few false starts when I was able to delete the folders normally without any problems, was finally able to reproduce the problem of the impossible to delete folder structure. I restarted my computer and sure enough I was then able to delete it.

So please restart your computer and then try another attempt at rm -rf @nielsnl68. After that, please let us know what the results are.

@Ho-Ro
Copy link

Ho-Ro commented Jun 25, 2021

This is the same behaviour as already mentioned in #351 (big directory structures with circular links exist in sketchbook directory).

@nielsnl68
Copy link
Author

True, at the time of posting, i did not know what the issue was. Later someone pointed me to that same issue.

Still waiting for a good solution from the Arduino-edi team, to fix this.

@Ho-Ro
Copy link

Ho-Ro commented Jun 25, 2021

Yes, it's nasty since I organize my documents and directories heavily with (criss-cross) softlinks.

@cmaglie cmaglie removed the type: bug label Sep 16, 2021
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@per1234 per1234 added the topic: code Related to content of the project itself label Oct 25, 2021
@per1234
Copy link
Contributor

per1234 commented Sep 22, 2022

Since we have not received any additional reports from users who were affected by #211 in over a year, I think this issue has served its purpose of documenting remediation measures. So I will close this.

We will track the need for the IDE to gracefully handle problematic sketchbook folder structures intentionally produced by the user in #351.

@per1234 per1234 closed this as completed Sep 22, 2022
@per1234 per1234 self-assigned this Sep 22, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Sep 22, 2022
@per1234 per1234 changed the title Arduino-ide hangs on folder-structure recursion in the skatchbook folder introduced by Beta3 or Beta4 IDE startup hangs due to folder-structure recursion in the sketch folder Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

7 participants