developersu / ns-usbloader

Awoo Installer and GoldLeaf uploader of the NSPs (and other files), RCM payload injector, application for split/merge files.
GNU General Public License v3.0
1.82k stars 123 forks source link

Cannot invoke "java.io.File.isDirectory()" because "nspFile" is null #94

Closed scalp42 closed 2 years ago

scalp42 commented 3 years ago

Hi folks,

Using v5.0 (non legacy), ran into the following issue:

         Offset: 35264                0x89c0
         Size:   3072                 0xc00
[ FAIL ] TF NullPointerException (in some moment application didn't find something. Something important.):
         Cannot invoke "java.io.File.isDirectory()" because "nspFile" is null
[ INFO ]    End
developersu commented 3 years ago

Yeah, I just saw what you're talking about. But I can't reproduce this.. it's strange 0.o

Is someone could provide clear reproducible scenario please do. And leave here.

Workaround worked for me (I know it's kinda dumb): do not install a lot of files at once.

Fatih120 commented 2 years ago

Running v5.2 on Fedora with OpenJDK 17. I am getting this error as well even after installing single files. No clue if this log is of any use:

java.lang.NullPointerException: Cannot invoke "java.io.File.isDirectory()" because "nspFile" is null
        at nsusbloader.com.usb.TinFoil.fileRangeCmd(TinFoil.java:180)
        at nsusbloader.com.usb.TinFoil.proceedCommands(TinFoil.java:135)
        at nsusbloader.com.usb.TinFoil.<init>(TinFoil.java:58)
        at nsusbloader.com.usb.UsbCommunications.run(UsbCommunications.java:67)
        at java.base/java.lang.Thread.run(Thread.java:833)
developersu commented 2 years ago

Thank you for this observation. Does it happens with every file you're trying to install? Does this NSP actually installed?

Fatih120 commented 2 years ago

I've been something of a fool myself. I mis-selected the installation storage within Awoo because it was a while since I used my Switch and forgot that the spoofed internal storage was always full. Now that I chose to install to SD, installing actually proceeds as normal instead of showing an error and creating a corrupt game. Original poster likely tried installing to a full medium as well. Since the error is human-based, maybe there could be an error message indicating the mistake made?

developersu commented 2 years ago

Great idea. Thanks!