Console: OverflowError thrown when trying to open console

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
heathen
Newbie
Posts: 5
Joined: Sat May 12, 2018 3:32 pm
Contact:

Console: OverflowError thrown when trying to open console

#1 Post by heathen »

OS: MacOS High Sierra Version 10.13.6 (17G6030)

Ren'Py version: 7.2.2.491

Steps to reproduce:

Launch Project
Shift O

Optional steps to reproduce:

Launch Project
Shift D (dev screen)
Click on Console

Expected result: Console shows up

Actual result:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00console.rpy", line 802, in script
    python in _console:
  File "renpy/common/00console.rpy", line 803, in <module>
    console.interact()
  File "renpy/common/00console.rpy", line 341, in interact
    line = ui.interact()
OverflowError: value too large to convert to short

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

Full traceback:
  File "renpy/common/00console.rpy", line 802, in script
    python in _console:
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/ast.py", line 900, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/python.py", line 1930, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/00console.rpy", line 803, in <module>
    console.interact()
  File "renpy/common/00console.rpy", line 341, in interact
    line = ui.interact()
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/ui.py", line 289, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/core.py", line 2690, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/core.py", line 3174, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/core.py", line 2086, in draw_screen
    renpy.config.screen_height,
  File "render.pyx", line 516, in renpy.display.render.render_screen
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/screen.py", line 669, in render
    child = renpy.display.render.render(self.child, w, h, st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 1124, in render
    st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 1575, in render
    cwidth, cheight = sizeit('c', width, height, 0, 0)
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 1570, in sizeit
    rend = render(pos_d[pos], width, height, st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/viewport.py", line 264, in render
    surf = renpy.display.render.render(self.child, child_width, child_height, st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 925, in render
    surf = render(d, width - x, rh, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 1124, in render
    st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 925, in render
    surf = render(d, width - x, rh, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 1124, in render
    st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 925, in render
    surf = render(d, width - x, rh, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/display/layout.py", line 1124, in render
    st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/text/text.py", line 2001, in render
    layout = Layout(self, width, height, renders, splits_from=virtual_layout)
  File "/Users/uname/Games/renpy-7.1.1-sdk/renpy/text/text.py", line 744, in __init__
    textsupport.tweak_glyph_spacing(all_glyphs, lines, target_x_delta, target_y_delta, maxx, y)  # @UndefinedVariable
  File "textsupport.pyx", line 964, in renpy.text.textsupport.tweak_glyph_spacing
  File "textsupport.pxd", line 78, in renpy.text.textsupport.Line.y.__set__
OverflowError: value too large to convert to short

Darwin-17.7.0-x86_64-i386-64bit
Ren'Py 7.2.2.491
Working Title 1.0
Sat Apr 13 21:38:10 2019
Troubleshooting steps tried:
Verified game code via Lint
Verified game code via playthrough of all paths
Verified menu code via use of all menu options
Verified gallery via use of all gallery buttons
Short-circuited game by putting return right after label start

User avatar
plaster
Regular
Posts: 89
Joined: Thu Jul 11, 2013 1:03 am
Tumblr: plasterbrain
Soundcloud: plasterbrain
Location: Chicago
Contact:

Re: Console: OverflowError thrown when trying to open console

#2 Post by plaster »

Does this still happen if you try to open the console in a fresh project?

heathen
Newbie
Posts: 5
Joined: Sat May 12, 2018 3:32 pm
Contact:

Re: Console: OverflowError thrown when trying to open console

#3 Post by heathen »

Hmm - it works in a new project.

Where should I start checking? Screens? Something wonky with variables or persistent?

Having the error come from renpy.text.textsupport.Line.y.__set__ and then pass through everything to finally be thrown at ui.interact() doesn't give me a lot of information to start from.

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Console: OverflowError thrown when trying to open console

#4 Post by rames44 »

I had this happen once. I think this can happen if your console gets overwhelmed with content, since the console tries to save previous lines. Basically, if you have a series of errors that generate a lot of lines of output, you can overwhelm an array somewhere, I think.

As I recall, the way I got out of this was to change a configuration variable temporarily to limit the number of lines that the console tries to save/display so that it would discard some of it. But I can’t find the variable right now. Or maybe it was clearing persistent data.

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Console: OverflowError thrown when trying to open console

#5 Post by rames44 »

I think this is the one I used to fix this:

config.console_history_size: the number of commands to store in history. default: 100

Found this in 00console.rpy

As I recall, I tossed config.console_history_size=1 into my options.rpy, launched the app, opened the console and did something, then shut down the app and removed the line. I think that process caused Ren'py to truncate the information that was overflowing the console logic.

heathen
Newbie
Posts: 5
Joined: Sat May 12, 2018 3:32 pm
Contact:

Re: Console: OverflowError thrown when trying to open console

#6 Post by heathen »

@rames44 - Thanks, that did the trick.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot]