To reproduce: 1. Minimize all windows except one. 2. Click on the window. 3. Select a bunch of icons on the desktop by dragging the selection box. If no crash, goto step 2. Repeat at least 10 times. If no crash, restart Xfdesktop and do it all again.
Created attachment 3489 Fix for the bug This removes the brain-damaged repaint queue and simply paints selected items after painting non-selected items. I don't know the exact cause of the bug, but it probably goes something like that: 1. the focus in handler is called from the main loop 2. the focus in handler directly iterates the event loop 3. within that iteration, some event happenes that modifies the list of selected items 4. the focus in handler ends iterating the event loop and proceeds to invalidate the next selected item 5. it crashes because the list of selected items was modified from within the nested event loop
Wow, thanks. I was aware of this issue but I didn't have the time to look into a proper solution for it. So thanks! Applied to master and the xfce-4.8 branch, giving credit to you as the author of the patch: commit 08a334be69cc50b22356b8eead694880f8b92f31 Author: Ambroz Bizjak <ambrop7@gmail.com> Date: Sun Feb 20 13:49:18 2011 +0100 Fix crash on focus in when items are selected (bug #7313). This removes the repaint queue and the corresponding idle handler for painting selected items in a delay and instead paints them directly after normal items are painted. Signed-off-by: Jannis Pohlmann <jannis@xfce.org>