<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/108031/">http://git.reviewboard.kde.org/r/108031/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ideally we should serialize only needed data, meaning that "If the output is not enabled, just store enabled: false".
Until we improve serialization (I plan to do it this week), can you modify your patch to something like:
if (output->isEnabled()) {
mode stuff
}</pre>
<br />
<p>- Àlex</p>
<br />
<p>On December 30th, 2012, 5:24 p.m., Lukáš Karas wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Solid, Àlex Fiestas and Dan Vrátil.</div>
<div>By Lukáš Karas.</div>
<p style="color: grey;"><i>Updated Dec. 30, 2012, 5:24 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When KDED with KScreen module starts with connected, but unitialized output (connected via DisplayPort in this case), kded crash due to NULL pointer dereference.
#6 0x00007f820730f68e in KScreen::Mode::refreshRate (this=0x0) at /media/data/cecko/KDE/libkscreen/src/mode.cpp:87
#7 0x00007f8207560a82 in Serializer::saveConfig (config=0x1e25b20) at /media/data/cecko/KDE/kscreen/kded/serializer.cpp:115
#8 0x00007f820755eba6 in KScreenDaemon::saveCurrentConfig (this=0x2192a50) at /media/data/cecko/KDE/kscreen/kded/daemon.cpp:101
...
With my patch is serialization of (null) mode skipped. Added debug outputs can be removed... With aplied patch is output follows:
Finding a mode with:
QSize(0, 0)
""
Finding a mode with:
QSize(1600, 900)
"60"
1
Change detected
Scheduling screen save
Screen property change detected!
Monitor change detected
Saving current config
Could not found mode id 0 on output "DP3"
All modes:
111 : "640x480"
75 : "1440x900"
112 : "720x400"
79 : "1024x768"
...
110 : "640x480"
2
Config saved on: "/home/karry/.kde/share/apps/kscreen/7deb1978bbf838a0b702d57fef4e36cba0b702d57fef4e36cb" </pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kded/serializer.cpp <span style="color: grey">(62dde51)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/108031/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>