Summary: | Assert on "kwin --restart &" | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Christoph Feck <cfeck> |
Component: | compositing | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | Keywords: | regression |
Priority: | NOR | Flags: | mgraesslin:
ReviewRequest+
|
Version: | unspecified | ||
Target Milestone: | 4.10 RC 3 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
URL: | https://git.reviewboard.kde.org/r/108321/ | ||
Latest Commit: | http://commits.kde.org/kde-workspace/048fe5397dbdabb791c4082f3a56ef23942d3bac | Version Fixed In: | 4.10 |
Sentry Crash Report: |
Description
Christoph Feck
2013-01-05 21:54:12 UTC
comes with commit 1fefaa9e1e7f6c53c5dca283f12653432d6130cb to fix bug #308040 The assert is wrong. ... resp. Toplevel::compositing() could just wrap static Compositor::compositing() Martin's choice ;-) > Since kwin leaks memory over time, I sometimes simply run "kwin --restart &" from shell. Since a few days, I get this assert.
could you please run valgrind on it to see where it leaks memory. I'm not aware of leaks and due to the way I work cannot see any leaks over time.
@Thomas: I think there was a reason why Toplevel::compositing() is not wrapping the Compositor::compositing(). I don't remember the details as I don't have the code open just now to look into it.
I don't think so ;-) bool Workspace::compositing() const { return m_compositor && m_compositor->hasScene(); } bool Toplevel::compositing() const { Compositor *c = Compositor::self(); return c && c->hasScene(); } class Compositor { static bool compositing() { return s_compositor != NULL && s_compositor->isActive(); } } while three different approaches, they effectively do all the same - m_compositor points Compositor::self() being s_compositor - bool Compositor::isActive() { return !m_finishing && hasScene(); } the only difference is the invocation of m_finishing being toggled around Workspace::finishCompositing() and thus impacting Scene::windowClosed/Deleted and Toplevel::finishCompositing - but whenever it's true, one should no longer access the compositor - i'd say. The epic difference here is that for Toplevel::compositing there's an assert on the compositor singleton (which we can't hold because of the other bug - windows are apparently released after the compositor got nuked) yeah, the finishing is the important part which needs to be around. But given the code it should be possible to wrap the Toplevel::compositing() around Workspace::compositing() Git commit 048fe5397dbdabb791c4082f3a56ef23942d3bac by Martin Gräßlin. Committed on 10/01/2013 at 10:10. Pushed by graesslin into branch 'KDE/4.10'. Remove asserts from Compositor and wrap Toplevel::compositing() around Workspace::compositing() FIXED-IN: 4.10 REVIEW: 108321 M +1 -2 kwin/composite.cpp M +0 -1 kwin/composite.h M +5 -5 kwin/workspace.h http://commits.kde.org/kde-workspace/048fe5397dbdabb791c4082f3a56ef23942d3bac |