mark2devel / mark2

Minecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
Other
205 stars 44 forks source link

Pressing page down too many times causes mark2 client to crash #175

Closed Column01 closed 3 months ago

Column01 commented 3 months ago

As the title states, when you press page down to scroll the console output it will sometimes crash the client. This doesn't crash the servers so this is a minor bug, but a bug nonetheless

Traceback (most recent call last):
  File "/usr/bin/mark2", line 6, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/server/mark2/mk2/launcher.py", line 624, in main
    command.start()
  File "/home/server/mark2/mk2/launcher.py", line 126, in start
    self.run()
  File "/home/server/mark2/mk2/launcher.py", line 508, in run
    f.main()
  File "/home/server/mark2/mk2/user_client.py", line 592, in main
    self.ui.main()
  File "/home/server/mark2/mk2/user_client.py", line 273, in main
    self.loop.run()
  File "/home/server/.local/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 337, in run
    self._run()
  File "/home/server/.local/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 439, in _run
    self.event_loop.run()
  File "/home/server/.local/lib/python3.11/site-packages/urwid/event_loop/twisted_loop.py", line 241, in run
    raise exc.with_traceback(exc.__traceback__)
  File "/home/server/.local/lib/python3.11/site-packages/urwid/event_loop/twisted_loop.py", line 257, in wrapper
    rval = f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/home/server/.local/lib/python3.11/site-packages/urwid/display/_posix_raw_display.py", line 273, in wrapper
    return self.parse_input(event_loop, callback, self.get_available_raw_input())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/server/.local/lib/python3.11/site-packages/urwid/display/_raw_display_base.py", line 488, in parse_input
    callback(decoded_codes, raw_codes)
  File "/home/server/.local/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 463, in _update
    keys = self.input_filter(keys, raw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/server/.local/lib/python3.11/site-packages/urwid/event_loop/main_loop.py", line 624, in input_filter
    return self._input_filter(keys, raw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/server/mark2/mk2/user_client.py", line 291, in filter_input
    self.set_focused()
  File "/home/server/mark2/mk2/user_client.py", line 369, in set_focused
    attr.foreground = 'default'
    ^^^^^^^^^^^^^^^
AttributeError: property 'foreground' of 'AttrSpec' object has no setter
Column01 commented 3 months ago

This also happens when paging up from the user input section of the terminal so there seems to be the culprit