! 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 !
Too much time/code between check and set of its selection atom
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Lionel Le Folgoc 2012-02-20 00:23:15 CET
Created attachment 4226 
workaround used

Hi,

At the beginning of main(), xfdesktop calls xfdesktop_check_is_running() to check that the XFDESKTOP_SELECTION_%d atom isn't set already, in an attempt to detect that another instance is already running. But this atom is set a lot of code/time later, in src/xfce-desktop.c:screen_set_selection().

This means that under some conditions (slow computer, messed up saved session file), several (some people reported several dozens on our bugtracker) xfdesktop process can run in parallel, as they manage to pass the check because the first process hasn't reached the set_selection code already...

I'm not sure how to fix it properly though. A workaround I've used in Xubuntu (see attached patch) is to check again the atom right before setting it. With this hack, even when using a vm loaded like crazy and a broken session saved with 70 xfdesktops, I couldn't reproduce this issue anymore -of course, that doesn't mean it's solved...).

Thanks.
Comment 1 Nick Schermer editbugs 2012-03-24 12:45:55 CET
If this works, fine by me.

Bug #8488

Reported by:
Lionel Le Folgoc
Reported on: 2012-02-20
Last modified on: 2012-03-29

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
3 users

Version

Version:
Unspecified

Attachments

workaround used (751 bytes, patch)
2012-02-20 00:23 CET , Lionel Le Folgoc
no flags

Additional information