[Xfce-bugs] [Bug 12260] Thunar crash on cut/paste multiple files

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Thu Feb 9 16:03:43 CET 2017


--- Comment #35 from Alistair Buxton <a.j.buxton at gmail.com> ---
#34 is definitely on to something. Setting up an async call on an object and
then immediately unref'ing (which is also an async call) is bound to cause race
conditions and random crashes like we see here.

I notice that the inline doc for thunar_file_reload says this:

"You must be able to handle the case that @file is destroyed during the reload

but the function itself has no such code to handle this case, and since @file
can be destroyed at any point due to threading I don't see how it would even be
possible to handle it without putting a mutex on @file.

Also I don't understand why it is necessary to reload the file immediately
before unref'ing it. Why not just unref it immediately? There is probably a
good reason for this that I'm just not seeing.

It would be a good idea for all developers to take a quick look at their code
and make sure this "async reload/unref" anti-pattern is not showing up

You are receiving this mail because:
You are the assignee for the bug.

More information about the Xfce-bugs mailing list