XorTroll / Goldleaf

🍂 Multipurpose homebrew tool for Nintendo Switch
GNU General Public License v3.0
2.65k stars 349 forks source link

Freezing UI and transfer when installing over USB #347

Closed Shadowghost closed 5 years ago

Shadowghost commented 5 years ago

Freezing UI and transfer when installing over USB

Bug description

While installing a larger NSP via USB the UI freezes randomly. Not sure if that's relevant but the NSPs are stored on an external drive. When processing the NCA the progress bar stops at a random point and the UI freezes (clock on top right freezes). When disconnecting the USB cable, the display gets updated and shows several other NCAs getting installed and after that the progress bar stops randomly. If I press + now, the screen goes black and when pressing + again it flashes the actual goldleaf screen and get's black when releasing +. The only way to get out is pressing the home button. Goldtree does not show anything, but once the screen freezes no ReadFile commands are written to the log.

Your setup

Bug reproduction

No idea. Using Windows 10 x64 build 1903 and installing a nsp >1.5GB with multiple NCAs?

ghost commented 5 years ago

Mine also. Once the green bar reaches end it freezes still at "writing content 'x...x'...(20mb/s)".

My setup Console firmware: 7.0.0

CFW with version: Atmosphére 0.9.3 (booted with hekate-chainload)

Goldleaf version: 0.6.1

Goldtree version: 0.6.1

Bendito999 commented 5 years ago

My setup also does the exact same thing as well. I am in emuMMC. This can be reproduced on some large titles, though sometimes it seems to work also so not quite sure what is going on. Console firmware: 4.1.0

CFW with version: Kosmos/Atmosphere 0.9.2 (booted with hekate 5.0.1)

Goldleaf version: 0.6.1

Goldtree version: 0.6.1 In addition on mine I get "The Home menu can't be used right now" so it is difficult to exit out. However if I put it to Sleep with the power button then awake it with the home button from there, I can successfully get to the home menu to force out the app and restart it. At this point the NSP does seem installed and playable, but its kind of annoying though to only be able to install 1 app at a time before Goldleaf crashes and I have to relaunch it like that.

XorTroll commented 5 years ago

This must be some kind of bad USB connection (my own USB cable works when it wants to, so sometimes connection hangs).

In the testing of Goldleaf we do test both big and small NSPs and both worked, so I'm going to assume this must be a bad cable or connection

Shadowghost commented 5 years ago

Could be or not. I tried two different cables which never had any problems before on 3 different USB ports on my laptop which are all working fine with other hardware, still not working.

Elsewhere someone suggested running goldtree as admin - could that help? (IMHO it shouldn't)

I also upgraded to the fw the nsps are meant to be run on (8.1.0) as I've seen later on. I'll try to check tomorrow if that fixes anything (the nsps do require 8.1.0 to run (master key 9) but they installed fine on 7.0.1 when installing from SD).

lookye commented 5 years ago

Please look into these two things:

Some users reported, that running as Admin worked fine for them, where it didnt worked without doing so.

Shadowghost commented 5 years ago

I will try again with running as admin when I have some time. Path definitely had no special chars in it, so that can be ruled out.

correiaemello commented 5 years ago

Having the same issue here trying to install a large .NSP file (5.74GB). Tried removing any special char and running Goldtree as admin, no success.

CFW with version: Kosmos/Atmosphere 0.9.2 (booted with hekate 5.0.1) Goldleaf version: 0.6.1 Goldtree version: 0.6.1 Windows 10 Professional Switch 7.0.1

The cable/setup already installed several other files using Goldleaf/tree 5.0.0

lwouis commented 5 years ago

Same issue here. I'm on 7.0.0 with Atmosphere 0.9.3 and Goldleaf 0.6.1.

Some files install without any problem. Some files freeze at the end on "Writing content [...]".

Extremely annoying as a full reboot is required to try again

paishin commented 5 years ago

Also having the same issue, anyone tried with older version of Goldleaf?

paishin commented 5 years ago

Edit: Just as I posted the previous post I found a workaround. Disconnected the usb cable, (I was at 100%) close goldtree and then re-connect usb cable and re-start goldtree. Installation continued and nsp got installed fine.

XorTroll commented 5 years ago

Surprisingly, I also do that when USB fails for some reason (my cable isn't perfect at all), and despite this can cause corruption, it also can save the installation :)

paishin commented 5 years ago

I dont think its the cable though. Mine does this consistently with certain nsp and not at all with others

XorTroll commented 5 years ago

Pretty sure it's connection, if I connect the USB carefully and ensure its perfectly connected it won't cause any issues.

admiralspeedy commented 5 years ago

Has absolutely nothing to do with the connection. I have tried 3 different USB cables and 6 different USB ports (some 3.0, some 2.0) and no matter what I do the install gets stuck on every NSP I have that's over 5GB.

I'm actually guessing it will happen any NSP over 4GB (everything I have is less than 4GB or 5GB+ so I can't test it) and it probably has something to do with changes you made to 4GB+ file support and installing to a FAT32 formatted SD card. Technically there should be no conflict here because the NCA files inside the NSP should be less than 4GB and fit fine on a FAT32 SD card.

Following the suggestion of unplugging, closing Goldtree, re-plugging and relaunching Goldtree makes the install continue and finish. I also tried going back to 0.6.0 but that actually won't even let me try a 5GB+ NSP (again, I'm guessing it would happen at 4GB+) because it just says "Invalid NCA" as if it can't parse the file properly.

lookye commented 5 years ago

Using 0.6.1 (Goldleaf and Goldtree) works fine for FAT32 and the nsp size does not matter (bigger/smaller than 4GB). My latest tests were also all with a usb2 port + nsps up to 26gb (per nsp) and they installed without any problems.

admiralspeedy commented 5 years ago

Not sure what else to tell you. There are 7 of us here with the exact same issue and I've tried every conceivable method of connecting my Switch to my PC via USB. I've tried an official Nintendo cable (from a pro controller), my Google Pixel cable and my Anker cable and it happens every time.

I have now tried it on 10 of the 14 USB ports on my PC and it works totally fine for every <4GB NSP I have and freezes on every NSP I have that is 5GB+. I actually get a "[gtree:Warn]" in the console when it freezes, but I don't see any sort of log explaining what the warning is for.

If it makes any difference, here is the system I'm transferring from: 8700K in an ASUS Prime Z370-A, 16GB of DDR4 and the NSPs are being transferred off an NMVe SSD. I'm running Windows 10 Pro 1903, build 18362.295.

lookye commented 5 years ago

You all can feel free to join the discord (see at the end of the readme) and help to work out the problem.

ricardobrauner commented 5 years ago

I had the same problem. Solved by updating to 8.1.0 with ChoiDujourNX.

Shadowghost commented 5 years ago

IMHO we can close this. No more hickups on large nsp installs for me since 0.7.0. Sorry for not reporting back. Great work XorTroll 😄

batmanord commented 5 years ago

OK so While transfering a Large NSP I experienced the SAME ISSUE, it will write [gtree:Log] Received command: ReadFile [gtree:Log] Received command: ReadFile [gtree:Log] Received command: ReadFile And Hang at some point. Press SPACEBAR in the CMD terminal to refresh and continue installing. But installing a 32GB file takes 45minutes and pressing spacebar for 45minutes sucks......

I FOUND THAT IF YOU OPEN GOLDTREE with POWERSHELL It works flawlessly.

POWERSHELL.EXE runs Goldtree.exe Better. Im not much of a windows user so I cant explain why this is happening, And thats why im not much of a windows user.

GoodLuck.

(Using Goldtree 0.7.0.0 and Goldleaf 0.7.2)

snowgears commented 5 years ago

I am having this issue with the latest release of Quark and Goldleaf as well. Installations via USB freeze. I have not had this issue with earlier versions

YolloPlays-AI commented 4 years ago

I just tried an other usb port and turned the cable upside down and it just started to work after 2 tries. As Xor said, works sometimes with an weird cable but sometimes not :)