Tutorial My methodology on debugging Renpy

Haley Smith

Member
Jan 16, 2018
447
519
Ever see or want to understand the renpy debug log that everyone is always requesting?
In need of the skills to understand those crazy words?
While here you go a step by step dissection of my process at finding what went wrong with your game.

First we need the log. This is the white screen of crash and the log.txt that appear when the game hits an error.

You don't have permission to view the spoiler content. Log in or register now.
First is a tracking of the last script calls that lead to the crash. Notice how its the new file that crashed the game. If it was all the same file it would be a local variable to that file. Since its a new file it could be A) local to the file. B) Global variable associated to file transfer handling.

You don't have permission to view the spoiler content. Log in or register now.
This is a list of all loaded variables. Their location in the computation and again the last variable is different. Stating the reason for the crash.
IOError means on/off error. The reason the system turned off.

While loading <'Image' 'cass grope_butt_d3_v1_1.jpg'>:
File "game/Cass_PS.rpy", line 2973, in <module>
IOError: Couldn't find file 'cass grope_butt_d3_v1_1.jpg'.

This is a system guessed synapsis. Yep you only need to read this 99.99999% of the time.

But now we have the reason it crashed not the cause for the crash. First Uren the file. Then check your asset list. As this file ends in .jpg and its the cause for the IOError I try to locate it.
Wether the file exists or doesn't we then check the code call. The file is game/Cass_PS.rpy the code call exited on line 2973 so we open the file and go to the line. The calls name is the same (assuming the code variable isn't being manipulated elsewhere.) We find that this call is requesting a missing asset. Rename a different file to match and you have a quick patch.
If its being manipulated read up the loaded variables and find what file is editing the file and its the same.

If plugging the missing asset with a different file works you can leave it until an official patch is ready. If it doesn't then the issue is due to a much larger issue and you need to repeat the steps after the next crash to see.