Using libadwaita 1.0.0 on Flathub

Hello everyone! I have been attempting to update my app (foreverxml/random: Make randomization easy - random - Codeberg.org) to its new version on Flathub and libadwaita 1.0.0, but every time it returns:

../src/meson.build:227:0: ERROR: Invalid version of dependency, need 'gtk4' ['>= 4.5.0'] found '4.4.1'.

Would anyone know what is going wrong here? Many thanks!

EDIT: This is a bundling issue, and I haven’t figured out how to bundle gtk4 4.5.0. I have tried bundling with Flatpak manifest and it always seems to throw this error; are there any other ways of bundling it?

As it says, you need newer gtk. It will be in the 42 sdk, for now you could bundle it.

1 Like

How would I bundle it? (add in flatpak manifest?)

Though maybe you can drop libsass/sassc here, not sure.

1 Like

This worked in getting it tu build, however when I run it it repeatedly (45 times/millisecond) throws:

gtk_widget_measure: assertion 'for_size >= -1' failed

I don’t know what’s going wrong, but isn’t this related to valign in widgets? Any help here would be appreciated (I don’t code great)

Ah, that one is well known but can come from anywhere.

  • There was a fix in libadwaita, check with the latest main - might be related
  • If you have halign on any GtkLabels anywhere - remove it
  • If not - this will be tricky to debug. but some widget somewhere is misbehaving. You’ll need to run your app with GTK_DEBUG=size-request (and have an appropriately built GTK) and it will show what exactly happens (some widget will get increasingly large for_size in a measure request ad infinitum). After you get the log, attach it here if you can’t find out which widget it is

It may be a GTK bug, a libadwaita bug or your bug - impossible to say until we have the log.

1 Like

I got the logs- they are very long. I put them on a gist because Discourse does not allow text files.

It seems to be nearly every widget… :sweat_smile:

I mean what that flag does is it indeed logs every widget. But what I’m interested in here is the:

[0x5618e6a85f00] GtkBox height for width: 2113929205 is minimum 103 and natural: 103, baseline 23/23 (hit cache: no)

So it looks like yet another problem of box<->label interactions. Hard to tell what exactly from the log, but I can see it’s not libadwaita stuff, so at least it’s not my problem. :stuck_out_tongue:

The next step would be to trim down your layout to make a minimal reproducer. Since it’s not libadwaita - it can be a ui file viewable with gtk4-builder-tool preview your_ui_file.ui.

At that point you can attach it to https://gitlab.gnome.org/GNOME/gtk/-/issues/4517

1 Like

I almost got to making a minimal reproducer- but then gtk said I couldn’t use debug options anymore. I have a couple of GtkBoxes and one GtkButton and GtkLabel. Their interaction was problematic. It works fine with only one or the other, but when both are combined it does not open.

It’s here, but it’s not complete. I’ll try to find a new gtk4 4.6.0 env in the meantime :stuck_out_tongue:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.