Used to get:
kwin_wayland: kwin/composite.cpp:646: void KWin::Compositor::aboutToSwapBuffers(): Assertion "!m_bufferSwapPending' failed."
Details
- Reviewers
zzag - Group Reviewers
KWin - Commits
- R108:2e1880b85a02: Fix crash when using kwin on windowed mode
Ran kwin_wayland --socket dave --output-count 2 konsole
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
The context is, kwin_wayland --socket dave --output-count 2 konsole crashes for me here. I wanted to use it to debug the multiple display rotation but it crashes at start.
Now the present function is much more similar to EglGbmBackend::present.
The crash happens because nobody is setting m_bufferSwapPending to false after presenting per screen. My guess is that D18465 didn't took multiscreen windowed mode into account.
Hmm, WaylandBackend::checkBufferSwap should call Compositor::bufferSwapComplete after all outputs are rendered. Most likely we're hitting the TODO comment in WaylandBackend::checkBufferSwap, can you check that?
I wonder if we could check whether there is an output with pending frame callback instead.
I checked, and no, it's not being hit.
I don't really understand why you want to try something different. This is using the same behaviour we have on the Egl backend, which this should be mimicking, AFAIU.
Hmm, the crash goes away. Though now screen content is not updated when there are 2 or more outputs (in either case it seems to be unrelated to this patch).
The former approach to fix the issue didn't have this behaviour... I'll take another look.
Yes, seems unrelated, for some reason Surface stops emitting frameRendered, I don't really know why.
The reason why it stops emitting frameRendered signal is that the damage region gets occluded for the first output. Thus, the egl backend won't call presentOnSurface. In other words, we are hitting the TODO comment now.