ModOrganizer2 / modorganizer

Mod manager for various PC games. Discord Server: https://discord.gg/ewUVAqyrQX if you would like to be more involved
http://www.nexusmods.com/skyrimspecialedition/mods/6194
GNU General Public License v3.0
2.19k stars 163 forks source link

Opening "Batch Build" in BodySlide causes a system lockup #1389

Open ousnius opened 3 years ago

ousnius commented 3 years ago

The problem:

When opening the "Batch Build" dialog in BodySlide through MO2, the system completely locks up if there are too many BodySlide outfits installed. I don't know an exact number.

To Reproduce:

Steps to reproduce the behavior:

  1. Install BodySlide and a lot of outfit addons for it (get several big BodySlide packs from the Nexus)
  2. Click on "Batch Build".

Details:

See https://github.com/ousnius/BodySlide-and-Outfit-Studio/issues/332 I got this report a few times in the past, it only happens while MO2 is hooked to BodySlide. I don't do anything special (no multi threading either) when opening the batch build dialog.

Note: The freeze happens when OPENING the batch build dialog, not while running the actual batch build! I cannot provide screenshots or logs as I am not an MO2 user myself.

ousnius commented 3 years ago

https://github.com/ousnius/BodySlide-and-Outfit-Studio/blob/dev/src/program/BodySlideApp.cpp#L3280 Between line 3280 and 3331 is where the freeze has to be happening (up to ShowModal or shortly after in Windows functionality).

ousnius commented 3 years ago

I re-read the original report, and it seems to be related to simply having a lot of entries in the checklistbox and then moving the cursor?

isanae commented 3 years ago

Looking at the code, you don't seem to be accessing the filesystem at all in there. If that's the case, then it's purely a UI issue with BodySlide.

ousnius commented 3 years ago

For those users, it starts working once they run BodySlide without MO. I've gotten about 10 reports of the issue over the years, everyone of them was using MO. Not saying this does in fact have anything to do with MO after all, but things are pointing towards it, that's why I decided to report it.

isanae commented 3 years ago

If they use MO for modding, mods are not in the Data directory, so running BodySlide outside of MO wouldn't have any mods. A quick way to try to reproduce this would be to generate a crapload of dummy files and see what BodySlide does.

AnyOldName3 commented 3 years ago

It's pretty likely that people with crazy huge setups are going to be using MO2 to manage them, so there's going to be selection bias towards issues being reported as MO2-specific when they're actually huge setup specific. One thing that might help work out which it is would be asking one of the users with the issue to use the Explore Virtual Folder option to copy the virtualised game installation to another directory, run the launcher once from the copy (so the registry keys get updated to point to it) and then run BodySlide again. If the issue still happens, then it's the mod setup, not the manager, that's causing the problem.

Rinelw commented 3 years ago

I re-read the original report, and it seems to be related to simply having a lot of entries in the checklistbox and then moving the cursor?

It freezes after the cursor leaves the batch build window. If you click to proceed with batch build, it'll freeaze but then unfreeze after processing enough outfits.

I also noticed it happens with around 1000+ outfits selected. I'll try doing what @AnyOldName3 suggested.

ousnius commented 3 years ago

I have added 10000 entries to the checklistbox and there was no instability on my system. I didn't test on other systems (Windows 7?) or with MO hooked.

Rinelw commented 3 years ago

Windows 10 64bit Intel i5 7300HQ Radeon RX560

It happens with MO2, tested without MO2 as @AnyOldName3 suggested and it didn't happen.

Al12rs commented 3 years ago

@aerd2 Could you follow these instructions and post your logs?

Upload your log files here. Follow these steps:

1) Go in the Settings, Diagnostics tab, set Log Level to Debug. 2) Restart MO. 3) Use the "Open Folders" button to open the logs folder. 4) Recreate your problem. 5) Close MO. 6) Drop mo_interface.log and the most recent usvfs log here. You might need to compress them.

Note: When you're done with fixing the problem, go set the Log Level back to Info.

https://cdn.discordapp.com/attachments/458597400638914563/617049541350260794/openlogs.png

Rinelw commented 3 years ago

@aerd2 Could you follow these instructions and post your logs?

Upload your log files here. Follow these steps:

  1. Go in the Settings, Diagnostics tab, set Log Level to Debug.
  2. Restart MO.
  3. Use the "Open Folders" button to open the logs folder.
  4. Recreate your problem.
  5. Close MO.
  6. Drop mo_interface.log and the most recent usvfs log here. You might need to compress them.

Note: When you're done with fixing the problem, go set the Log Level back to Info.

https://cdn.discordapp.com/attachments/458597400638914563/617049541350260794/openlogs.png

The problem is that now I can't replicate the error. It somehow no longer happens to me anymore. Sorry, I'll try again with more outfits, but I can't promise anything.

gitoss commented 3 years ago

This modmanager + bodyslide bug happens to me, too - and it's amazing, I never saw anyhing freezing the whole Windows NT ui like that since I was using Windows 98. Well, except for buggy drivers, but never from an user app - this could be a great ddos resource for hackers!. Actually, this reminds me of OS/2 - it never crashed, but the ui could stop responding.

I've got the problem isolated: It's the list over override dialogs - i.e. the long of radio buttons that lets you select which body preset you want to attach to what bodyslide. The freeze doesn't happen if the overdide dialog is disabled in the settings - or, logically, there are few alternatives intstalled so there's no need for the app to generate a long list.

Currently, I'm at 1500 elements, which stars without delay when the override dialogue is disabled. At 500 elements (filtered groups), it takes a very long time to generate it - but it does happen eventually. At the full 1500 items, the system ui completely freezes and the only option is to pull the power plug.

By the way, I could understand users being not too wild about sharng their mod manager debug logs which probably include the list of installed mods. There might be something in it like a cheat mod or even "Cute Orcs" (see Nexus Mods and alternative modding sites) - you never know.

Al12rs commented 3 years ago

No one cares about your modlist :) . Most people probably have kinkier stuff than you. The logs don't contain the list of mods, you can only see the paths to the files accessed in case of usvfs logs.

We could really use those logs to figure out what is happening.

Upload your log files here. Follow these steps:

1) Go in the Settings, Diagnostics tab, set Log Level to Debug. 2) Restart MO. 3) Use the "Open Folders" button to open the logs folder. 4) Recreate your problem. 5) Close MO. 6) Drop mo_interface.log and the most recent usvfs log here. You might need to compress them.

Note: When you're done with fixing the problem, go set the Log Level back to Info.

https://cdn.discordapp.com/attachments/458597400638914563/617049541350260794/openlogs.png