Ren'py games will crash after a few moments "out of memory"

Rocketeer66

Newbie
Oct 21, 2019
70
66
Could someone please help me with the problem?

When I start some Ren'py games, they crash after a while. Other Ren'py games work great.

In the traceback file this states "out of memory". I have 8GB RAM.

Anyone have any idea how to fix it?

I attach files:
log.txt
traceback.txt
 
Last edited:

Rocketeer66

Newbie
Oct 21, 2019
70
66
I have now discovered that games with Ren'py 7.3.x will crash after a while, but with 7.2.x and older they work fine.

I try switch from Angle render to openGL render, but same error.
 
Last edited:

toolkitxx

Well-Known Member
Modder
Donor
Game Developer
May 3, 2017
1,471
1,788
Code:
E:\hry\MirrorMine-0.13.5-pc\renpy\display\pgrender.py:118: UserWarning: Memory leak via Surface in pygame_sdl2.
  surf = Surface((width + 4, height + 4), 0, sample)
This seems to be the causing factor. I am pretty sure you should have a memory.txt in your game directory too - if not you might have to enable further logging. That file should actually show memory allocations per segment/element etc

P.S. After reading the entire thing one more time i am almost certain you are dealing with some kind of graphic memory problem here. The out of memory errors always occur in connection with either creating screenshots(usually done to be used as the thumbnail for the autosave or user save) or some other general graphic handling.
 
Last edited:

Loutreeeee

Newbie
Jun 9, 2019
77
105
Hi i got the same problem and it wasn't the case 3 month ago. I don't know why but when i try a lot of game here it crash every 2 minutes or more.

But it is not the case on every game.


For exemple : I can play all the game in : Luke's Way or My Cute Roomate or Harem Hotel or Dark magic or Mystic Manor or The Sisters' Sexual Circumstances or Sexual_life_of_love_and_erotic_-_Sister_in_Law_ for exemple without bug.

It work perfectly.

And then in some other game like : AHouseInTheRift-0.3.6 ; Prince of suburbia, Research into affection, Corrupted Kingdom for exemple it stop working very fast.

It is boring and i want to find a solution.

I went to to know what to do. Tried some thing but well after a reboot it's the same. I tried to put off some program, checking virus and maleware but... same old sh...

Can you help me?

Thank you very much.

I put one exemple on Attach files but i can make some very fast just by playing some game...
 

toolkitxx

Well-Known Member
Modder
Donor
Game Developer
May 3, 2017
1,471
1,788
Well - i noticed that both Loutreeeee and Rocketeer66 use an intel driver numbered 23.something where Intel itself is already up to a 26.something number. I personally would start with getting your machines up-to-date properly
 
  • Like
Reactions: Loutreeeee

Loutreeeee

Newbie
Jun 9, 2019
77
105
Thank you for your answer and thank you for reading my problem. It's nice that some people wants to help.

I didn't though about intel update and i will do it. And of course i will let you know if it was the problem
 

Loutreeeee

Newbie
Jun 9, 2019
77
105
Ok i went here and i did all the update.



I m french and even with the translation i don't understand witch one you want me to update. The Chipset? If yes they don't ask me to update it.

ASUSTeK COMPUTER INC. GL553VD
Système d'exploitation
Microsoft Windows 10 Famille (64 bits)
Processeur
Intel® Core™ i5-7300HQ CPU @ 2.50GHz
Chipset
Intel® 100 Series/C230 Series Chipset Family
Graphiques
NVIDIA GeForce GTX 1050
Intel® HD Graphics 630

Son
Son Intel® pour écrans
Realtek High Definition Audio

Réseau et E/S
Realtek PCIe GBE Family Controller
Intel® Dual Band Wireless-AC 7265
Intel® Wireless Bluetooth®
Update aviable

Mémoire vive
6 GB
Stockage
HGST HTS541010A9E680
Intel® 100 Series/C230 Chipset Family SATA AHCI Controller
 

toolkitxx

Well-Known Member
Modder
Donor
Game Developer
May 3, 2017
1,471
1,788
Ok i went here and i did all the update.



I m french and even with the translation i don't understand witch one you want me to update. The Chipset? If yes they don't ask me to update it.


Graphiques
NVIDIA GeForce GTX 1050
Intel® HD Graphics 630
Those. The problem you both experience seems to be related to the graphics card. That can either be memory size, handling of it or any number of other things connected to them. I simply noticed that both of you where still using a driver for the Intel graphics card numbered much lower than current driver versions - this is usually one of the first steps to perform when you experience trouble.
Looking at your memory size and the info from the log file the problem is probably a very simple one: you simply lack memory. Both of you are using a full HD resolution but the internal graphics card doesnt have a lot of memory so it has to use virtual memory. Since Windows already uses roughly half of your 6GB RAM there isnt much left for other applications thus you end up with a 'out of memory' error.
 
  • Like
Reactions: Loutreeeee

Rocketeer66

Newbie
Oct 21, 2019
70
66
Well, I do not know,

I wanted to update my graphics card driver and directx, but my machine writes that the latest versions are already installed.

My laptop is
HP Envy
Intel HD graphic 620
Resolution 3200x1800 px
8GB RAM

But, the problem is only with games that run Ren'py 7.3.x. Games that run the older version of Ren'py problem is not. So I wonder if there is no problem that the new version of the engine does not release the correct memory.
 
  • Like
Reactions: Loutreeeee

Rocketeer66

Newbie
Oct 21, 2019
70
66
Problem solved...

Although my laptop reported that it had the latest graphics driver, it didn't.

I downloaded the manual installation package from Intel's website and installed it.

Now I have driver version 26.20.100.7463, and the problem has disappeared.
 
  • Like
Reactions: toolkitxx

Loutreeeee

Newbie
Jun 9, 2019
77
105
Problem solved...

Although my laptop reported that it had the latest graphics driver, it didn't.

Now I have driver version 26.20.100.7463, and the problem has disappeared.
Same here ^^

Thank you Rocketeer66 and Toolkitxx for your answer and your support.

We won mouahahahaha
 
  • Like
Reactions: Rocketeer66

capitanqueso

Member
Jul 6, 2019
192
174
I know this thread is old but I found a solution for those out there having this issue, I just mixed two games in one folder with an updated version of RenPy (7.3.5.606)
My problem was with Acting.Lessons.v1.0.1 (Ren'py 7.3.0.271), definitely there is a huge memory leak (I blame rollback cache because I noticed there is no working limit when you rollback in Ver. 7.3.0.271)
Anyway, I just took a game made with RenPy 7.3.5.606 (In my case was BadHero-1.1.4-pc)
Then I copied in a new folder the entire "game" folder from Acting.Lessons.v1.0.1, and also the "lib" and "renpy" from BadHero
Also it's root files "BadHero.exe", "BadHero.sh" and "BadHero.py" and renamed them to "ActingLesson.exe", "ActingLesson.sh", ""ActingLesson.py" just to be sure.
There is also an exe file inside the folder /lib/windows-i686/BadHero.exe that need to be renamed as well, just to be sure.
So far it works flawlesly (even the savegames and the unlocked gallery events) I'm currently tracking the memory status while I play and it stays pretty regular even with crazy skipping!
Hope it helps someone!
By the way, I'm sure you can find the renpy files directly from the source but since I'm not a dev I have no idea where to find them
 

Stingus

Newbie
Jan 31, 2019
25
29
I know this thread is old but I found a solution for those out there having this issue, I just mixed two games in one folder with an updated version of RenPy (7.3.5.606)
My problem was with Acting.Lessons.v1.0.1 (Ren'py 7.3.0.271), definitely there is a huge memory leak (I blame rollback cache because I noticed there is no working limit when you rollback in Ver. 7.3.0.271)
Anyway, I just took a game made with RenPy 7.3.5.606 (In my case was BadHero-1.1.4-pc)
Then I copied in a new folder the entire "game" folder from Acting.Lessons.v1.0.1, and also the "lib" and "renpy" from BadHero
Also it's root files "BadHero.exe", "BadHero.sh" and "BadHero.py" and renamed them to "ActingLesson.exe", "ActingLesson.sh", ""ActingLesson.py" just to be sure.
There is also an exe file inside the folder /lib/windows-i686/BadHero.exe that need to be renamed as well, just to be sure.
So far it works flawlesly (even the savegames and the unlocked gallery events) I'm currently tracking the memory status while I play and it stays pretty regular even with crazy skipping!
Hope it helps someone!
By the way, I'm sure you can find the renpy files directly from the source but since I'm not a dev I have no idea where to find them
you my good sir are a bloody legend!! i followed your steps, and used deliverance isntead since i didn't have bad hero installed and it works perfectly! thank you so much!

PS sorry for necroing your necro post lol
 
  • Haha
Reactions: capitanqueso