GNOME Bugzilla – Bug 752478
Crash in progress_dialog_response() after calling "file-roller --extract archive.gz"
Last modified: 2020-11-11 19:13:08 UTC
When calling "file-roller --extract" with a valid archive, and closing the "Extraction completed successfully dialogue (this step has to be done quickly, within 10 seconds), there is a crash in progress_dialog_response() while trying to dereference the "window->priv" pointer, which does not point to valid data as the object has been disposed (points to 0xaaaaaaaaaaaaaaaa). Stack trace:
+ Trace 235275
After a bit of investigation, leaving the dialogue open until the SERVICE_TIMEOUT triggers (10 seconds), g_application_release() is called and the application is terminated without a crash, as the dialogue response is not emitted. I am not sure of the best fix. The progress dialogue could take a full reference (with g_object_ref()) on the main window, but this could get into problems with circular references. It might make sense to use g_object_weak_ref(), stuffing a pointer to the main window into the dialogue and clearing that pointer when the GWeakNotify is triggered. Do you have any preference, or suggestion of an alternative fix?
Created attachment 307556 [details] [review] proof-of-concept patch, taking a ref on the main window The attached patch is a quick hack to take a reference on the main window. It seems to work, but needs more testing, and I probably made a mistake with the reference-counting.
Created attachment 307612 [details] [review] updated proof-of-concept Fix an undesired g_object_unref().
Created attachment 307615 [details] [review] add a g_object_ref()
Review of attachment 307615 [details] [review]: Are you still not sure whether this is right? If you're confident in the fix, then don't wait months for a review; after waiting a few weeks to give the maintainer a chance to review, please just go ahead and push!
It's a workaround, and not really a fix. A suitable fix would likely need a lot of refactoring.
I cannot reproduce the problem with current master, can someone test and see if current master still crashes? Note that the behaviour changed a bit, to show the confirmation dialog you need to use the --notify option as well, only using --extract will not show the dialog anymore, this was the intented behaviour since the beginning.
it seems to not segfault with master indeed ... do you plan to make a new tarball including those changes/fixes?
(In reply to Sebastien Bacher from comment #7) > it seems to not segfault with master indeed ... do you plan to make a new > tarball including those changes/fixes? next monday.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time. If you still use file-roller and if you still see this bug / want this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/file-roller/-/issues/ Thank you for creating this report and we are sorry it could not be implemented (volunteer workforce and time is limited).