Fixing a crash where jumping from an ADV menu to an NVL menu crashes due to the NVL window not currently being shown. Thumbnail is from Discord Member Corn#0069.


RE:H Beta

The RE:H beta is well under way, and we can’t thank the beta testers enough for their patience and help in discovering all sorts of bugs. It’s not too late to join in via the $13+ Patreon tier! The bug discussed today was found by several testers.

Crash, boom, exceptions galore!

In RE:H, MC explores LA and holds many conversations with the denizens of the vampire world. To implement this, we use labels for the events and can jump from label to label very easily. RE:H also has a fairly dynamic window management system, switching between ADV (small horizontal textbox on the bottom of the screen) and NVL (large vertical textbox on the left side of the screen) modes fairly often.

Thanks to our beta testers, we’ve discovered that the game will crash when going from an ADV menu to an NVL menu. The error that Ren’Py gives is not the most helpful: TypeError: 'unicode' object is not callable.

Long story short, the reason is because the NVL window doesn’t exist yet when we jump to it, so then the NVL menu (which is shown on top of the NVL window) has nothing to be shown on.

Solution: add a callback such that whenever you go from an ADV menu to an NVL menu, the NVL menu remembers to show the window before it tries to display the menu.

Hopefully this does not cause more bugs, but it at least seems to fix this (fairly large but predictable) bug.

menu:
    "Jump to A":
        jump A
menu A (nvl=True, use_nvl=True):
    "Hello there":
        pass

# if jumping from adv menu to an nvl menu label, show the nvl window 
def jump_to_nvl_show(**kwargs):
    if "use_nvl" in kwargs:
        if kwargs['use_nvl']:
            print("running with nvl=True")
            nvl_show(None)
        kwargs.pop('use_nvl')
    return (), kwargs
config.menu_arguments_callback = jump_to_nvl_show
Chibi Heath

Artist: Discord Member Corn#0069