mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
265 stars 143 forks source link

Fix file conflict dialog crashes #1639

Closed cwendling closed 2 years ago

cwendling commented 2 years ago

Fix #1630.

This contains 3 separate but fairly closely related changes (see each commit for details):

1) Fix reference to objects by releasing them in dispose() as we ought to instead of waiting for finalize(). This is the real fix, and is the right thing to do in the GObject world: no object is supposed to hold a reference to any other object after dispose(). 2) Simplification of the icon update code, which optimizes it as well and allows for improving safety in 3 -- thanks @rbuj 3) thanks to 2, make use of g_signal_connect_object() to improve safety of the handler by making sure all parameters are valid at signal dispatch time.

1 alone is enough of a fix, but 2 is a nice improvement of the code, and 3 makes things safer. Actually, 2+3 alone are also a fix for #1630, although not as thorough.

cwendling commented 2 years ago

For anybody who'd merge this, please do not squash the commits together, it'd make more sense to have the split as is (and they all leave the code in an acceptable state, although c81cc650a7d3307feed134df719722444db1769c alone is not a fix.

lukefromdc commented 2 years ago

Github just did something ugly: merged only the LAST commit on a "rebase and merge" will emergency revert and do a manual merge, so as to avoid force-pushing to master

lukefromdc commented 2 years ago

Revert PR showed all three commits, looks like git worked and github just didn't show it all. Running git log or looking at the history on a local pull of master shows all three commits separately. Thus we are good to go here

cwendling commented 2 years ago

@lukefromdc thanks, and yep master looks fine

lukefromdc commented 2 years ago

Cherrypicked to 1.26 after testing on that branch