Just-Natsuki-Team / NatsukiModDev

The official repository of Team JN.
Other
84 stars 42 forks source link

[ BUG REPORT ] - An exception has occured when a folder window is focused on while JustNatsuki is open in the background. #264

Closed Cherry-Ordain closed 2 years ago

Cherry-Ordain commented 2 years ago

If the Just Natsuki mod is open while another window is open and focused on, every minute, Ren'Py will encounter an error. (Full traceback below) The error can be replicated by opening a window (observed to occur with at least a browser, folder, and terminal) while Just Natsuki is open, and when the system clock rolls over a minutes, the exception will occur. If "Ignore" is pressed, the mod returns to normal function. If the mod window remains focused on, no further error occurs. If "Ignore" is pressed and a different window is immediately returned to, the exception will occur a few seconds later. Furthermore, if a folder window was opened, on two occasions, a JN persistent was placed into that folder; however I'm unable to consistently replicate this. This is an issue encountered on the Ubuntu-distro Linux with the latest download of Just Natsuki, on April 2nd, 2022. [code] I'm sorry, but an uncaught exception occurred.

While running game code: File "game/script-ch30.rpy", line 91, in minute_check() File "game/script-ch30.rpy", line 196, in minute_check jn_activity.get_current_activity() File "game/activity.rpy", line 123, in get_current_activity window_name = get_current_window_name() File "game/activity.rpy", line 105, in get_current_window_name return Xlib.display.Display().get_input_focus().focus.get_wm_name() AttributeError: 'int' object has no attribute 'get_wm_name'

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

Full traceback: File "/home/cherry-ordain/script-ch30.rpyc", line 112, in script call File "/home/cherry-ordain/script-ch30.rpyc", line 87, in script File "/home/cherry-ordain/Desktop/DDLC Files/DDLC(Clean)/JUST NATSUKI/renpy/ast.py", line 814, in execute renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) File "/home/cherry-ordain/Desktop/DDLC Files/DDLC(Clean)/JUST NATSUKI/renpy/python.py", line 1719, in py_exec_bytecode exec bytecode in globals, locals File "game/script-ch30.rpy", line 91, in minute_check() File "game/script-ch30.rpy", line 196, in minute_check jn_activity.get_current_activity() File "game/activity.rpy", line 123, in get_current_activity window_name = get_current_window_name() File "game/activity.rpy", line 105, in get_current_window_name return Xlib.display.Display().get_input_focus().focus.get_wm_name() AttributeError: 'int' object has no attribute 'get_wm_name'

Linux-5.13.0-39-generic-x86_64-with-debian-11.0 Ren'Py 6.99.12.4.2187 Just Natsuki 4.1.0 [/code]

multimokia commented 2 years ago

Out of curiosity, what version of Ubuntu are you using, and do you know what desktop session you're using? (X11/Wayland)?

Cherry-Ordain commented 2 years ago

I am on Ubuntu-21.10 using the Gnome/X11 desktop environment, so no crashes happen due to the exception.

multimokia commented 2 years ago

Currently investigating after I fix the issue in the linked issue. Loosely related but still a major bug

multimokia commented 2 years ago

I think I might need a bit of help figuring this one out. Running the line that's erroring myself, for some reason, .focus is returning an int for you. If you could install Xlib (under your py2 install) and import it, could you run:

import Xlib
Xlib.display.Display().get_input_focus().focus

and paste the results here?

Cherry-Ordain commented 2 years ago

Update: My comments in the mod discussion channel were inaccurate; I forgot that I had booted in safe-mode due to import Xlib freezing issues. When I booted back into the normal environment, the exception started reoccurring. Xlib.display.Display().get_input_focus().focus results in bash: syntax error near unexpected token `.get_input_focus'

multimokia commented 2 years ago

need to see how it behaves on another machine. I don't have one running ubuntu but I have a VM running kubuntu laying around. Unsure if the display driver will play nice, as it's a VM. I'll test and report back.

Blizzardsev commented 2 years ago

Closing due to inactivity