jaszhix / nmsde

NMS Development Environment
MIT License
5 stars 0 forks source link

NMSDE is not aware of spaces in Windows Usernames. #1

Closed DarkPulse closed 6 years ago

DarkPulse commented 6 years ago

Issue I am trying to open PAKs with NMSDE, but no matter what, it never loads them. It gets to "Extracting PAK files, please wait..." and that's as far as it ever goes. I've let it sit and "extract" for fifteen minutes and it's still failed to extract anything - much less let me try to edit.

I had a suspicion this is due to the program not knowing what to do with Windows usernames that have spaces in them (as mine does). To test this, I then moved the program directory to a directory without any spaces in its username, and changed the workspace folder to that folder as well. Immediately it got past extracting the PAK; however, it hung on decompressing the MBIN, which is apparently not adjustable (unlike the workspace directory).

As a result, I cannot use NMSDE in any meaningful way.

Steps to reproduce 1) Have a Windows Username with a space in it, and NMSDE installed. 2) Attempt to open Game PAK file. 3) Watch.

Expected behaviour It would open the PAK files and decompress the MBINs as normal.

Other information It seems that the program is thus unaware of spaces in Windows usernames. If it's not expecting that, it's probably choking because it's terminating at the space, as opposed to the whole userstring, and the entire program gets completely confused as a result.

jaszhix commented 6 years ago

Ahh, yeah I should have wrapped the arguments in quotes. I'll try to push a quick fix this evening.

Furinex commented 6 years ago

This also happens to me without having a space in my Windows Username.

jaszhix commented 6 years ago

What does the path look like then?

Egaliterrier commented 6 years ago

Same issue here.

jaszhix commented 6 years ago

If someone can confirm this build fixes the issue, I'll tag a release.

https://www.mediafire.com/file/miqs6nny009clec/NMSDE%20Setup%200.1.1.exe

Twitchiz commented 6 years ago

I was having the same issue, and after downloading and testing your 1.1 version I am still getting the "Extracting PAK files, please wait..." message forever when having a space in the install path.

I reinstalled to this path D:\NMSDE and then set the workspace as D:\NMSDE\Workspace and like DarkPulse said it solved the Extracting PAK issue but then hangs on decompressing the MBIN bin files.

I checked the folders and extracted files were fine in the MBIN folder but the EXL folder was empty, as expected.

jaszhix commented 6 years ago

I've reproduced the issue with a space in the workspace directory on 0.1, and 0.1.1 does indeed fix it, so I will tag the release, but I'll keep this issue open for now.

jaszhix commented 6 years ago

Another thing to keep in mind is the status will stop updating when MBINCompiler runs into an error, and it can't decompile everything yet. If it gets stuck after the MBINs are extracted, then you know that's the case. This should probably work better as far as updating or clearing the status.

DarkPulse commented 6 years ago

The issue with loading PAKs is now solved in 0.1.1, but like Twitchiz has said, it does not get to decompiling the MBINs for certain PAKs.

On the flip side, however, for PAKs where it does get to decompressing... wow, this thing is MURDER on my PC! Getting the MBINs to decompile spawned over 2000 processes from conhost, since each and every MBIN decompilation spawned a new process, and when there's thousands of files to process, that means that your PC is basically out of commission. My CPU isn't exactly the latest and greatest, but it's no slouch either (an i7-2600K overclocked to 4.4 GHz). Hopefully this can be sped up, batched, etc. somehow... otherwise, you're going to need some kind of beefcake system just to decompress these!

Anyway, a couple PAK files still do nothing for decompiling MBINs (2E9559C7 and 2FD62748), but others it extracts and decompiles some or most of the MBINs fine (4C482859 and 5A3E0C7D). Really don't want to test any others, though, because with how punishing it is on my PC, I'll be here all day if I do that. I was planning on testing all of them, but when those two that did decompile MBINs put my PC out of commission for 20+ minutes at a time, that's a lot less appealing.

4C482859 finally hung at 16% decompiling \MODELS\COMMON\WEAPONS\MULTITOOL\MULTITOOL_SCENE.MBIN, whereas 5A3E0C7D stopped at 96% of \MODELS\PLANETS\BIOMES\COMMON\BUILDINGS\PARTS\BUILDABLEPARTS\DECORATION\BED.SCENE.MBIN.

That said, I also take it that decompilation is a one-off thing - if it finds the "result" in your workspace, it doesn't try to re-decompile them, right?

jaszhix commented 6 years ago

Yeah, I made it so it uses multiple processes if there's less than 4000 files to decompile, then it switches to single threading. On my machine I am using a 14 core Xeon, so it might be why I didn't notice that. I'll make this an option you can toggle in the next release.

Yes, decompilation only occurs once.

jaszhix commented 6 years ago

Fixed in 0.2.0.