help renpy games wont open

trybalman

New Member
Oct 16, 2017
4
2
I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/00start.rpy", line 205, in script call
call _gl_test
File "renpy/common/00gltest.rpy", line 387, in script
$ __gl_test()
File "renpy/common/00start.rpy", line 205, in script call
call _gl_test
File "renpy/common/00gltest.rpy", line 387, in script
$ __gl_test()
File "renpy/common/00gltest.rpy", line 387, in <module>
$ __gl_test()
File "renpy/common/00gltest.rpy", line 317, in _m1_00gltest__gl_test
_gl_performance_test()
File "renpy/common/00gltest.rpy", line 342, in _gl_performance_test
ui.interact(suppress_underlay=True, suppress_overlay=True)
AttributeError: 'SWDraw' object has no attribute 'scale_fast'

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

Full traceback:
File "renpy/bootstrap.py", line 326, in bootstrap
renpy.main.main()
File "renpy/main.py", line 617, in main
run(restart)
File "renpy/main.py", line 148, in run
renpy.execution.run_context(True)
File "renpy/execution.py", line 922, in run_context
context.run()
File "renpy/common/00start.rpy", line 205, in script call
call _gl_test
File "renpy/common/00gltest.rpy", line 387, in script
$ __gl_test()
File "renpy/common/00start.rpy", line 205, in script call
call _gl_test
File "renpy/common/00gltest.rpy", line 387, in script
$ __gl_test()
File "renpy/ast.py", line 922, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "renpy/python.py", line 2218, in py_exec_bytecode
exec(bytecode, globals, locals)
File "renpy/common/00gltest.rpy", line 387, in <module>
$ __gl_test()
File "renpy/common/00gltest.rpy", line 317, in _m1_00gltest__gl_test
_gl_performance_test()
File "renpy/common/00gltest.rpy", line 342, in _gl_performance_test
ui.interact(suppress_underlay=True, suppress_overlay=True)
File "renpy/ui.py", line 298, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "renpy/display/core.py", line 3006, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
File "renpy/display/core.py", line 3516, in interact_core
self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
File "renpy/display/core.py", line 2380, in draw_screen
renpy.display.draw.draw_screen(surftree)
File "renpy/display/swdraw.py", line 869, in draw_screen
if self.scale_fast:
AttributeError: 'SWDraw' object has no attribute 'scale_fast'

Windows-10-10.0.19041
Ren'Py 7.4.1.1270
Milfy City 1.0b
Sun Sep 24 09:14:15 2023
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
AttributeError: 'SWDraw' object has no attribute 'scale_fast'
Hmm...

So, it's a bug in both the 7.4.0 and 7.4.1 version of Ren'Py, that happen when (it's complicated) the screen size do not correspond to the screen size... And, no, it doesn't mean when you rescale the game window, it's really relative to the screen size itself. I guess that it happen when the environment is virtualized in a way or another.
The fact that it stayed in two versions, while being the remain of a small change, tend to point as a really exceptional situation.

If you effectively play the game in a virtualized environment, try to have the host (wine, virtualbox, whatever) run in full screen, perhaps that it suffice.
Else, the only way to fix this is to directly update Ren'Py core sources.

[path to the game]/renpy/display/swdraw.py line 663 and following:
Python:
        if self.window is self.screen:

            pygame.display.update(updates)

        else:

            if self.scale_fast:
                pygame.transform.scale(self.window, self.screen.get_size(), self.screen)
            else:
                renpy.display.scale.smoothscale(self.window, self.screen.get_size(), self.screen)

            pygame.display.flip()
should become:
Python:
        if self.window is self.screen:

            pygame.display.update(updates)

        else:
            renpy.display.scale.smoothscale(self.window, self.screen.get_size(), self.screen)

            pygame.display.flip()
It happen way to early, and way too deep, in the bootstrap process to be effectively fixable in a soft way.