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

Document that the GTK bindings can't be completely safe and document the caveats #819

Open
sdroege opened this issue Mar 3, 2021 · 5 comments
Labels
book help wanted Extra attention is needed

Comments

@sdroege
Copy link
Member

sdroege commented Mar 3, 2021

Main known issue is related to disposed but not finalized widgets, which would happen when e.g. their surrounding window is closed. Calling anything on such widgets might crash or do whatever, and this is design constraint in GTK.

See https://gitlab.gnome.org/GNOME/gtk/-/issues/3711 for details.

This also effects GTK4, but probably nothing apart from GTK as it's AFAIK the only library calling g_object_run_dispose() explicitly at specific times. It might also affect other GObject libraries if used together with a GC'd language binding in the same process but it's not entirely clear if the problems actually happen there in practice.

CC @bilelmoussaoui

@sdroege
Copy link
Member Author

sdroege commented Mar 3, 2021

More specifically, this only applies to widgets and not other GTK objects.

@bilelmoussaoui
Copy link
Member

To be honest, this should probably be part of the gtk-rs book, it is a better place to write about this then in the documentations.

@sdroege
Copy link
Member Author

sdroege commented Jan 6, 2022

@Hofer-Julian What do you think?

@Hofer-Julian
Copy link
Collaborator

Yeah, the book is probably a good place for that. In a supplementary chapter at the end or so.

@bilelmoussaoui
Copy link
Member

Let us move this to gtk4-rs then

@bilelmoussaoui bilelmoussaoui transferred this issue from gtk-rs/gtk3-rs Jan 14, 2022
@bilelmoussaoui bilelmoussaoui added book help wanted Extra attention is needed labels Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
book help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants