-
Notifications
You must be signed in to change notification settings - Fork 29
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
Strange drag and drop crash bug #1125
Comments
This sounds a bit like while disposing the ToggleRef there is some invocation of the notify callback. This needs to be investigated. |
Good news, I can reproduce the bug on my system. I will work on the fix here: #1128 |
badcel
added a commit
that referenced
this issue
Oct 2, 2024
badcel
added a commit
that referenced
this issue
Oct 2, 2024
It can happen that calling "RemoveToggleRef" leads to a delayed invocation of it's toggle notify callback. If "RemoveToggleRef" is called the garbage collector is free to free the ToggleRef in which case the managed "ToggleNotify" callback is freed, too. This change uses an "UnmanagedCallersOnly" function which is out of scope of the GC and can always be called. In case it is called after the ToggleRef was freed it just does nothing. Fixes: #1125
badcel
added a commit
that referenced
this issue
Oct 2, 2024
It can happen that calling "RemoveToggleRef" leads to a delayed invocation of it's toggle notify callback. If "RemoveToggleRef" is called the garbage collector is free to free the ToggleRef in which case the managed "ToggleNotify" callback is freed, too. This change uses an "UnmanagedCallersOnly" function which is out of scope of the GC and can always be called. In case it is called after the ToggleRef was freed it just does nothing. Fixes: #1125
badcel
added a commit
that referenced
this issue
Oct 3, 2024
It can happen that calling "RemoveToggleRef" leads to a delayed invocation of it's toggle notify callback. If "RemoveToggleRef" is called the garbage collector is free to free the ToggleRef in which case the managed "ToggleNotify" callback is freed, too. This change uses an "UnmanagedCallersOnly" function which is out of scope of the GC and can always be called. In case it is called after the ToggleRef was freed it just does nothing. Fixes: #1125
badcel
added a commit
that referenced
this issue
Oct 3, 2024
It can happen that calling "RemoveToggleRef" leads to a delayed invocation of it's toggle notify callback. If "RemoveToggleRef" is called the garbage collector is free to free the ToggleRef in which case the managed "ToggleNotify" callback is freed, too. This change uses an "UnmanagedCallersOnly" function which is out of scope of the GC and can always be called. In case it is called after the ToggleRef was freed it just does nothing. Fixes: #1125
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm dealing with a weird crash happening with the use of
Gtk.DropTarget
Strangely enough this only seems to happen inside Flatpak runtime. On both GNOME SDK 46 and 47. But I cannot reproduce it on my own machine locally (Debian 12, GNOME 43).
The problem seems related to garbage collection.
I've narrowed it down to a simple reproducible window that shows this:
File 1
button and when the file chooser opens, do not select the file with it but use it to drag and drop files into the File 1 button, this should update the file 1 button's label to the dragged file's name.File 2
button and watch the app crash.This is the error logs
Again emphasizing this happens in Flatpak runtime and only when drag and drop was used.
Here's a video demonstration:
Screencast.from.2024-09-24.03-32-04.webm
The text was updated successfully, but these errors were encountered: