! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Xfdesktop crashes on focus in
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Ambroz Bizjak 2011-02-20 00:11:47 CET
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.
Comment 1 Ambroz Bizjak 2011-02-20 00:32:09 CET
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
Comment 2 Jannis Pohlmann editbugs 2011-02-20 13:52:46 CET
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>

Bug #7313

Reported by:
Ambroz Bizjak
Reported on: 2011-02-20
Last modified on: 2011-02-20

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
1 user

Version

Attachments

Fix for the bug (7.59 KB, patch)
2011-02-20 00:32 CET , Ambroz Bizjak
no flags

Additional information