I found a really strange bug. First of all, since my "RPG framework" is insanely complex (really pushing renpy to its limits) it might be my fault. However, I don't know if just using the standard renpy commands I can cause a memory leak?
The memory leaks happens if you use DynamicDisplayable. I use it for tooltips.
Code: Select all
init python:
class Tooltip(object):
def __init__(self,id):
self.id=id;self.ok=None;self.bk=renpy.store.tipT
def show(self):
self.ok = True
renpy.store.tipT=self.id
def hide(self):
if self.ok:
renpy.store.tipT=self.bk
self.ok = False
def TTipMaster(st,at):
mollusk=None
mollusk=ui.frame(yalign=0.995,yminimum=16,ymaximum=16,xmaximum=1020, xminimum=1020,xfill=True,style="inv")
ui.text(renpy.store.tipT,size=16,xalign=0.5)
return mollusk, .2
init:
image Toolz = DynamicDisplayable(TTipMaster)
That's it - if I comment the show statement, everything works fine (but obviously I don't see a tooltip). If I leave the PC on with tooltip enabled, using windows Task Manager I see renpy.exe process that gradually eats more RAM, which usually means a memory leak. After some minutes (without doing anything) the game crashes, sometimes forcing a hard reset of the PC
I never noticed it before because when I am out of combat, somehow it resets, or when I use Shift+R to reload the code it also "resets".
As I said, might be some weird stuff I'm doing somewhere else in my code, but I never had a memory leak crash before in all my other customized renpy games...