Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 18, in script
python:
Exception: Potential return stack corruption: dynamic=1 return=0
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 18, in script
python:
File "C:\Users\USER\Downloads\renpysdk\renpy\execution.py", line 349, in check_stacks
raise e
Exception: Potential return stack corruption: dynamic=1 return=0
Windows-8-6.2.9200
Ren'Py 6.99.12.3.2123
but can't compile any releases with it so is there a way to fix it or to suppress the exception?
This is already global. Declaring it as such when you are already on global scope is a no-no. Get rid of that and it should work fine. Assuming that it's what causing the issue, it should disappear after it is removed.
init:
$ arr = dict() <---- line 20
$ entries = []
python:
global this
this=This()
global wtevent
global screens
screens=ScreenCollection()
global choose
choose=None
global time
time=Time()
global music
music=Music()
done it but still have the same problem now only not at the python: but at dict
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 20, in script
Exception: Potential return stack corruption: dynamic=1 return=0
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 20, in script
File "C:\Users\USER\Downloads\renpysdk\renpy\execution.py", line 349, in check_stacks
raise e
Exception: Potential return stack corruption: dynamic=1 return=0
Windows-8-6.2.9200
Ren'Py 6.99.12.3.2123
also can i ask what a potential stack corruption is / causes it? because it doesn't seem dire?
A number of thing can cause it, this error is thrown when there is a weird difference between length of dynamic and return stacks of your context.
You misunderstood what I was suggestion you to do. STOP declaring variables global while working on global namespace. Declare global only within functions and methods, nowhere else!
I'm unable to repeat this in my development version of Ren'Py. Can I suggest trying out 6.99.12.4, to see if the problem is fixed there? If it's not, please zip up your game and send it to me so I can figure out what's wrong.
Supporting creators since 2004 (When was the last time you backed up your game?)