It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
This issue is frustrating me to no end. KoTOR has a memory leak and is taking up way more ram than it has any business taking. What's even more annoying is it always crashes in the middle of quicksave and consequently corrupts the save. This has cost me hours of gameplay as the game rarely autosaves which forces me to revert an hour or more. Last one just about to go to caves on dantooine to complete jedi training, now I'm back on Taris. I've tried LAA, but it still crashed after 4GB of ram consumption, which shouldn't be an issue having 8GB of RAM, 6GB of which are available, although it did postpone the issue. Anyone know of a fix for the memory leak/quicksave corruption issue?
No posts in this topic were marked as the solution yet. If you can help, add your reply
avatar
jerm1027: This issue is frustrating me to no end. KoTOR has a memory leak and is taking up way more ram than it has any business taking. What's even more annoying is it always crashes in the middle of quicksave and consequently corrupts the save. This has cost me hours of gameplay as the game rarely autosaves which forces me to revert an hour or more. Last one just about to go to caves on dantooine to complete jedi training, now I'm back on Taris. I've tried LAA, but it still crashed after 4GB of ram consumption, which shouldn't be an issue having 8GB of RAM, 6GB of which are available, although it did postpone the issue. Anyone know of a fix for the memory leak/quicksave corruption issue?
I must say that i never heard of this problem, sorry to say it but i have played with 3 different computers and two different OS with this game, and never had any significant issues

The problem must come from somewhere else, what are your system spec?

Are you graphic card driver set to default for this game?

Any other unnecessary program running while playing? Beside the usual antivirus/antispyware

KOTOR should consume between 200 and 500 Mb of ram while playing, on certain newer OS it may peak for a moment to even 1Gb but that's it, it immediately return down to that range
avatar
jerm1027: This issue is frustrating me to no end. KoTOR has a memory leak and is taking up way more ram than it has any business taking. What's even more annoying is it always crashes in the middle of quicksave and consequently corrupts the save. This has cost me hours of gameplay as the game rarely autosaves which forces me to revert an hour or more. Last one just about to go to caves on dantooine to complete jedi training, now I'm back on Taris. I've tried LAA, but it still crashed after 4GB of ram consumption, which shouldn't be an issue having 8GB of RAM, 6GB of which are available, although it did postpone the issue. Anyone know of a fix for the memory leak/quicksave corruption issue?
Does this corruption issue also arise when you do a menu 'Game save' instead of just using quick save option?

The only thing that I remember from "way-back" that caused any kind of issue like this (memory leak causing Save corruption) was due to a DisablePagingExecutive setting conflicting with a third party graphic application. The application promoted the leak, and DisablePagingExecutive borked the saves. I can't remember the specifics though.

I seem to remember that setting DisablePagingExecutive to 0 stabilised the issue... might that help? A complete shot in the dark. I take no responsibility for your machine exploding, or your hair catching fire. Good luck.
avatar
guartrainer: I take no responsibility for your machine exploding, or your hair catching fire. Good luck.
You should totally take credit if you make his hair catch on fire.
avatar
guartrainer: I take no responsibility for your machine exploding, or your hair catching fire. Good luck.
avatar
alcaray: You should totally take credit if you make his hair catch on fire.
Agreed... there is no memory leak in KOTOR but it sounds like your mod-(inbuilt?)-Gcard does not like rendering the open spaces.
avatar
jerm1027: This issue is frustrating me to no end. KoTOR has a memory leak and is taking up way more ram than it has any business taking. What's even more annoying is it always crashes in the middle of quicksave and consequently corrupts the save. This has cost me hours of gameplay as the game rarely autosaves which forces me to revert an hour or more. Last one just about to go to caves on dantooine to complete jedi training, now I'm back on Taris. I've tried LAA, but it still crashed after 4GB of ram consumption, which shouldn't be an issue having 8GB of RAM, 6GB of which are available, although it did postpone the issue. Anyone know of a fix for the memory leak/quicksave corruption issue?
avatar
Catrhis: I must say that i never heard of this problem, sorry to say it but i have played with 3 different computers and two different OS with this game, and never had any significant issues

The problem must come from somewhere else, what are your system spec?

Are you graphic card driver set to default for this game?

Any other unnecessary program running while playing? Beside the usual antivirus/antispyware

KOTOR should consume between 200 and 500 Mb of ram while playing, on certain newer OS it may peak for a moment to even 1Gb but that's it, it immediately return down to that range
Specs:
-Intel Core i5 2500k @ 4GHz (<- stable, completed 20 hours of Prime95 w/o error or throttling)
-4x2GB of DDR3-2000 memory @ 1866MHz
-GTX 760 Superclocked @ 1071MHz (factory OC'd)
-Windows 7 Home Premium x64

The only modifications I'm running would be Flawless Widescreen which allows me to play at my monitor's native resolution of 2560x1080.
avatar
Catrhis: I must say that i never heard of this problem, sorry to say it but i have played with 3 different computers and two different OS with this game, and never had any significant issues

The problem must come from somewhere else, what are your system spec?

Are you graphic card driver set to default for this game?

Any other unnecessary program running while playing? Beside the usual antivirus/antispyware

KOTOR should consume between 200 and 500 Mb of ram while playing, on certain newer OS it may peak for a moment to even 1Gb but that's it, it immediately return down to that range
avatar
jerm1027: Specs:
-Intel Core i5 2500k @ 4GHz (<- stable, completed 20 hours of Prime95 w/o error or throttling)
-4x2GB of DDR3-2000 memory @ 1866MHz
-GTX 760 Superclocked @ 1071MHz (factory OC'd)
-Windows 7 Home Premium x64

The only modifications I'm running would be Flawless Widescreen which allows me to play at my monitor's native resolution of 2560x1080.
It's not a matter of your system being incapable of running KOTOR, it's just that for some reason it seems to cache in memory pretty much the whole game without cleaning up

You still haven't said what other programs you have running while playing, maybe some "optimizer" program that end up screwing up this old game loading process

I can try to give a few suggestions and tell us on the forum how it goes:

1) Download a free program called "Process Explorer" from here:

https://technet.microsoft.com/en-us/sysinternals/bb545027

It's pretty much a significantly improved task manager that allow the user to monitor the system capacity and usage without having to keep open 3 different windows

Among the other thing it tell the user the GPU usage and it may help you narrow the problem

This program will allow you to easily identify what program is effectively using all your RAM

2) Try to completely disable your graphic card driver AI programs, for ATI cards it's CCC (Catalyst Control Center), not sure Nvidia cards program name but i am sure there is an equivalent

Disabling it completely means forcefully shutting down ALL the process related to it, so that your card work only using it's basic drivers

If an AI function is badly mismanaging the game, could be just that. It would be far more probable that it would eat up your graphic card memory tough, not the RAM

3) Try to shut down all programs not windows related, pretty much everything, with a few exception, that is not categorized under SYSTEM under the USER tab in the task manager

4) Try to run KOTOR with 800x600 resolution, i know it's a pain especially for the various menu, but you may want to try it anyway, see if there is a difference in the memory usage from the game

5) If nothing work, try to run KOTOR with no mod installed, or at least no mod that alter the graphic quality or allow bigger resolutions etc.

A minor incompatibility between process and used memory may be what it's causing you this kind of problem, in fact it seems, from your description, that the game is waiting for the system to clean up memory but it doesn't, maybe because it "marked" as being in use for some reason

Know for sure that vanilla KOTOR don't to that


BTW, it's your widescreen mod changed your .exe to allow bigger resolutions? I remember a mod that did just that for KOTOR/KOTOR2, if the AOB sequence is incorrectly applied it may have compromised part of the executable

Usually this kind of problem just immediately crash the game, but depending on what has been altered, it may do far worse
avatar
jerm1027: Specs:
-Intel Core i5 2500k @ 4GHz (<- stable, completed 20 hours of Prime95 w/o error or throttling)
-4x2GB of DDR3-2000 memory @ 1866MHz
-GTX 760 Superclocked @ 1071MHz (factory OC'd)
-Windows 7 Home Premium x64

The only modifications I'm running would be Flawless Widescreen which allows me to play at my monitor's native resolution of 2560x1080.
avatar
Catrhis: It's not a matter of your system being incapable of running KOTOR, it's just that for some reason it seems to cache in memory pretty much the whole game without cleaning up

You still haven't said what other programs you have running while playing, maybe some "optimizer" program that end up screwing up this old game loading process

I can try to give a few suggestions and tell us on the forum how it goes:

1) Download a free program called "Process Explorer" from here:

https://technet.microsoft.com/en-us/sysinternals/bb545027

It's pretty much a significantly improved task manager that allow the user to monitor the system capacity and usage without having to keep open 3 different windows

Among the other thing it tell the user the GPU usage and it may help you narrow the problem

This program will allow you to easily identify what program is effectively using all your RAM

2) Try to completely disable your graphic card driver AI programs, for ATI cards it's CCC (Catalyst Control Center), not sure Nvidia cards program name but i am sure there is an equivalent

Disabling it completely means forcefully shutting down ALL the process related to it, so that your card work only using it's basic drivers

If an AI function is badly mismanaging the game, could be just that. It would be far more probable that it would eat up your graphic card memory tough, not the RAM

3) Try to shut down all programs not windows related, pretty much everything, with a few exception, that is not categorized under SYSTEM under the USER tab in the task manager

4) Try to run KOTOR with 800x600 resolution, i know it's a pain especially for the various menu, but you may want to try it anyway, see if there is a difference in the memory usage from the game

5) If nothing work, try to run KOTOR with no mod installed, or at least no mod that alter the graphic quality or allow bigger resolutions etc.

A minor incompatibility between process and used memory may be what it's causing you this kind of problem, in fact it seems, from your description, that the game is waiting for the system to clean up memory but it doesn't, maybe because it "marked" as being in use for some reason

Know for sure that vanilla KOTOR don't to that

BTW, it's your widescreen mod changed your .exe to allow bigger resolutions? I remember a mod that did just that for KOTOR/KOTOR2, if the AOB sequence is incorrectly applied it may have compromised part of the executable

Usually this kind of problem just immediately crash the game, but depending on what has been altered, it may do far worse
I usually have Process Hacker 2 running, along with Steam, GeForce Experience, MSI Afterburner/RivaTuner, PIA (VPN), NetLimiter, and ClamWin (does not scan realtime). KoTOR is the only game affected by this bug. I'm a micromanager and minimalist, so I loath the thought of any optimizer programs, especially the ones that aren't transparent as to what they're optimizing and how.

GPU usage isn't particularly high, though it does spike one CPU core to 100%. Framerate is solid 75FPS (monitor refreshes at 75Hz)

I suspect it might be Flawless Widescreen. The specific fix for KoTOR 1 is:
This fix injects a custom C++ DLL that dynamically creates new GUI files based on the active display resolution and new TGA background art, additionally it fixes the cutscene black bars and missing text on some resolutions, it's not perfect but it's a start.

NOTE: You must start KOTOR and exit atleast once before this fix will properly be active, this is because custom files generated need to be detected by KOTOR before it starts, additionally graphics backgrounds and GUI files will not be generated unless you change the resolution while INGAME!
KoTOR 2 TSL doesn't have this issue, but also has a different widescreen fix that's jenky, and breaks the minimap.
On a side note, I did find an work around, and did complete the game. I just manually checked KoTOR's memory consumption and restarted the game after it reached 2GB.
Unless you actually use GeForce Experience, then I advise that you uninstall it. It is known to cause things to go wrong with games.
avatar
Catrhis: BTW, it's your widescreen mod changed your .exe to allow bigger resolutions? I remember a mod that did just that for KOTOR/KOTOR2, if the AOB sequence is incorrectly applied it may have compromised part of the executable

Usually this kind of problem just immediately crash the game, but depending on what has been altered, it may do far worse
Sorry to Necro this thread, but I'm playing the game again, and running into the same issue. Same PC, just with AMD R9 380x and 12GB of RAM.

To my knowledge, it doesn't modify the .exe directly, but alters memory by injecting a custom dll. However, I think you were on to something here, and I suspect Flawless Widescreen. might the culprit. Another post on Reddit seems to confirm.

I suspect FWS doesn't clean up well, and the KOTOR gets unstable over 1.5GB of RAM usage - I mean the recommended requirements were 512MB of RAM.

UPDATE: I can confirm Flawless widescreen is causing the memory leak. Disabling the fix causes the game to consume ~190MB of RAM, opposed to 1GB.

Another interesting development is that since I've replaced textures of party members, I noticed that they sometimes fail to load, coincidentally, right before the game crashes - so I discovered a tell that can prevent me from corrupting my most recent save.

I think this is trade-off I'm going to have to live with - have you tried playing a 4:3 ratio game on a 21:9 monitor in full screen?
Attachments:
kotor_ram.jpg (477 Kb)
Post edited April 01, 2018 by jerm1027
avatar
Catrhis: BTW, it's your widescreen mod changed your .exe to allow bigger resolutions? I remember a mod that did just that for KOTOR/KOTOR2, if the AOB sequence is incorrectly applied it may have compromised part of the executable

Usually this kind of problem just immediately crash the game, but depending on what has been altered, it may do far worse
avatar
jerm1027: Sorry to Necro this thread, but I'm playing the game again, and running into the same issue. Same PC, just with AMD R9 380x and 12GB of RAM.

To my knowledge, it doesn't modify the .exe directly, but alters memory by injecting a custom dll. However, I think you were on to something here, and I suspect Flawless Widescreen. might the culprit. Another post on Reddit seems to confirm.

I suspect FWS doesn't clean up well, and the KOTOR gets unstable over 1.5GB of RAM usage - I mean the recommended requirements were 512MB of RAM.

UPDATE: I can confirm Flawless widescreen is causing the memory leak. Disabling the fix causes the game to consume ~190MB of RAM, opposed to 1GB.

Another interesting development is that since I've replaced textures of party members, I noticed that they sometimes fail to load, coincidentally, right before the game crashes - so I discovered a tell that can prevent me from corrupting my most recent save.

I think this is trade-off I'm going to have to live with - have you tried playing a 4:3 ratio game on a 21:9 monitor in full screen?
I wouldn't use FWS with KOTOR1 at all - instead use UniWS and follow the instructions here:

http://www.wsgf.org/article/star-wars-knights-old-republic

and follow the directions under Widescreen and HUD correction. Hopefully you won't need the troubleshooting section.

It's not perfect - the HUD is REALLY small on higher resolutions with the above steps - but it should be much more stable and playable.

I could be biased though because for me, KOTOR crashed so often it was practically game-breaking - while I could do the old "quicksave before the crash, load after the crash" trick, there was one part on Tattooine (near the end) where nothing worked. Whereas with UniWS, hardly any crashes at all.

FYI my graphics card is a GeForce GTX 960, and I have GeForce Experience running so it shouldn't be an issue with KOTOR.
Post edited April 14, 2018 by squid830
avatar
jerm1027: This issue is frustrating me to no end. KoTOR has a memory leak and is taking up way more ram than it has any business taking. What's even more annoying is it always crashes in the middle of quicksave and consequently corrupts the save. This has cost me hours of gameplay as the game rarely autosaves which forces me to revert an hour or more. Last one just about to go to caves on dantooine to complete jedi training, now I'm back on Taris. I've tried LAA, but it still crashed after 4GB of ram consumption, which shouldn't be an issue having 8GB of RAM, 6GB of which are available, although it did postpone the issue. Anyone know of a fix for the memory leak/quicksave corruption issue?
same i've looked at all of the suggestions and NONE have worked