Ren'Py Ren'py crashes being caused by security tokens

May 30, 2019
62
30
So, I don't know why, or how, but Ive found, through trial-and-error, that all my ren'py games have been crashing due to two textfiles that show up in the ren'py save folder in appdata\roaming.

These files are 'security_keys.txt' and 'upgraded.txt'. they exist in a folder named 'tokens'.

Whenever I run a game, it generates a code in the security key file, and adds that game to a list in the upgraded file. for some reason, launching with the upgraded file set to read-only makes the game crash with the following error message:

You don't have permission to view the spoiler content. Log in or register now.

However, if I leave it readable, all my games will crash with no log, something clearly to do with these files.

I have no idea why they are there, what is causing them to exist, or what their purpose is, but it's driving me insane as they've made it impossible to play any ren'py games.

I'm adding the files in question as attachments, incase they're helpful in figuring this stuff out somehow.

A million thanks in advance to anyone who can help me solve this issue.
 

peterppp

Active Member
Mar 5, 2020
762
1,348
getting a permission denied error when you set the file to read-only doesn't sound strange at all if renpy tries to write to that file.

how do you even know that those two files are the issue here, and that it's not something completely unrelated to those files? because, as said, the error you get is caused by you setting the file to read-only
 
Last edited:
  • Like
Reactions: anne O'nymous
May 30, 2019
62
30
the read-only error was how i confirmed it, but i noticed every time i ran the game, itd spawn or edit those files, then crash without a log. than i ran it again, and itd be random if it worked or not, and then if i run it a 3rd time, it will always crash without producing any logs.
 

peterppp

Active Member
Mar 5, 2020
762
1,348
the read-only error was how i confirmed it, but i noticed every time i ran the game, itd spawn or edit those files, then crash without a log. than i ran it again, and itd be random if it worked or not, and then if i run it a 3rd time, it will always crash without producing any logs.
the only thing you have confirmed is that you get an error when making that file read-only. you haven't explained what makes you think those files have anything to do with the crashes. a lot of stuff happens every time a game starts. just because you've found one of the many things that happen, doesn't mean that thing has to do with the crashes.

when you say producing no log when it crashes, do you mean that log.txt in the root folder isn't updated or just doesn't exist?
 

peterppp

Active Member
Mar 5, 2020
762
1,348
It's updated but shows nothing out of the ordinary for a standard start, hang on, ill attach it:
as a test, unplug your ps4 controller and any other controller might have.
also see if your antivirus could be the cause by disabling it.
i've read that audio-related stuff like having a headset plugged in have caused some issues too, but i don't remember the specifics.

maybe someone else can help more
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,972
16,229
the read-only error was how i confirmed it,
It remind me about a joke...
A scientist is doing some experiment with a smart flea.
He cut one of his leg, and order her to jump. The flea jump.
He cut a second leg, and order her to jump. The flea had more difficultly, but still achieved to jump.
He cut a third leg, and again order the flea to jump. It took time, but in the end the flea did a jump.
Then come the moment where the scientist cut the fourth and last leg, and as usual ordered the flea to jump. Like, after a long wait, the flea still haven't jumped, the scientist wrote as conclusion of this study: "When all legs are cut, fleas become deaf."


It's exactly the same thing you did. You did a totally unrelated experiment, and came to a totally ridiculous conclusion.
Would you'd just took a look at the log file when the upgraded.txt file is in read-only, you would have seen that it stop at:
Fri Dec 22 21:55:32 2023
Windows-10-10.0.19042
Ren'Py 8.1.1.23060707


Bootstrap to the start of init.init. took 0.03s
Early init. took 0.00s
Loader init. took 0.05s
Loading error handling. took 0.16s
Loading script. took 1.11s
Therefore way before Ren'Py crash for you in normal use. Be also noted that the log file you attached show that Ren'Py did all its init process without issues.
More precisely, the log file stop after the calibration of the controller. Except that, if Ren'Py achieved to calibrate it by itself, there should be a "Controller mapping for" line in the said log file. It's absence can only happen when the calibration screen have been canceled... And It don't seem that this cancellation can be automatic.

After, I don't say that the two are linked, the cause of the crash can still be something else. But one thing is 100% sure, it have absolutely nothing to do with the security tokens.