GNOME Bugzilla – Bug 755803
unsafe window list handling
Last modified: 2015-10-06 13:46:58 UTC
I have seen a downstream bug with a nautilus crash that looks like this:
+ Trace 235499
Thread 1 (Thread 0x3fff9af09e0 (LWP 22780))
Looking briefly at the code of action_quit, it seems to me that it is not handling the window list in a safe way. You iterate over the list, and call nautilus_window_close. That might well cause the window to be destroyed, and during that process it will be removed from the applications window list, and your list may not be valid anymore.
Created attachment 312732 [details] [review] application-actions: use valid window list We were using the internal list of the application to iterate through the windows and closing them. Problem is that when closing one window, the list is modified, so next time accessing the list we are accessing the "old" list, which is invalid and makes nautilus crash. To fix it make a copy of the list to preserve the consistency.
Thanks Mathias for the analysis. Pushed to 3.18, 3.16 and 3.14 Attachment 312732 [details] pushed as 44de344 - application-actions: use valid window list