As stated in the subject, I've come across an issue that I thought was part of something broken in my own game's code but which turns out to happen in all renpy games I run from Renpy version 7.4.3.1414.
There are two parts to this issue.
First, when a gamepad is plugged in and any input is used from the gamepad at all, the game immediately crashes.
Second, when a gamepad is plugged in even just left to sit out on the desk untouched and no inputs are given, the game will occasionally experience a hiccup that causes a NameError: global name 'name' not defined. I'll use the traceback from The Question as an example below.
The good news is, this doesn't seem to happen in other versions of Renpy so I can get around it very easily (tested and confirmed this doesn't happen in 7.3.5 or 7.5.1) but even after finding this error dozens of times I can't figure out why it happens.
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "renpy/common/00start.rpy", line 274, in script
python:
File "renpy/common/00start.rpy", line 274, in script
python:
File "renpy/common/00start.rpy", line 278, in <module>
renpy.call_in_new_context("_main_menu")
NameError: global name 'name' is not defined
-- 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 274, in script
python:
File "renpy/common/00start.rpy", line 274, in script
python:
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/00start.rpy", line 278, in <module>
renpy.call_in_new_context("_main_menu")
File "renpy/game.py", line 344, in call_in_new_context
return renpy.execution.run_context(False)
File "renpy/execution.py", line 922, in run_context
context.run()
File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
python hide:
File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
python hide:
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/_layout/screen_main_menu.rpym", line 28, in <module>
python hide:
File "renpy/common/_layout/screen_main_menu.rpym", line 35, in _execute_python_hide
ui.interact()
File "renpy/ui.py", line 298, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "renpy/display/core.py", line 3101, 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 3897, in interact_core
renpy.display.behavior.skipping(ev)
File "renpy/display/behavior.py", line 272, in skipping
if map_keyup(ev, "skip") or map_event(ev, "stop_skipping"):
File "renpy/display/behavior.py", line 242, in map_keyup
if (name in ev.eventnames) and ev.up:
NameError: global name 'name' is not defined
Windows-10-10.0.19041
Ren'Py 7.4.3.1414
The Question Ren'Py 7 Edition
Mon Jul 18 20:01:11 2022