Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Pango assertion kills cawbird #410

Open
j1warren opened this issue Nov 29, 2021 · 3 comments
Open

Pango assertion kills cawbird #410

j1warren opened this issue Nov 29, 2021 · 3 comments
Labels
bug Something isn't working info required This doesn't seem right or more details are required

Comments

@j1warren
Copy link

j1warren commented Nov 29, 2021

Pango:ERROR:../pango/pango-layout.c:3991:process_line: assertion failed: (result == BREAK_SOME_FIT || result == BREAK_EMPTY_FIT)
Bail out! Pango:ERROR:../pango/pango-layout.c:3991:process_line: assertion failed: (result == BREAK_SOME_FIT || result == BREAK_EMPTY_FIT)
Aborted

When I scroll cawbird to load earlier tweets it dies. Started happening today, I guess some tweet breaks it.

v 1.4.2-1+8.1, ubuntu 20.04

@IBBoard
Copy link
Owner

IBBoard commented Nov 29, 2021

What version of Pango are you running?

I think the warning is a coincidence, since Pango deals with text and the Instagram loading is a GTK image widget.

You'll probably find that the issue goes away as you get new tweets. There will be one in particular that causes it. FakeUnicode used to wreak havoc with text rendering, but they've not done it in a while. I only remember that causing huge, wide windows, though!

If you could try and work out where it is (e.g. load Cawbird, slowly scroll until it loads back, then check on Twitter and see whether anything in the 28 tweets before the last one that you saw before the crash looks like it's using awkward combinations of characters or anything.

@IBBoard IBBoard added bug Something isn't working info required This doesn't seem right or more details are required labels Nov 29, 2021
@j1warren
Copy link
Author

Not sure I can find the exact tweet now.

$ apt list | rg pango | rg installed
gir1.2-coglpango-1.0/focal,now 1.22.6-1 amd64 [installed,automatic]
gir1.2-pango-1.0/focal,now 1.44.7-2ubuntu4 amd64 [installed]
libcogl-pango20/focal,now 1.22.6-1 amd64 [installed]
libpango-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed]
libpango1.0-dev/focal,now 1.44.7-2ubuntu4 amd64 [installed,automatic]
libpangocairo-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed]
libpangoft2-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed]
libpangomm-1.4-1v5/focal,now 2.42.0-2build1 amd64 [installed,automatic]
libpangoxft-1.0-0/focal,now 1.44.7-2ubuntu4 amd64 [installed]
pango1.0-tools/focal,now 1.44.7-2ubuntu4 amd64 [installed,automatic]

@IBBoard
Copy link
Owner

IBBoard commented Dec 3, 2021

Looks like the assert is part of the process_line function in Pango (src). Specifically, it got a BREAK_NONE_FIT result and tried to recurse and try differently, but got something other than BREAK_SOME_FIT or BREAK_EMPTY_FIT.

I think that means we hit a really long, ugly string and it didn't like it because it couldn't wrap it. But if it hit that in the tweet body then it should trigger the scrolling behaviour (which I put in because of FakeUnicode) and if it was in most other widgets (display name etc) then it should be ellipsising it.

Interestingly, the long tweet that I just tried gets hyphenated mid-word rather than scrolling. That's Pango 1.48 on openSUSE Tumbleweed, though, so they must have improved their wrapping algorithm.

This might be a hard one to find the trigger for 😕

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working info required This doesn't seem right or more details are required
Projects
None yet
Development

No branches or pull requests

2 participants