[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-hardware-devel
Subject:    Re: [Kde-hardware-devel] Review Request: KScreen / KDED crashed when starting with unconfigured moni
From:       Àlex_Fiestas <afiestas () kde ! org>
Date:       2012-12-30 18:24:26
Message-ID: 20121230182426.18396.4091 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108031/#review24278
-----------------------------------------------------------


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
}

- Àlex Fiestas


On Dec. 30, 2012, 5:24 p.m., Lukáš Karas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108031/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2012, 5:24 p.m.)
> 
> 
> Review request for Solid, Àlex Fiestas and Dan Vrátil.
> 
> 
> Description
> -------
> 
> 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" \
>  
> 
> Diffs
> -----
> 
> kded/serializer.cpp 62dde51 
> 
> Diff: http://git.reviewboard.kde.org/r/108031/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Lukáš Karas
> 
> 


[Attachment #5 (text/html)]

<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 &quot;If the output is not enabled, just \
store enabled: false&quot;.

Until we improve serialization (I plan to do it this week), can you modify your patch \
to something like:

if (output-&gt;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) 
	&quot;&quot; 
	Finding a mode with:  
	QSize(1600, 900) 
	&quot;60&quot; 
	1 
	Change detected 
	Scheduling screen save 
	Screen property change detected! 
	Monitor change detected 
	Saving current config 
	Could not found mode id 0 on output &quot;DP3&quot; 
	All modes: 
	111 : &quot;640x480&quot; 
	75 : &quot;1440x900&quot; 
	112 : &quot;720x400&quot; 
	79 : &quot;1024x768&quot; 
	...
	110 : &quot;640x480&quot; 
	2 
	Config saved on:  &quot;/home/karry/.kde/share/apps/kscreen/7deb1978bbf838a0b702d57fef4e36cba0b702d57fef4e36cb&quot; \
</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>



_______________________________________________
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic