icestudio icon indicating copy to clipboard operation
icestudio copied to clipboard

bug: driver install silently fails in windows for iceSugar 1.5 board, (probably others) and instructions are wrong

Open rjstone opened this issue 6 months ago • 2 comments

Steps To Reproduce

This was using 0.12 stable. (I can get 'npm start' to work in the dev branch, and it also fails there, but the failure is different).

  1. Install 0.12 stable in windows.
  2. Select iceSugar 1.5 as the board (may be happening with all others, I didn't check)
  3. Tools->Drivers->Enable
  4. The instructions tell you to replace Interface 0 when the zadig window appears (but the actual interface number on the composite device for the iceSugar 1.5 board appears to be Interface 4).
  5. Click "OK"
  6. The UAC privilege elevation window appears asking for admin privs for "cmd.exe".
  7. Click "Yes" to allow admin execution.
  8. Nothing happens. The Zadig window never appears. cmd.exe seems to be trying to execute a bat file but I can't find the bat file for some reason. There's no diagnostic output logged.
  9. In 0.12 stable icestudio resumes normal operation after launching the cmd.exe, but using dev environment (npm start) in dev branch head, icestudio will go into "busy animation" with the UI disabled and not recover.
  10. cmd.exe on the bat file appears to just hang forever in the background.
  11. If I kill this and run Zadig manually, Zadig appears with no devices in its menu. I have to do "show all devices" to get the icelink composite device interfaces to appear.
  12. The proper interface appears to be Interface 4 (which gets installed using WinUSB by default).
  13. After changing this to libusbK, upload in icestudio "just works".

Expected behavior

  1. Dialog in icestudio shows the proper instructions (Interface 4, etc.), warns about UAC approval needed.
  2. If a bat file or other commands are being executed by icestudio, a console window should appear showing commands being executed and stdout/stderr so that diagnostic messages appear to the user. (Ideally this shouldn't be hidden, especially when it's still fragile.)
  3. Zadig window appears.
  4. Zadig menu contains the necessary USB device in its menu without needing to do "show all devices".
  5. Device description matches the instructions.

Actual behavior

  1. Instructions show Interface 0 rather than Interface 4. Don't warn about UAC approval.
  2. No console window (or indication of what icestudio is trying to do) appears.
  3. After approving UAC privilege elevation, nothing happens. No Zadiag window appears.
  4. cmd.exe appears to hang in the background forever.

Screenshots or video

Image

Image

Desktop (please complete the following information)

OS Name: Microsoft Windows 11 Pro OS Version: 10.0.26100 N/A Build 26100 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free

Web console trace

Not sure how to obtain this in nwjs.... Ah ok, ctrl-shift-I works. I'll see if I can get anything from this.

Additional context

Image

rjstone avatar Jun 09 '25 16:06 rjstone

Hi @rjstone ! i'm always build in linux box, i'll try to reproduce your tests and fix if something wrong. Tell you soon.

cavearr avatar Jun 09 '25 17:06 cavearr

Ok, np, I figured the windows build was shaky because development is primarily in linux which makes sense.

Ok, I tried this "driver enable" with the web dev console window open and no console messages.

Here is the process that's failing to show any result. This is using 0.12 stable. it looks like it doesn't hang but just quits immediately:

"133939620656168874","06-09-2025 10:01:05","MARS","rjstone","928780","cmd.exe","1","(0x1) Process launched","Parent icestudio.exe (892828)","C:\WINDOWS\system32\cmd.exe","C:\WINDOWS\system32\cmd.exe /d /s /c ""powershell.exe Start-Process -FilePath ""''R:\AppData\Local\Temp\52614423b4c11bf9a269d1defadbcd06\execute.bat''"" -WindowStyle hidden -Verb runAs"""

Unfortunately the tmp dir with execute.bat seems to get deleted before I can look at it so I can't tell what it's trying to do.

rjstone avatar Jun 09 '25 17:06 rjstone