elements icon indicating copy to clipboard operation
elements copied to clipboard

Static elements resulting in Gtk errors

Open klytje opened this issue 2 years ago • 8 comments

After designing an interface for my range_slider it always outputs 8 Gtk errors upon startup: image

After trimming away everything I could while still triggering the error, I ended up with this main.txt file. While the code now looks a bit funky due to all of the stuff I removed, I don't think I'm doing anything illegal here.

Changing any part of the layout (either in the return statement or the number of labels) makes the error disappear. Changing the slider_labels element to be shared also solves the issue. The interface seems to work just fine regardless of these errors. Since it is so easy to get rid of these errors again, they're not really an issue for me, but I still thought it was worth reporting.

klytje avatar Dec 03 '23 16:12 klytje

Does this happen only in Linux GTK?

djowel avatar Feb 09 '24 23:02 djowel

@klytje Can you confirm if this still happens with the master or skia_2024 branches?

djowel avatar Mar 30 '24 01:03 djowel

Still happens on both the current master and skia_2024 branches.

klytje avatar Apr 02 '24 19:04 klytje

Alright. I'll take a closer look.

djowel avatar Apr 02 '24 21:04 djowel

Ohh... It seems the bounds has -NAN!

djowel avatar Apr 06 '24 08:04 djowel

@klytje I think this is your problem: hgrid({1.}, link(_min_textbox.first)) Somehow, it is producing odd bounds!

It's not about the static element either. It still has the problem even if I make everything non-static. And removing the hgrid makes the problem go away.

I suggest making an MVCE with only that.

djowel avatar Apr 06 '24 09:04 djowel

I don't understand what triggers the warnings.

This is the smallest I could reduce it to: main.txt

image

  1. Changing the input_box to something else fixes the issue.
  2. Removing the align fixes the issue.
  3. Removing the single-element hgrid fixes the issue.
  4. Directly adding the contents of the method to the view.content fixes the issue??? image

klytje avatar Apr 06 '24 10:04 klytje

That's a good MVCE! Alright I'll take a look.

djowel avatar Apr 06 '24 11:04 djowel