[RESOLVED] Save Files with no Stack?

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.
Post Reply
Message
Author
DraymondDarksteel
Newbie
Posts: 13
Joined: Mon Sep 05, 2016 1:51 pm
Contact:

[RESOLVED] Save Files with no Stack?

#1 Post by DraymondDarksteel »

Howdy. I've been working on a Ren'Py game for a few months now, and sometimes players send me their save files to help me debug them. Recently, though, the save files in question aren't allowing me to load any of their data. Formerly, I would simply download their save file, rename it, and drop it into my "saves" folder on my dev account. I could then look at their variables, their progress in-game, and so on.

However, recently the save files people send me appear to have no data. I inspect their variables using the console, and all the values appear to be the default. Further, nothing actually loads--the screen stays on wherever I loaded the save from, whether it's the main menu or in-game.

In these save files, renpy.call_stack_depth() returns 0, and renpy.get_return_stack() returns [].

However, the save files do show the correct thumbnail on the save/load screens, and on online save editors that can open .save files, I see some variables I'm looking for--not all of them, but a good few. Players report that they're able to save, load, and interact with their save files as normal. I believe this may be a problem on my end, then, and not something to do with the game, but I'm still very hesitant to put out a new build while this issue is unresolved.

All I can think of that's changed is that I recently upgraded my Ren'Py version to 8.2.0, from 8.0.3, but that may just be a coincidence in terms of timing.

If you can provide any advice, I will very much appreciate it.
Last edited by DraymondDarksteel on Sun Feb 11, 2024 12:09 am, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Save Files with no Stack?

#2 Post by PyTom »

Can you send me the game and a save file? This could be a bug, or it could be something else. I'd like to debug this in-engine and see what's going on.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

DraymondDarksteel
Newbie
Posts: 13
Joined: Mon Sep 05, 2016 1:51 pm
Contact:

Re: Save Files with no Stack?

#3 Post by DraymondDarksteel »

Absolutely. Thank you very much, I definitely didn't expect your personal attention.

Here is a download link to the game, for Windows, on Mediafire. 1.05GB.

Here is a .zip file with three saves, also on Mediafire. 4.7MB. These saves were sent by three different players, saving at three different points throughout the game.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Save Files with no Stack?

#4 Post by PyTom »

So, the issue is something entirely different.

In Ren'Py 8.1, a new Save Token Security system was implemented, which means that when someone is loading a save from a different computer, Ren'Py will notify the user and ask if they want to allow it. This is done by two new yesno prompts:

Code: Select all

    gui.UNKNOWN_TOKEN = _("This save was created on a different device. Maliciously constructed save files can harm your computer. Do you trust this save's creator and everyone who could have changed the file?")
    gui.TRUST_TOKEN = _("Do you trust the device the save was created on? You should only choose yes if you are the device's sole user.")
What's happening is your game is being asked to prompt the user, and since your confirm screen doesn't have these prompts, there's a blank screen. Because of how that screen is being called, there is not stack. (This is actually happening before the load proper takes place.)

You need to modify your confirm screen to prompt the user for these, and I highly recommend that it display unknown messages to the user, in case future versions of Ren'Py add more messages that would need to be displayed to the user.

As to the underlying cause, it seems likely that someone either moved the save files between computers, or edited them with a savefile editor.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Semrush [Bot]