Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use mouse or keyboard after clicking to save imported files to mod pack #249

Open
Exeterchiefs2023 opened this issue Apr 14, 2023 · 38 comments

Comments

@Exeterchiefs2023
Copy link

Hi I recently started re doing a barbarian units pack for ancient empires mod for attila as my last one got corrupted when I had to turn pc off due to unresponsive mouse and keyboard when saving something in my pack file.

I basically had to import data from ancient empires mod for textures and rigid model files for things like armour to tunics and skins etc and when I clicked save it was taking ages to sort itself out I am using latest version of rusted pfm.

Now I had to try saving stuff again in a new pack file and I cannot use the mouse or keyboard at all it's like it's frozen the PC.

Any ideas why this happens?

@Frodo45127
Copy link
Owner

mmmm that sounds like you're running out of ram. When RPFM saves a pack, it loads it to ram, then writes in to disk. If your pack is 4gb, it'll you'll see a 4gb ram usage the first time you save said pack, for example. If you're close to your ram limit, windows will do windows things, and start using your disk as ram, which slows the whole system down to a crawl and sometimes freeze it. When saving, check your ram usage in task manager and see if its that.

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 14, 2023 via email

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 14, 2023 via email

@Frodo45127
Copy link
Owner

Unless you're doing weird things or have a lot of programs open, 16gb is usually enough. Use task manager to check if it's a ram problem (see if ram usage skyrockets and paginated file starts being used when saving) or another thing.

@Exeterchiefs2023
Copy link
Author

my ram usage is sometimes high but also disk usage is my data d drive is a HDD drive where as my other drive is SSD but that drive has less memory so i had to move the install to data d drive which is where my games are installed.

i am wondering if its worth getting tad more ram to improve performance but want to find out what type of ram and if my pc can have more in it without needing to replace other stuff.

I do not know too much about replacing parts etc I know that some things are not compatible and replacing certain parts makes pc generate more heat and needs good cooling system to stop overheating etc.
I would be worried i mess things up.

@Exeterchiefs2023
Copy link
Author

i did not have many programs running when this occured

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 14, 2023 via email

@Frodo45127
Copy link
Owner

if you're saving to an hard disk, that may also be the cause. HDD has a very, VERY low write speed, so writing a 500mb pack will take 8-10 seconds, while on an ssd it'll take 1. And while that happens, windows tends to become non responsive.

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 14, 2023 via email

@Frodo45127
Copy link
Owner

try saving the pack to the ssd first. Just the pack. If the situation improves.... it's the hdd. In that case.... either get another ssd, or make place in the one you have.

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 14, 2023 via email

@Exeterchiefs2023
Copy link
Author

I cut and pasted the pack into my SSD drive and just importing some of the armours and textures to the pack click save and it's taking a while still and now I cannot use mouse or keyboard so looks like I need more ram

@Exeterchiefs2023
Copy link
Author

Would it be a good idea to improve ram first to see if that helps?

@Frodo45127
Copy link
Owner

No, first you need to identify the problem, because even with 8gb of ram rpfm runs fine most of the time. Open task manager and see if your ram usage skyrockets when saving, and windows starts paginating, or if the hdd activity goes to 100%. Also, how big is the saved pack?

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 16, 2023 via email

@Frodo45127
Copy link
Owner

" i imported all armour's to tunics and textures from classical empires pack and two models pack of ancient empires forgotten size of the pack" This doesn't tell me the pack size. I mean in MB. If what you want to do is a submod, I recommend you just setting those packs you import from as dependencies of yours, instead of importing all of them in.

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 16, 2023 via email

@Frodo45127
Copy link
Owner

Frodo45127 commented Apr 16, 2023

If it's over 7gb it's not rare it hangs the pc then. RPFM does some heavy lifting to save packs as fast as possible, using all available resources (ram and cpu), but when the pack is so big that sometimes causes hangs. There's little it can do, other than making pack-saving risky and long (taking a lot more time to save and risking that, if an error is detected when reading the pack from disk, the whole thing becomes corrupted). That's way too big. I recommend you either doing a submod, or splitting the pack somehow.

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 16, 2023 via email

@gdwitt
Copy link

gdwitt commented Apr 24, 2023

This sounds like my issue. I am trying to run Ancient Empires. If I load their model pack into RPFM, everything seems fine at first. But every 10-15 minutes, my pc freezes up and I can't do anything with keyboard and mouse for 3 mintues. I checked task manager it told me that my memory was at 99% and that RPFM was using 6.7 GB of ram. I get this with the Vanilla Attila Models3 pack as well.

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 25, 2023 via email

@Frodo45127
Copy link
Owner

The problem is that you are making a pack way too big, and when saving or autosaving (every few minutes), RPFM has to load it to ram somehow and it fills up the ram. As I said, the solution is not really more ram, but rather to split the pack. Also, if you're making a submod, you're not supposed to import the parent mod files. You are supposed to add said mod as dependency of your own and make sure your mod ONLY CONTAINS YOUR FILES, not the ones from the parent mod.

As for model3, you're not supposed to edit any vanilla pack either. That's how people end up breaking their games. You're supposed to work only with mod/movie packs.

Give this a read to learn more about submodding: https://tw-modding.com/index.php/Tutorial:Submodding

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 25, 2023 via email

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 25, 2023 via email

@Frodo45127
Copy link
Owner

Ok, if you just want to make a unit pack, first:

  • Make sure you really need to include those files. If you're not going to modify them in any way, shape of form, you do not need to include them. Even if your units use them. For reference, most unit packs that I've come across don't ever reach 1gb, even with custom models and textures.
  • A mod can be formed of multiple packs. You do not need all the files in the same pack. This is what I mean with splitting the pack. Just add the files you need to a pack until it reaches... don't know, 1 or 2 gb, then leave that pack as is and use another for the rest of the files. And if you fill it, leave it as is and another new pack.
  • Also, a bit of an extra, but make sure you have RPFM up to date. Some earlier versions of 4.0 had bugs in the autosave system that caused them to try and autosave the vanilla files (this is what may cause the ram usage spikes when viewing model3.pack you mentioned).
  • And regarding high ram usage, define "high". Usually, it's 1gb (for dependencies cache, diagnostics,...) or so + the size of your pack. RPFM 4.0 has reduced a lot of ram usage compared to 3.0 (not sure what version you have), but I cannot do miracles.

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 25, 2023 via email

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 25, 2023 via email

@gdwitt
Copy link

gdwitt commented Apr 25, 2023

I've been using RPFM almost since the beginning. Thank you for your continued hard work. I think the last release might have a problem. For the cases I presented above, I wasn't modding the files. I was opening them as a reference for my submod. It appears that I can't do this with RPFM anymore and must revert to PFM to view larger files since RPFM is running some kind of script that disables my pc every few minutes.

@Frodo45127
Copy link
Owner

Ok, I seemed to miss that there were two people talking here (though both were the same user). I'll re-read later this whole thread when I feel a bit less ill, because it seems I misunderstood and mixed the messages.

Regarding the last update, the autosave system was fixed (was broken before due to a few bugs). It triggers on mods, movie packs.... or anything if you have the "Allow edition of CA Packs" setting enabled, which is disabled by default. I'll probably add a more restrictive check for it on a future update (restricting it so it doesn't trigger on vanilla packs), but you can try disabling that setting.

Also, you can try using the dependencies system marking on your submod ancient empires as dependency. That way it'll be loaded as part of the parent dependencies and you can see and import files without having to open it on a separate instance.

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 25, 2023 via email

@gdwitt
Copy link

gdwitt commented Apr 25, 2023

On lunch break here. I'm glad to see your response Frodo. How do I "marking on your submod ancient empires as dependency"?
FYI, RPFM settings, I have Autosave Interval at 10 min and have all debug settings checked but for Unit Editor. I wonder if I should turn off the debug settings for rigid model editor and possibly other debugs? Does it run a check every time it autosaves? Should that be turned off?
The debugs are a great feature of RPFM, but I haven't used them on model packs until recently.

@Frodo45127
Copy link
Owner

Ok, both of you try 4.0.17 and see if it works better. The bug that caused autosaves to get trigger on vanilla packs should be fixed now, so it should no longer try to autosave them causing ram saturation.

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Apr 27, 2023 via email

@gdwitt
Copy link

gdwitt commented Apr 27, 2023

Thanks Frodo! I will test this with debug on and off.

@Frodo45127
Copy link
Owner

Update to 4.0.18 and check again. It contains more fixes for the autosave system that caused autosaves to trigger when they shouldn't under windows.

@gdwitt
Copy link

gdwitt commented May 23, 2023

The update seemed to have fixed the issue. I don't have the RAM and CPU spikes anymore with model packs open. Great job!

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented May 23, 2023 via email

@Exeterchiefs2023
Copy link
Author

Exeterchiefs2023 commented Jun 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants