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

Static elements resulting in Gtk errors #365

Open
klytje opened this issue Dec 3, 2023 · 8 comments
Open

Static elements resulting in Gtk errors #365

klytje opened this issue Dec 3, 2023 · 8 comments

Comments

@klytje
Copy link
Contributor

klytje commented Dec 3, 2023

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.

@djowel
Copy link
Member

djowel commented Feb 9, 2024

Does this happen only in Linux GTK?

@djowel
Copy link
Member

djowel commented Mar 30, 2024

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

@klytje
Copy link
Contributor Author

klytje commented Apr 2, 2024

Still happens on both the current master and skia_2024 branches.

@djowel
Copy link
Member

djowel commented Apr 2, 2024

Alright. I'll take a closer look.

@djowel
Copy link
Member

djowel commented Apr 6, 2024

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

@djowel
Copy link
Member

djowel commented Apr 6, 2024

@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.

@klytje
Copy link
Contributor Author

klytje commented Apr 6, 2024

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

@djowel
Copy link
Member

djowel commented Apr 6, 2024

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

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