Spurious ui.close(), Means?

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
User avatar
tiya_nofurita
Miko-Class Veteran
Posts: 669
Joined: Fri Jun 22, 2012 7:23 pm
Completed: ALLBLACK Phase 1, Heart's Blight, Last Rx., EDDA Cafe, Kohana, Half Moon
Projects: ALLBLACK Phase 2
Organization: VN Project Indonesia
Deviantart: SECONDARY-TARGET
itch: NSAID
Location: I can be everywhere
Discord: 3,4-Methylendioxymethamphetamine#4886
Contact:

Spurious ui.close(), Means?

#1 Post by tiya_nofurita »

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00gamemenu.rpy", line 163, in script
    $ ui.interact()
  File "renpy/common/00gamemenu.rpy", line 163, in <module>
    $ ui.interact()
Exception: Spurious ui.close().

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

Full traceback:
  File "renpy/common/00gamemenu.rpy", line 163, in script
    $ ui.interact()
  File "D:\Ren'Py 6.17.5\renpy\ast.py", line 785, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "D:\Ren'Py 6.17.5\renpy\python.py", line 1382, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/00gamemenu.rpy", line 163, in <module>
    $ ui.interact()
  File "D:\Ren'Py 6.17.5\renpy\ui.py", line 247, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\Ren'Py 6.17.5\renpy\display\core.py", line 2160, in interact
    scene_lists.replace_transient()
  File "D:\Ren'Py 6.17.5\renpy\display\core.py", line 669, in replace_transient
    self.remove(layer, tag)
  File "D:\Ren'Py 6.17.5\renpy\display\core.py", line 943, in remove
    self.hide_or_replace(layer, remove_index, "hide")
  File "D:\Ren'Py 6.17.5\renpy\display\core.py", line 867, in hide_or_replace
    d = oldsle.displayable._hide(now - st, now - at, prefix)
  File "D:\Ren'Py 6.17.5\renpy\display\screen.py", line 423, in _hide
    self.update()
  File "D:\Ren'Py 6.17.5\renpy\display\screen.py", line 557, in update
    renpy.ui.close()
  File "D:\Ren'Py 6.17.5\renpy\ui.py", line 325, in close
    stack[-1].close(d)
  File "D:\Ren'Py 6.17.5\renpy\sl2\slast.py", line 138, in close
    raise Exception("Spurious ui.close().")
Exception: Spurious ui.close().

Windows-7-6.1.7601-SP1
Ren'Py 6.18.3.761
ERASER 0.1
Any idea how could it be? I just copy paste the readback/backlog code into my game (it's the latest Ren'Py version) and it didn't work then error message like this appeared. I've never encountered this problem before, usually the readback code works just fine on previous version of Ren'Py.
Webtoon

"For what reason I live?"
Image

---
Completed project:


"What will you see when you are dead?"

Image

MY VISUAL NOVEL

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Spurious ui.close(), Means?

#2 Post by Donmai »

I remember this problem was reported before: http://lemmasoft.renai.us/forums/viewto ... 92#p335592
Anyway, a lot of ancient code that makes use of UI functions is having problems now. Maybe the solution would be rewriting those routines using screen language? I'm not a programmer, so I can't help.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Spurious ui.close(), Means?

#3 Post by xela »

The code seems to be working fine for me. Error means that something is trying to close erroneous ui stack somewhere, I also believe that it can only be caused by screen language (and not direct use of ui module without invoking a screen) but I wouldn't bet (a lot) of money on that belief.
Like what we're doing? Support us at:
Image

User avatar
tiya_nofurita
Miko-Class Veteran
Posts: 669
Joined: Fri Jun 22, 2012 7:23 pm
Completed: ALLBLACK Phase 1, Heart's Blight, Last Rx., EDDA Cafe, Kohana, Half Moon
Projects: ALLBLACK Phase 2
Organization: VN Project Indonesia
Deviantart: SECONDARY-TARGET
itch: NSAID
Location: I can be everywhere
Discord: 3,4-Methylendioxymethamphetamine#4886
Contact:

Re: Spurious ui.close(), Means?

#4 Post by tiya_nofurita »

Um, what should I do then? I want readback code functioning normally :/ Do I need to re-start all my code from scratch?
Webtoon

"For what reason I live?"
Image

---
Completed project:


"What will you see when you are dead?"

Image

MY VISUAL NOVEL

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Spurious ui.close(), Means?

#5 Post by nyaatrap »

Are you sure to using the latest code? The wiki code has modified for 6.18.

User avatar
tiya_nofurita
Miko-Class Veteran
Posts: 669
Joined: Fri Jun 22, 2012 7:23 pm
Completed: ALLBLACK Phase 1, Heart's Blight, Last Rx., EDDA Cafe, Kohana, Half Moon
Projects: ALLBLACK Phase 2
Organization: VN Project Indonesia
Deviantart: SECONDARY-TARGET
itch: NSAID
Location: I can be everywhere
Discord: 3,4-Methylendioxymethamphetamine#4886
Contact:

Re: Spurious ui.close(), Means?

#6 Post by tiya_nofurita »

nyaatrap wrote:Are you sure to using the latest code? The wiki code has modified for 6.18.
Weird....now that I copy paste the code from here http://www.renpy.org/wiki/renpy/doc/coo ... xt_History it works like usual. Sorry for causing the problem before.
Webtoon

"For what reason I live?"
Image

---
Completed project:


"What will you see when you are dead?"

Image

MY VISUAL NOVEL

User avatar
A Hazard
Regular
Posts: 25
Joined: Sun Jun 29, 2014 4:02 pm
Completed: Gilded - The Lily & the Cage
Projects: Fragment - A Broken Fairy Tale
Tumblr: fragmentfairytale
Deviantart: fragmentfairytale
Contact:

Re: Spurious ui.close(), Means?

#7 Post by A Hazard »

I just discovered this myself and went line by line comparing the old code (which I'd already modified quite a bit) vs the new one. Apparently the spurious ui.close error is connected to this old line...

Code: Select all

$ vp = ui.viewport(mousewheel = True, draggable = True, offsets=(0.0, yvalue), yadjustment = adj)
which has been updated/replaced with this in the 6.18 version.

Code: Select all

                has viewport:
                    mousewheel True
                    draggable True
                    yinitial yvalue
                    yadjustment adj
So the entire thing doesn't have to be redone from scratch.

User avatar
tiya_nofurita
Miko-Class Veteran
Posts: 669
Joined: Fri Jun 22, 2012 7:23 pm
Completed: ALLBLACK Phase 1, Heart's Blight, Last Rx., EDDA Cafe, Kohana, Half Moon
Projects: ALLBLACK Phase 2
Organization: VN Project Indonesia
Deviantart: SECONDARY-TARGET
itch: NSAID
Location: I can be everywhere
Discord: 3,4-Methylendioxymethamphetamine#4886
Contact:

Re: Spurious ui.close(), Means?

#8 Post by tiya_nofurita »

Yep, I compared the new and old code and discovered the same thing. Thanks for clarify though :D
Webtoon

"For what reason I live?"
Image

---
Completed project:


"What will you see when you are dead?"

Image

MY VISUAL NOVEL

Post Reply

Who is online

Users browsing this forum: Bing [Bot]