Page 1 of 1

Re: JEdit Trouble (Solved) + Runtime Error (Solved)

Posted: Sun Jul 27, 2014 7:02 am
by xela
Every time I try to open anything in JEdit, this error occurs (From the launcher, JEdit along works just fine):

I'm sorry, but an uncaught exception occurred.
While running game code:
File "launcher/game/front_page.rpy", line 248, in script
call screen front_page
File "renpy/common/000statements.rpy", line 426, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "launcher/game/editor.rpy", line 357, in __call__
renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
File "launcher/game/interface.rpy", line 321, in error
common(_("ERROR"), store.ERROR_COLOR, message=message, submessage=submessage, back=action, **kwargs)
File "launcher/game/interface.rpy", line 287, in common
return screen_func("common", title=title, title_color=title_color, message=message, submessage=submessage, back=back, continue_=continue_, **kwargs)
File "launcher/game/interface.rpy", line 144, in <module>
layout "subtitle"
UnicodeDecodeError: 'ascii' codec can't decode byte 0x84 in position 78: ordinal not in range(128)
Also I've been getting Runtime C++ errors when trying to run my game (every 2 - 3 launches), maybe someone has an idea on what could be causing that?

Re: JEdit Trouble

Posted: Sun Jul 27, 2014 1:50 pm
by PyTom
Please post the full traceback. Also, check to see if there are any non-ascii characters in the path to Ren'Py, or any of your game's filenames.

Re: JEdit Trouble (Solved) + Runtime Error

Posted: Sun Jul 27, 2014 2:27 pm
by xela
PyTom wrote:Please post the full traceback. Also, check to see if there are any non-ascii characters in the path to Ren'Py, or any of your game's filenames.
I took a look at what happened to my computer yesterday, Avast AV has auto-updated Java, so I've just reinstalled that and everything is back to normal.

Do you have any clue as to what may be a cause of this:

(I've asked others to test it and this is not isolated to my PC so it's not a drivers/hardware issue)

Image

I'd really appreciate any help
(or at least a nudge in the right direction) cause this is bugging the hell out of me, it only happens in a game I am working on, everything else works just fine. The error is random, about one out of three times the game is launched.

This was the full java issue traceback (not that it matters):

Code: Select all

While running game code:
  File "launcher/game/front_page.rpy", line 248, in script
    call screen front_page
  File "renpy/common/000statements.rpy", line 426, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "launcher/game/editor.rpy", line 357, in __call__
    renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
  File "launcher/game/interface.rpy", line 321, in error
    common(_("ERROR"), store.ERROR_COLOR, message=message, submessage=submessage, back=action, **kwargs)
  File "launcher/game/interface.rpy", line 287, in common
    return screen_func("common", title=title, title_color=title_color, message=message, submessage=submessage, back=back, continue_=continue_, **kwargs)
  File "launcher/game/interface.rpy", line 144, in <module>
    layout "subtitle"
UnicodeDecodeError: 'ascii' codec can't decode byte 0x84 in position 78: ordinal not in range(128)

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

Full traceback:
  File "launcher/game/front_page.rpy", line 248, in script
    call screen front_page
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\ast.py", line 1593, in execute
    self.call("execute")
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\ast.py", line 1611, in call
    renpy.statements.call(method, parsed, *args, **kwargs)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\statements.py", line 144, in call
    return method(parsed, *args, **kwargs)
  File "renpy/common/000statements.rpy", line 426, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\exports.py", line 2103, in call_screen
    rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\ui.py", line 264, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\core.py", line 2065, in interact
    repeat, rv = self.interact_core(preloads=preloads, **kwargs)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\core.py", line 2652, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 774, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 774, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 774, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\screen.py", line 345, in event
    rv = self.child.event(ev, x, y, st)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 774, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 180, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 774, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 180, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 774, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 180, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 774, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 180, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\layout.py", line 774, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\behavior.py", line 726, in event
    return handle_click(self.clicked)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\behavior.py", line 669, in handle_click
    rv = run(action)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\behavior.py", line 274, in run
    return var(*args, **kwargs)
  File "launcher/game/editor.rpy", line 357, in __call__
    renpy.invoke_in_new_context(interface.error, _("An exception occured while launching the text editor:\n[exception!q]"), error_message, exception=exception)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\game.py", line 235, in invoke_in_new_context
    return callable(*args, **kwargs)
  File "launcher/game/interface.rpy", line 321, in error
    common(_("ERROR"), store.ERROR_COLOR, message=message, submessage=submessage, back=action, **kwargs)
  File "launcher/game/interface.rpy", line 287, in common
    return screen_func("common", title=title, title_color=title_color, message=message, submessage=submessage, back=back, continue_=continue_, **kwargs)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\exports.py", line 2103, in call_screen
    rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\ui.py", line 264, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\core.py", line 2076, in interact
    scene_lists.replace_transient()
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\core.py", line 592, in replace_transient
    self.remove(layer, tag)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\core.py", line 866, in remove
    self.hide_or_replace(layer, remove_index, "hide")
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\core.py", line 790, in hide_or_replace
    d = oldsle.displayable._hide(now - st, now - at, prefix)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\screen.py", line 204, in _hide
    hid.update()
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\display\screen.py", line 288, in update
    self.screen.function(**self.scope)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\screenlang.py", line 1239, in __call__
    renpy.python.py_exec_bytecode(self.code.bytecode, locals=scope)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\python.py", line 1382, in py_exec_bytecode
    exec bytecode in globals, locals
  File "launcher/game/interface.rpy", line 144, in <module>
    layout "subtitle"
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\ui.py", line 469, in __call__
    w = self.function(*args, **keyword)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\text\text.py", line 1165, in __init__
    self.set_text(text, scope, substitute)
  File "D:\Coding\Dropbox\Dev\RenPy\renpy\text\text.py", line 1225, in set_text
    i = unicode(i)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x84 in position 78: ordinal not in range(128)

Windows-7-6.1.7601-SP1
Ren'Py 6.17.7.521
Ren'Py Launcher 6.17.7.521

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Sun Jul 27, 2014 11:35 pm
by PyTom
For the runtime error, if you can get me a copy of the game, I can try to debug it from here.

When you send me the game, please include concise instructions on how I can repeat the problem. It's important that the instructions be concise - when debugging a problem like this, I'll restart Ren'Py dozens of times. The more clicking I have to do to get to the problem, the less efficient I am, and the more surly I get.

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Mon Jul 28, 2014 12:43 am
by xela
PyTom wrote:and the more surly I get.
LoL :)

Thanks! I'll try to figure it out myself first, been doing some testing, it may be related to something on the main menu. It only happens when I load the game or reload it to the main menu. It NEVER happens when reloading outside main menu.

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Mon Jul 28, 2014 1:34 am
by xela
I tracked it down to these styles:

Code: Select all

    # Main Menu:
    style mm_frame is default:
        background Frame(Transform(im.Twocolor("content/gfx/frame/window_frame.png", white, purple), alpha=0.5), 30, 30)
        xpadding 10
        ypadding 10
    
    style mm_button:
        is malina_1_button
        size_group "mm"
        
    style mm_button_text:
        is black_serpent
        drop_shadow [(1, 1)]
        drop_shadow_color grey

    style malina_1_button is button:
        background Transform(Frame("content/gfx/interface/buttons/malina_1.png", 5, 5), alpha=0.8)
        hover_background Transform(Frame(im.MatrixColor("content/gfx/interface/buttons/malina_1.png", im.matrix.brightness(0.15)), 5, 5), alpha=0.8)
        insensitive_background Transform(Frame(im.Sepia("content/gfx/interface/buttons/vista_button.png"), 5, 5), alpha=0.7)
        xpadding 20
        ypadding 20
Happens only when one of the buttons is insensitive when the game is started (randomly one in every two - three launches). If button is sensitive (can load a quicksave in this case), it never happens at all.

I'll try to fix it tomorrow, too tired to continue tonight.

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Tue Jul 29, 2014 10:18 pm
by PyTom
If you can get a chance to track it down more, and get me a replication, I'd appreciate it. It's possible that the particular image is causing the problem - like if it has a strange size or something.

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Wed Jul 30, 2014 9:49 pm
by xela
I tried but it seems to be too complicated of an error for me to track down as replicating the main screen in a fresh project proved to be working just fine even with that quickload button inactive.

It's very weird... but with exactly the same styles, exactly the same resolution and exactly the same fonts and pictures, full game crashes like clockwork only when that one button is inactive. Getting my game to crash when the button is active is impossible. So it's out of my depth and not a big dead either, I expect that just changing the style or simply not drawing the button on a condition will solve the problem. If not, I'll just remove it, Quicksaves can simply be loaded from the load screen.

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Wed Jul 30, 2014 11:55 pm
by PyTom
Can I get a copy of your game, to see if I can try it here? (Also, instructions on how to replicate.)

Runtime Error

Posted: Thu Jul 31, 2014 3:50 pm
by xela
The game is huge and there is too much code to go through, it's also a parody/fanfic/(partly)hentai/sim so there may be some minor copyrights violations (and I am not sure if you're ok with downloading that).

In any case, while stripping the resources down to the very core so the download size would be reasonable, I managed to narrow the error down to it's very minimum (just a font, two animations and a bit of Python code) and put that on a clean Ren'Py project:

Link

Notes:
- I've removed all the styles mentioned in previous post, they only have effect on this issue in the full game, this base version is all about predicting the preference screen, alpha blend and animations. (I have no idea how this is possible, but it's true)
- Runtime Error will NEVER occur if preferences screen (with the second animation) is not being predicted.
- Note that both the Alpha blend and animation flicker when the screen is predicted, yet work perfectly when it's not.

In order to replicate:
Either keep launching/closing the project OR just click on Start button, skip to the end (just two mouse clicks, it's a default renpy project start label), returning to the main menu. Either approach will crash Ren'Py sooner or later (for me it's once every 2-3 attempts).

Edit: It's prolly the size of the animation or the amount of frames now that I think of it, removing some of the images from it, removes the error.

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Mon Aug 04, 2014 11:41 pm
by PyTom
I was a able to repeat this, and tracked the problem down to the GIF loading code.

I haven't been able to fix it yet, but after converting all the images to PNGs, the problem went away. So if you need a workaround, that's it. (The PNGs are also smaller, so I can't see a reason to use GIF.)

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Mon Aug 04, 2014 11:56 pm
by xela
Thanks, I'll batch-convert all gif files.

If you need a real bug to squash, please take a look at screen freezing when using Drag/Drop reported in other threads :) It's by far the most serious issue (imo) right now since it is something that's causing very serious problems and there doesn't seem to be a simple fix :(

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Tue Aug 05, 2014 12:03 am
by PyTom
That was fixed a few days ago.

Re: Re: JEdit Trouble (Solved) + Runtime Error

Posted: Tue Aug 05, 2014 12:15 am
by xela
Didn't do it for me (I received an email noting that there was a fix), I've copied the focus fix and nothing changed, screen is still freezing :( I'll wait for the release, maybe I did something wrong.

Maybe it's my imagination, but after converting all gifs (I had a few hundred in animations and normal images), everything seems to work a lot better, even screens that never displayed them :) Thanks for the tip.