Merge lp://qastaging/~vanvugt/compiz-core/fix-startup-plugins into lp://qastaging/compiz-core
Status: | Rejected |
---|---|
Rejected by: | Daniel van Vugt |
Proposed branch: | lp://qastaging/~vanvugt/compiz-core/fix-startup-plugins |
Merge into: | lp://qastaging/compiz-core |
Diff against target: |
181 lines (+27/-71) 2 files modified
src/privatescreen.h (+5/-0) src/screen.cpp (+22/-71) |
To merge this branch: | bzr merge lp://qastaging/~vanvugt/compiz-core/fix-startup-plugins |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Disapprove | ||
Alan Griffiths | Needs Fixing | ||
Sam Spilsbury | Approve | ||
Didier Roche-Tolomelli | Pending | ||
Review via email:
|
Description of the change
Avoid graphics corruption and hangs on compiz start-up by ensuring that
plugins don't get initialized, de-initialized and re-initialzed during
start-up. (LP: #963093) (LP: #963633)
The multiple init/fini/init calls occured when compiz was asked to load an
invalid plugin name. This occurred most recently as plugins "bailer" and
"detection" were left in some peoples' configs while the plugins themselves
no longer exist in the current compiz release.
The source of the graphics corruption and hangs has been found to be a
problem in the composite and/or opengl plugins. One or both of them are unsafe
to init/fini multiple times without a full compiz restart. So the root cause
is not exactly known yet. However composite and opengl are not alone; many
plugins have bugs with init/fini/init sequences, so it is valuable to fix
the start-up plugin ordering as this does.
Essentially this fix works by remembering which plugins don't exist at all
and putting them on a black list. Then subsquent updates check the blacklist
and know they should never include those failed plugins in testing whether
the active plugin lists have changed.
The second part of the fix is to ensure updatePlugins no longer calls
screen-
can and is loaded. That's not only redundant and wasteful but might cause
further callbacks to updatePlugins unnecessarily.
The final part of the fix is to remove a rendundant call to updatePlugins from
EventManager::init. It is not required as main tells PluginManager when to
load plugins on startup.
IMPORTANT NOTE FOR UBUNTU PACKAGING
In downstream ubuntu branches the DEFAULT_PLUGINS list in "debian/rules" also causes multiple plugin loads on start-up and prevents this fix from working! The solution is to change DEFAULT_PLUGINS to just "ccp".
Unmerged revisions
- 3072. By Daniel van Vugt
-
Avoid graphics corruption and hangs on compiz start-up by ensuring that
plugins don't get initialized, de-initialized and re-initialzed during
start-up. (LP: #963093) (LP: #963633)The multiple init/fini/init calls occured when compiz was asked to load an
invalid plugin name. This occurred most recently as plugins "bailer" and
"detection" were left in some peoples' configs while the plugins themselves
no longer exist in the current compiz release.The source of the graphics corruption and hangs has been found to be a
problem in the composite and/or opengl plugins. One or both of them are unsafe
to init/fini multiple times without a full compiz restart. So the root cause
is not exactly known yet. However composite and opengl are not alone; many
plugins have bugs with init/fini/init sequences, so it is valuable to fix
the start-up plugin ordering as this does.Essentially this fix works by remembering which plugins don't exist at all
and putting them on a black list. Then subsquent updates check the blacklist
and know they should never include those failed plugins in testing whether
the active plugin lists have changed.The second part of the fix is to ensure updatePlugins no longer calls
screen->setOptionForPl ugin to change the active_plugins setting based on what
can and is loaded. That's not only redundant and wasteful but might cause
further callbacks to updatePlugins unnecessarily.The final part of the fix is to remove a rendundant call to updatePlugins from
EventManager::init. It is not required as main tells PluginManager when to
load plugins on startup.
std::set has a count method.
Ideally I was looking for something like "contains", but a non-zero
count means that it exists in the set.
Perhaps count(name) find(name) != blacklist.end()
blacklist.
is nicer than:
blacklist.
??