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

Fix Bluetooth log spamming #4632

Closed
wants to merge 1 commit into from

Conversation

elParaguayo
Copy link
Member

Bluetooth widget can spam the logs when device awakens from sleep and resources are not immediately available.

libqtile/widget/bluetooth.py Outdated Show resolved Hide resolved
@ramnes ramnes marked this pull request as draft January 8, 2024 14:31
@ramnes
Copy link
Member

ramnes commented Jan 18, 2024

Is this the kind of spam that will get fixed?

2024-01-18 10:52:56,347 ERROR libqtile loop.py:_handle_exception():L62 Exception in event loop:
Traceback (most recent call last):
  File "libqtile/widget/bluetooth.py", line 277, in update_props
    self.widget.refresh()
  File "libqtile/widget/bluetooth.py", line 582, in refresh
    self.show_line()
  File "libqtile/widget/bluetooth.py", line 617, in show_line
    self.update(self.format_object(obj))
  File "libqtile/widget/base.py", line 754, in update
    old_width = self.layout.width
                ^^^^^^^^^^^^^^^^^
  File "libqtile/backend/base/drawer.py", line 421, in width
    return self.layout.get_pixel_size()[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "libqtile/pangocffi.py", line 137, in get_pixel_size
    pango.pango_layout_get_pixel_size(self._pointer, width, height)
TypeError: initializer for ctype 'PangoLayout *' must be a cdata pointer, not NoneType

@elParaguayo
Copy link
Member Author

@ramnes in a word: no.

That's an issue with textbox based widgets and it drives me insane. I thought I'd fixed it many times but there are some cases still getting through. I'll look at that again.

The bluetooth spamming is to do with the bluez interface not immediately being ready after resume (more annoyingly, some interfaces take longer than other) and so some of the calls fail.

I'm not sure I'll have time to find and patch all the cases before the weekend (which is when @tych0 wants to do the next release). However, I can make the logger.debug change that you suggested and then we can merge this one as it still has some improvements over the current one.

Bluetooth widget can spam the logs when device awakens from sleep and
resources are not immediately available.
Copy link

This PR is stale because it has been open 90 days with no activity. Remove the status: stale label or comment, or this will be closed in 30 days.

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

Successfully merging this pull request may close these issues.

None yet

3 participants