https://bugs.kde.org/show_bug.cgi?id=350994

--- Comment #3 from Evgeny Brazgin <k...@xapienz.ru> ---
I just made a little analysis and found that it may be a bug in Qt.
Currently plasmashell (shellcorona.cpp) finds accordance between QScreen and
KScreen::Output by property name(). You may see this in methods
ShellCorona::outputToScreen or ShellCorona::screenToOutput:
... if (screen->name() == output->name()) ...

Also if I open QScreen.h header, I see that property 'name' is constant:
Q_PROPERTY(QString name READ name CONSTANT)

But if I open the platform-specific implementation of QScreen, which is
QXcbScreen, there is a method QXcbScreen::setOutputwhich changes inner property
m_outputName and has the following TODO:
// TODO: Send an event to the QScreen instance that the screen changed its name

So in this place the QScreen changes its m_outputName and noone knows about it.
This 'm_outputName' is the result which is returned as QScreen name() and it
becomes inconsistent with shellcorona's data. After that ShellCorona loses
correct names for QScreens and can't find correct KScreen::Output for existing
QScreen, then outputForScreen returns empty pointer and the crash occurs while
dereferencing it.

I think we should elevate this bug to Qt guys. Maybe the combination of
emitting existing signals screenRemoved and screenAdded will be enough to
handle the problem.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to