Skip to content
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

IDE fails to open on a RAM drive, stalls at white window and busy spinner #1236

Open
3 tasks done
Defragster opened this issue Jul 21, 2022 · 20 comments
Open
3 tasks done
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@Defragster
Copy link

Defragster commented Jul 21, 2022

Describe the problem

When I start Arduino IDE, the window and title bar appear, but it remains forever on the splash screen/loading animation.

To reproduce

  1. Unzip arduino-ide_2.0.0-rc9_Windows_64bit.zip to empty folder.
  2. Start Arduino IDE.

🐛 Startup hangs forever at the loading animation.

  1. Install arduino-ide_2.0.0-rc9_Windows_64bit.msi
  2. Start Arduino IDE.

🐛 Startup hangs forever at the loading animation.

Expected behavior

Expected either the IDE to appear like early nightly builds did Jan/Feb, or present some error messages or feedback as to the nature of some problem with startup.

Arduino IDE version

Original report

2.0.0-rc9

Last verified with

76f9f63 (reference)

Operating system

Windows

Operating system version

Windows 11 : Microsoft Windows [Version 10.0.22000.739]

Additional context

Attempts to resolve noted here:

https://forum.pjrc.com/threads/53548-Arduino-CLI-And-IDE-2-RC-Release-Teensy-Support?p=309665&viewfull=1#post309665

(see posts 270 and 274)


Removed %appdata% folder local\arduino15 and the two in roaming and no difference.


I configured my security software to avoid it interfering with Arduino IDE:

Arduino IDE ZIP package is 'unblocked' so extracted files are not marked 'Blocked'.

Folder is in an excluded 'scan' folder for MalwareBytes.

Windows Defender also active, added exclusion.


Machine has been restarted as needed to allow removal of indicated folders and behavior persists.


The fault occurs with the MSI and ZIP packages of Arduino IDE


The fault still occurs after deleting the Arduino15 folder.


Not aware of anything else that may be present on the system causing this.

Running the EXE from the ZIP in an ADMIN command box I get this:

C:\T_Drive\ardIDE_2>"Arduino IDE.exe"

C:\T_Drive\ardIDE_2>
Starting backend process. PID: 13200
Using browser-only version of superagent in non-browser environment
Error: EISDIR: illegal operation on a directory, realpath 'R:\Temp'
    at Function.realpathSync.native (node:fs:2540:3)
    at Function.native (node:electron/js2c/asar_bundle:5:4819)
    at new SketchesServiceImpl (C:\T_Drive\ardIDE_2\resources\app\node_modules\arduino-ide-extension\lib\node\sketches-service-impl.js:48:51)
    at _createInstance (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\instantiation.js:27:12)
    at Object.resolveInstance (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\instantiation.js:47:18)
    at C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\resolver.js:75:42
    at Object.resolve (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\resolver.js:99:12)
    at C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\container\container.js:335:37
    at Container._get (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\container\container.js:326:44)
    at Container.get (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\container\container.js:243:21) {
  errno: -4068,
  syscall: 'realpath',
  code: 'EISDIR',
  path: 'R:\\Temp'
}
Configuration directory URI: 'file:///c%3A/Users/Tim/.theia'
Theia app listening on http://localhost:56933.
root INFO Finished starting backend application: 4.1 ms [Finished 1.286 s after backend start]
[30924:0720/231630.034:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is disabled, ANGLE is
Stored workspaces roots:

C:\T_Drive\ardIDE_2>

The fault does not occur when using Arduino IDE 1.8.19 + Teensyduino 1.57b4.


Related discussion:

https://forum.pjrc.com/threads/70455-Teensyduino-1-57-Beta-3?p=309464&viewfull=1#post309464

(see posts 33, 36, 38)


Possibly related:

nodejs/node#6861

Additional reports

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
@Defragster Defragster added the type: imperfection Perceived defect in any part of project label Jul 21, 2022
@per1234
Copy link
Contributor

per1234 commented Jul 21, 2022

Hi @Defragster. Thanks for your report.

Error: EISDIR: illegal operation on a directory, realpath 'R:\Temp'

Is there anything special about this R:\ drive? I see we had a previous report of this error here: #1117 (and another here: https://forum.arduino.cc/t/arduino-ide-2-rc7-stalls-on-windows-11-system/1002172). In that case, the temporary folder was on a virtual disk. Is that the case on your system?

@per1234 per1234 self-assigned this Jul 21, 2022
@per1234 per1234 added topic: code Related to content of the project itself status: waiting for information More information must be provided before work can proceed labels Jul 21, 2022
@Defragster
Copy link
Author

Yes, the R: drive is a RAM_DRIVE
remdrive

I missed reading that in #1117. Odd thing, IIRC, that was active when I ran the Jan/Feb nightly builds. The IMG for that drive was created 9/12/2021.

So reading that now, this seems like a duplicate.

@Defragster
Copy link
Author

Defragster commented Jul 21, 2022

And it is the same ImDisk software it seems as well:

To reproduce
Imdisk Toolkit utility, create a virtual disk in memory and specify the TEMP folder on it

Disk path is: R:\TEMP
When I did the install and looked at the time stamps for file created at that time - there seemed to be bunch of zero size.

And Windows 'CMD' SET shows:
TEMP=R:\Temp
TMP=R:\Temp

Edit and restart to have all 'case' as R:\TEMP, did not help: Behavior the same.

Also removed "%systemroot%" that was preceding the one set of ImDisk entries.
Here are the 'before' settings:

remdrive2

@per1234 per1234 mentioned this issue Jul 21, 2022
3 tasks
@per1234 per1234 removed the status: waiting for information More information must be provided before work can proceed label Jul 21, 2022
@per1234 per1234 assigned kittaakos and unassigned per1234 Jul 21, 2022
@kittaakos
Copy link
Contributor

It seems to be a generic problem with this tool: nodejs/node#6861 (comment)

@Defragster
Copy link
Author

Saw a review of alternate ramdrives, going to use OSFMount instead for a test. Will update.

Odd thing is that a month and more back IMDisk worked fine with IDE 2.0 (based on #1117), unless Windows Updated some internal element across both Win 10 and 11 - would take setting up an older IDE 2 (I used in Feb) to confirm.

@Defragster
Copy link
Author

Defragster commented Jul 21, 2022

Confirmed using: arduino-ide_nightly-20220128_Windows_64bit.zip

unzipped to fresh directory and running: "Arduino IDE.exe" does NOT exhibit the issues in starting the IDE 2
IDE started and proceeded with 'first run' permission popups and other initial operations, RC9 never gets this far.
This Jan 28 version ran before and it runs today, so it is not a system change.
This run was done with below indicated OFSMount as it is active, and below it fails on RC9

Reverted to IMDisk RamDrive since it will 'start on boot'. Running RC9 again hangs, so it isn't an issue of 'first run'

Using: https://www.osforensics.com/tools/mount-disk-images.html#Overview

that is a PassMark free tool that allows image mounting for test/forensic purposes

Moved the IMDisk RAM drive to Z: and mounted NTFS image file it uses as R:
IMDisk provide Mount of boot, I don't see that for OFSMount, so attempted start of IDE2 RC9

Same behavior - no progress beyond showing title bar'd window with busy wait spinner

Only two files appeared on the R:drive - size never indicated anything but zero:

07/21/2022  02:59 PM                 0 07b6972f-598b-44fd-945b-b141e335593b.tmp
07/21/2022  02:59 PM                 0 cd2aa5bc-6e34-4911-bc4d-1f25ae195be2.tmp

Starting from "CMD" box the output is similar to prior, with issue noted for R: Path:

C:\T_Drive\ardIDE_2>
Starting backend process. PID: 8920
Using browser-only version of superagent in non-browser environment
Error: EISDIR: illegal operation on a directory, realpath 'R:\TEMP'
    at Function.realpathSync.native (node:fs:2540:3)
    at Function.native (node:electron/js2c/asar_bundle:5:4819)
    at new SketchesServiceImpl (C:\T_Drive\ardIDE_2\resources\app\node_modules\arduino-ide-extension\lib\node\sketches-service-impl.js:48:51)
    at _createInstance (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\instantiation.js:27:12)
    at Object.resolveInstance (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\instantiation.js:47:18)
    at C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\resolver.js:75:42
    at Object.resolve (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\resolution\resolver.js:99:12)
    at C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\container\container.js:335:37
    at Container._get (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\container\container.js:326:44)
    at Container.get (C:\T_Drive\ardIDE_2\resources\app\node_modules\inversify\lib\container\container.js:243:21) {
  errno: -4068,
  syscall: 'realpath',
  code: 'EISDIR',
  path: 'R:\\TEMP'
}
Configuration directory URI: 'file:///c%3A/Users/Tim/.theia'
Theia app listening on http://localhost:61520.
root INFO Finished starting backend application: 4.7 ms [Finished 1.728 s after backend start]
[21272:0721/150110.831:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is disabled, ANGLE is
Stored workspaces roots:

@kittaakos kittaakos changed the title RC9 fails to open, stalls at white window and busy spinner RC9 fails to open on a RAM drive, stalls at white window and busy spinner Aug 2, 2022
@Defragster

This comment was marked as off-topic.

@per1234

This comment was marked as off-topic.

@per1234 per1234 changed the title RC9 fails to open on a RAM drive, stalls at white window and busy spinner IDE fails to open on a RAM drive, stalls at white window and busy spinner Sep 6, 2022
@Defragster

This comment was marked as off-topic.

@Defragster

This comment was marked as off-topic.

@per1234

This comment was marked as off-topic.

@Defragster

This comment was marked as off-topic.

@vtsoftware
Copy link

I also put the temp directory on a ramdisk,
it started for me after starting it with the following command:
set TEMP=D:\arduinoide2\temp&& ArduinoIDE.exe
(Do not put a space before "&&"! XD)

It works for me as a temporary solution.

@kittaakos
Copy link
Contributor

kittaakos commented Nov 3, 2022

I have installed ImDisk 20220826 on Windows 10 Pro (21H2), and it works. Here is my setup.

imdisk_version

The TEMP variable must be configured. Otherwise, IDE2 cannot create temp (Unsaved) sketches.

set_temp_01

I have configured the TEMP variable like this:

set_temp_02

And IDE2 2.0.1 starts and runs without an issue on my private Windows env:

r:\ide 2>"Arduino IDE.exe"

r:\ide 2>
Arduino IDE 2.0.1
Starting backend process. PID: 18860
[...]

However, when I try to compile the sketch for MKR1000, I have the following error:

No connection established

Compilation error: No connection established

error_ramdrive

Probably related: arduino/arduino-cli#1970

CLI panic:

daemon INFO panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x10 pc=0xc1ca1d]

goroutine 168 [running]:

daemon INFO github.com/arduino/go-properties-orderedmap.(*Map).Merge(0x0, {0xc007525658, 0x1, 0x0})
        /go/pkg/mod/github.com/arduino/go-properties-orderedmap@v1.6.0/properties.go:443 +0x3d
github.com/arduino/go-properties-orderedmap.(*Map).Clone(...)
        /go/pkg/mod/github.com/arduino/go-properties-orderedmap@v1.6.0/properties.go:477
github.com/arduino/arduino-cli/arduino/cores.(*Board).GetBuildProperties(0xc006675ec0, 0xc00751c090)
        /home/build/arduino/cores/board.go:119 +0xd5
github.com/arduino/arduino-cli/arduino/cores/packagemanager.(*Explorer).ResolveFQBN(0xc000122000, 0xc004d66240)
        /home/build/arduino/cores/packagemanager/package_manager.go:291 +0x105
github.com/arduino/arduino-cli/commands/lib.LibraryList({0x92b225, 0x12e4b60}, 0xc0054640c0)
        /home/build/commands/lib/list.go:57 +0x24a
github.com/arduino/arduino-cli/commands/daemon.(*ArduinoCoreServerImpl).LibraryList(0x12af5c0, {0x1596e10, 0xc00751c000}, 0x924348)
        /home/build/commands/daemon/daemon.go:467 +0x2c
github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1._ArduinoCoreService_LibraryList_Handler({0x12f93e0, 0xc000092420}, {0x1596e10, 0xc00751c000}, 0xc005464000, 0x0)
        /home/build/rpc/cc/arduino/cli/commands/v1/commands_grpc.pb.go:2051 +0x173
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000da000, {0x15a98f8, 0xc0000f6000}, 0xc0009879e0, 0xc0000a6b70, 0x1be9338, 0x0)
        /go/pkg/mod/google.golang.org/grpc@v1.38.0/server.go:1286 +0xc8f
google.golang.org/grpc.(*Server).handleStream(0xc0000da000, {0x15a98f8, 0xc0000f6000}, 0xc0009879e0, 0x0)
        /go/pkg/mod/google.golang.org/grpc@v1.38.0/server.go:1609 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        /go/pkg/mod/google.golang.org/grpc@v1.38.0/server.go:934 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        /go/pkg/mod/google.golang.org/grpc@v1.38.0/server.go:932 +0x294

discovery-log INFO error received
discovery-log ERROR Unexpected error occurred during the boards discovery.
discovery-log INFO received end
root ERROR Request getBoardUserFields failed with error: 14 UNAVAILABLE: read ECONNRESET
root ERROR Request list failed with error: 14 UNAVAILABLE: read ECONNRESET
root ERROR Request getBoardDetails failed with error: 14 UNAVAILABLE: read ECONNRESET
root ERROR Request search failed with error: 14 UNAVAILABLE: read ECONNRESET
root ERROR Request installed failed with error: 14 UNAVAILABLE: read ECONNRESET
root ERROR Request getInstalledBoards failed with error: 14 UNAVAILABLE: read ECONNRESET
daemon INFO Daemon exited with exit code: 2.
root ERROR Request getBoardDetails failed with error: 14 UNAVAILABLE: No connection established
root INFO Failed to start language server for arduino:samd:mkr1000
root ERROR Have not received the build path from the CLI while running the compilation.

CC: @cmaglie


Update: I wiped directories.user and re-installed the core for MKR1000, compile works now. Upload does not:

CLI daemon log:

TRAC[0039] Compile sketch_nov3a for arduino:samd:mkr1000 successful

daemon INFO DEBU[0039] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0039] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0039] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0040] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0040] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0040] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0040] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0041] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0041] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0041] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0041] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0042] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0042] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0042] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0042] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0043] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0043] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0043] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0043] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0044] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0044] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0044] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0044] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0045] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0045] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0045] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0045] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0046] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0046] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0046] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0046] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO DEBU[0047] WAIT: map[COM3:true COM4:true]                phase="board reset"

daemon INFO INFO[0047] No upload port found, using address:"COM3" label:"COM3" protocol:"serial" protocol_label:"Serial Port (USB)" properties:{key:"pid" value:"0x004E"} properties:{key:"serialNumber" value:""} properties:{key:"vid" value:"0x2341"} as fallback  phase="board reset"

daemon INFO TRAC[0047] Executing upload tool: "C:\Users\kittaakos\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3/bossac.exe" -i -d --port=COM3 -U true -i -e -w -v "C:\Users\kittaakos\AppData\Local\Temp\arduino-sketch-1D02DDB836711A73786B388A527EB558/sketch_nov3a.ino.bin" -R  phase=upload

Output:

Waiting for upload port...
No upload port found, using address:"COM3" label:"COM3" protocol:"serial" protocol_label:"Serial Port (USB)" properties:{key:"pid" value:"0x004E"} properties:{key:"serialNumber" value:""} properties:{key:"vid" value:"0x2341"} as fallback
No device found on COM3
"C:\Users\kittaakos\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3/bossac.exe" -i -d --port=COM3 -U true -i -e -w -v "C:\Users\kittaakos\AppData\Local\Temp\arduino-sketch-1D02DDB836711A73786B388A527EB558/sketch_nov3a.ino.bin" -R
Failed uploading: uploading error: exit status 1

When I make a board list from IDE2, it cannot see the ports although the board is attached:

no_ports

When I execute the same command from a CMD.exe, the CLI can see the ports:


R:\ide 2>"resources\\app\\node_modules\\arduino-ide-extension\\build\\arduino-cli.exe" version
arduino-cli.exe  Version: 0.28.0 Commit: 06fb1909 Date: 2022-10-20T08:42:15Z

R:\ide 2>"resources\\app\\node_modules\\arduino-ide-extension\\build\\arduino-cli.exe" board list --format json
[
  {
    "matching_boards": [
      {
        "name": "Arduino MKR1000",
        "fqbn": "arduino:samd:mkr1000"
      }
    ],
    "port": {
      "address": "COM3",
      "label": "COM3",
      "protocol": "serial",
      "protocol_label": "Serial Port (USB)",
      "properties": {
        "pid": "0x004E",
        "serialNumber": "",
        "vid": "0x2341"
      }
    }
  },
  {
    "port": {
      "address": "COM4",
      "label": "COM4",
      "protocol": "serial",
      "protocol_label": "Serial Port (USB)",
      "properties": {
        "pid": "0x0ACA",
        "serialNumber": "05022016",
        "vid": "0x8087"
      }
    }
  }
]

R:\ide 2>

@Meneth32
Copy link

I've found a hack to bypass this problem. Add this line to the end of resources/app/node_modules/fs.realpath/index.js:
fs.realpathSync.native = origRealpathSync
This modification must be reapplied after each IDE version update.

@kilrah

This comment was marked as spam.

@egi1965
Copy link

egi1965 commented Jul 31, 2023

Installed IDE 2.1.1
Applied above patch, still the same issue:
Screenshot 2023-07-31 135051

PS C:\Program Files\Arduino IDE>
Failed to start the electron application.
Error: EISDIR: illegal operation on a directory, realpath 'R:\Temp'
    at Function.realpathSync.native (node:fs:2540:3)
    at Function.native (node:electron/js2c/asar_bundle:5:4819)
    at new IsTempSketch (C:\Program Files\Arduino IDE\resources\app\node_modules\arduino-ide-extension\lib\node\is-temp-sketch.js:25:51)
    at Object.resolveInstance (C:\Program Files\Arduino IDE\resources\app\node_modules\inversify\lib\resolution\instantiation.js:51:18)
    at C:\Program Files\Arduino IDE\resources\app\node_modules\inversify\lib\resolution\resolver.js:75:42
    at Array.map (<anonymous>)
    at _injectProperties (C:\Program Files\Arduino IDE\resources\app\node_modules\inversify\lib\resolution\instantiation.js:17:57)
    at Object.resolveInstance (C:\Program Files\Arduino IDE\resources\app\node_modules\inversify\lib\resolution\instantiation.js:48:18)
    at C:\Program Files\Arduino IDE\resources\app\node_modules\inversify\lib\resolution\resolver.js:75:42
    at Object.resolve (C:\Program Files\Arduino IDE\resources\app\node_modules\inversify\lib\resolution\resolver.js:99:12) {
  errno: -4068,
  syscall: 'realpath',
  code: 'EISDIR',
  path: 'R:\\Temp'
}

@rick65134
Copy link

I've found a hack to bypass this problem. Add this line to the end of resources/app/node_modules/fs.realpath/index.js: fs.realpathSync.native = origRealpathSync This modification must be reapplied after each IDE version update.

This approach goes a step further, but still gets stuck somewhere.
After doing the same for "fs.realpath.native", IDE 2.1.1 can successfully open.
image

@egi1965

This comment was marked as off-topic.

@egi1965

This comment was marked as off-topic.

@arduino arduino locked as too heated and limited conversation to collaborators Aug 9, 2023
@kittaakos kittaakos removed their assignment Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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

8 participants