Page 1 of 1

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

Posted: Thu Nov 24, 2011 5:16 pm
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

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

Posted: Mon Nov 28, 2011 2:52 pm
by iichan_lolbot
help!

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

Posted: Mon Nov 28, 2011 7:11 pm
by PyTom
Can you try setting the child_size parameter of the viewport to something absurdly large, like (65535, 65535)?

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

Posted: Tue Nov 29, 2011 2:11 am
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?

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

Posted: Tue Nov 29, 2011 2:56 pm
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.)

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

Posted: Sun Dec 04, 2011 1:52 pm
by iichan_lolbot
Do you have any ideas, why do I get this exceptions on exit?

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

Posted: Sun Dec 04, 2011 2:03 pm
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.