Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAIRO_STATUS_SURFACE_FINISHED error in githubnotifications #401

Open
ervinpopescu opened this issue Dec 13, 2024 · 2 comments
Open

CAIRO_STATUS_SURFACE_FINISHED error in githubnotifications #401

ervinpopescu opened this issue Dec 13, 2024 · 2 comments

Comments

@ervinpopescu
Copy link

I get this annoying error in my logs and I can't seem to figure out why:

2024-12-13 14:52:07,691 ERROR libqtile loop.py:_handle_exception():L62 Exception in event loop:
Traceback (most recent call last):
  File "/usr/lib/python3.11/asyncio/events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "HOME/.local/lib/python3.11/site-packages/qtile_extras/widget/githubnotifications.py", line 147, in _read_data
    self.draw()
  File "HOME/.local/lib/python3.11/site-packages/qtile_extras/widget/githubnotifications.py", line 156, in draw
    self.drawer.clear(self.background or self.bar.background)
  File "HOME/.local/lib/python3.11/site-packages/qtile_extras/widget/decorations.py", line 826, in new_clear
    decoration.draw()
  File "HOME/.local/lib/python3.11/site-packages/qtile_extras/widget/decorations.py", line 427, in draw
    self.ctx.fill_preserve()
  File "HOME/.local/lib/python3.11/site-packages/cairocffi/context.py", line 1423, in fill_preserve
    self._check_status()
  File "HOME/.local/lib/python3.11/site-packages/cairocffi/context.py", line 107, in _check_status
    _check_status(cairo.cairo_status(self._pointer))
  File "HOME/.local/lib/python3.11/site-packages/cairocffi/__init__.py", line 87, in _check_status
    raise exception(message, status)
cairocffi.CairoError: cairo returned CAIRO_STATUS_SURFACE_FINISHED: b'the target surface has been finished'

Seems to happen randomly, doesn't seem to be reload-related, doesn't look like it's related to polling.

Maybe it's some of the finalization code written recently?

@ervinpopescu ervinpopescu changed the title CAIRO_STATUS_SURFACE_FINISHED error in githubnotifications CAIRO_STATUS_SURFACE_FINISHED error in githubnotifications Dec 13, 2024
@elParaguayo
Copy link
Owner

Not sure how I missed this...

Do you reload your config regularly? That could trigger finalisation of surfaces etc.

@ervinpopescu
Copy link
Author

ervinpopescu commented Jan 2, 2025

I don't reload that often lately. Something like once a day max. That said, I do think it is reload related after all. I just reloaded a second machine I don't reload that often and the error occurred again.

$ tac ~/.local/share/qtile/qtile.log | awk 'c&&!--c;/CAIRO_STATUS_SURFACE_FINISHED/{c=20}' | tac | rg 'Exception in event loop:' | awk '{print $1,$2}' | xargs -I'{}' date -d "{}" +'%Y-%m-%d %H:%M' | sort | uniq
2024-12-10 15:37
2024-12-10 15:42
2024-12-11 15:19
2024-12-11 15:20
2024-12-11 15:21
2024-12-13 14:42
2024-12-13 14:43
2024-12-13 14:44
2024-12-17 11:36
2024-12-17 11:37
2024-12-17 11:38
2025-01-02 17:07
2025-01-02 17:08
2025-01-02 17:09

To me, it looks like more of an issue with a qtile which is not reloaded that often.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants