ui.bar() bugs inside ui.viewport()

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

ui.bar() bugs inside ui.viewport()

#1 Post by iichan_lolbot »

Something strange happens, when i try to call lots of ui.bar()'s inside a ui.viewport():
* visible part of ui.viewport() is filled with properly drawn ui.bar()'s
* invisible ui.bars()'s are never rendered, even when i scroll to them

I'm using RenPy 6.13.7.1646 under windows 7.

Maybe I'm doing something terribly wrong, but it looks like a bug I'd like to be fixed.
Core part of my project is attached to reproduce it (only left frame is filled by two sample plugins).


I also get this text in renpy.exe.log, maybe it's my fault, maybe it's somehow related, but I'm not sure how:

Code: Select all

Exception in thread Thread-1:
Traceback (most recent call last):
  File "threading.pyo", line 532, in __bootstrap_inner
  File "threading.pyo", line 484, in run
  File "c:\renpy\renpy\loadsave.py", line 328, in autosave_thread
  File "c:\renpy\renpy\loadsave.py", line 157, in save
  File "c:\renpy\renpy\loadsave.py", line 46, in dump
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
Attachments
renpy_ui_bar_fail.png
tangenpy.core.zip
(6.66 KiB) Downloaded 43 times

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: ui.bar() bugs inside ui.viewport()

#2 Post by iichan_lolbot »

help!

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: ui.bar() bugs inside ui.viewport()

#3 Post by PyTom »

Can you try setting the child_size parameter of the viewport to something absurdly large, like (65535, 65535)?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: ui.bar() bugs inside ui.viewport()

#4 Post by iichan_lolbot »

It works!

Code: Select all

        vp_plugin = ui.viewport(mousewheel=True,child_size=(500, 65535))
        active_plugin["interface"]()
Is it a good idea to leave something like this in production code? Or you would provide a better solution later?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: ui.bar() bugs inside ui.viewport()

#5 Post by PyTom »

There's no problem with this in production code, although I may look into a fix for this at some point. (It may be something as simple as supporting xminimum and yminimum on bars.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

iichan_lolbot
Veteran
Posts: 206
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: ui.bar() bugs inside ui.viewport()

#6 Post by iichan_lolbot »

Do you have any ideas, why do I get this exceptions on exit?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: ui.bar() bugs inside ui.viewport()

#7 Post by PyTom »

The exception comes from trying to save something that isn't savable. Consider setting config.use_cpickle = False to get a better error.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]