Page 1 of 1

[Question] Corrupted Save States

Posted: Mon Jan 23, 2017 3:19 am
by EchoFrost
Hello all!
I've been working on an update for a game that has been in development. Upon adding small improvements, attempting to load a save state yielded this traceback:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00action_file.rpy", line 427, in __call__
    renpy.load(fn)
Exception: Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
    python hide:
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\python.py", line 1695, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/_layout/screen_main_menu.rpym", line 30, in <module>
    ui.interact()
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\ui.py", line 285, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\core.py", line 2492, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\core.py", line 3166, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\transition.py", line 45, in event
    return self.new_widget.event(ev, x, y, st)  # E1101
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\screen.py", line 651, in event
    rv = self.child.event(ev, x, y, st)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 224, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 224, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\behavior.py", line 889, in event
    return handle_click(self.clicked)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\behavior.py", line 824, in handle_click
    rv = run(action)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\behavior.py", line 306, in run
    return action(*args, **kwargs)
  File "renpy/common/00action_file.rpy", line 427, in __call__
    renpy.load(fn)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\loadsave.py", line 594, in load
    log.unfreeze(roots, label="_after_load")
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\python.py", line 1650, in unfreeze
    self.rollback(0, force=True, label=label, greedy=greedy, on_load=True)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\python.py", line 1509, in rollback
    raise Exception("Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?")
Exception: Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?

Windows-8-6.2.9200
Ren'Py 6.99.12.2.2029
Palinurus 2.1
I tried reverting to a previous build, and deleting persistent, but neither of those fixed the problem. Any help in preserving save states would be appreciated! Thanks!

Re: [Question] Corrupted Save States

Posted: Mon Jan 23, 2017 4:03 pm
by gas
Try to config to disable rollbacks, then load.

Code: Select all

define config.rollback_enabled = False

Re: [Question] Corrupted Save States

Posted: Mon Jan 23, 2017 6:36 pm
by EchoFrost
Hello gas! Thanks for the advice! I went ahead and added

Code: Select all

config.rollback_enabled = False
to my options.rpy file and loaded the game. I got the same traceback as before:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00action_file.rpy", line 427, in __call__
    renpy.load(fn)
Exception: Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
    python hide:
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\python.py", line 1695, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/_layout/screen_main_menu.rpym", line 30, in <module>
    ui.interact()
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\ui.py", line 285, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\core.py", line 2492, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\core.py", line 3166, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\transition.py", line 45, in event
    return self.new_widget.event(ev, x, y, st)  # E1101
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\screen.py", line 651, in event
    rv = self.child.event(ev, x, y, st)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 224, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 952, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\layout.py", line 224, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\behavior.py", line 889, in event
    return handle_click(self.clicked)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\behavior.py", line 824, in handle_click
    rv = run(action)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\display\behavior.py", line 306, in run
    return action(*args, **kwargs)
  File "renpy/common/00action_file.rpy", line 427, in __call__
    renpy.load(fn)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\loadsave.py", line 594, in load
    log.unfreeze(roots, label="_after_load")
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\python.py", line 1650, in unfreeze
    self.rollback(0, force=True, label=label, greedy=greedy, on_load=True)
  File "C:\Users\Brad\Desktop\renpy-6.99.12.2-sdk\renpy\python.py", line 1509, in rollback
    raise Exception("Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?")
Exception: Couldn't find a place to stop rolling back. Perhaps the script changed in an incompatible way?

Windows-8-6.2.9200
Ren'Py 6.99.12.2.2029
Palinurus 2.1
Anything else I should try?

Re: [Question] Corrupted Save States

Posted: Wed Jan 25, 2017 7:25 pm
by PyTom
What you might want to do is to pull the .rpyc files from the released version, drop them in over the .rpyc files you have, and run the game. That might solve the problem. I would not disable rollbacks.

Also, you need to make sure that the changes you made make sense. Ren'Py generally can't deal with huge refactors after release, like moving code from one file to another, or changing the order of code grossly within a file. What it does is to look at the old and new files, and try to combine them. While it works well in practice, it is possible to confuse it to the point where it won't work.

Re: [Question] Corrupted Save States

Posted: Thu Jan 26, 2017 5:26 am
by EchoFrost
Thanks for the reply Tom, I'll give it a try. To be honest the only changes I had made before noticing the error was change the main menu background and swap in some new music.