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

List:       kde-hardware-devel
Subject:    Re: [Kde-hardware-devel] PowerManager Library
From:       "Lamarque V. Souza" <lamarque () kde ! org>
Date:       2012-06-20 22:10:44
Message-ID: 201206201910.44882.lamarque () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Em Wednesday 20 June 2012, Daniel Nicoletti escreveu:
> Patch done, tested, works pretty well
> https://git.reviewboard.kde.org/r/105310/
> 
> > I changed it to QDBusReply, which is the equivalent to
> > QDBusPendingReply+waitForFinished, and the crash is gone (the link above
> > is a diff output showing thatt). The link in your last email states that
> > QDBusPendingReply::value() does an implicit waitForFinished. The code in
> > the link above is very old (probably more than three years old) and it
> > used to work perfectly until some months ago when I received a crash
> > report from bugs.kde.org. After reading the link you sent I am wondering
> > why out of sudden QDBusPendingReply::value() stopped doing the implicit
> > waitForFinished in Plasma NM? The interface is not invalid, if you read
> > the rest of Plasma NM code you will notice that the cod above run only
> > when the Plasma NM's kded module send the RemoteActivatableAdded signal,
> > which indicates the DBus interface is available.
> 
> Well I don't know the crash backtrace, so I can't tell what the problem is.

	The bug in question is this one: 
https://bugs.kde.org/show_bug.cgi?id=283241, it contains the crashlog and some 
other information.
 
> > Ok, so how do you use them if they are still invalid after the service is
> > back to the bus?
> 
> Well the interface is invalid while no app has registered it, after some
> app registers it you can access. I do this a lot on my apps.

	Well, that did not work for Solid::Networking::status() and solid-
networkstatus months ago, so I changed them to reallocate the QDBusInterface 
to solid-networkstatus, now it works. Maybe there is a latency somewhere in 
the QDBusInterface code.
 
> > So why did you bring the kded latency problem to the talking? What was
> > your pointing in doing that?
> 
> Because you mentioned the desktop-freeze problem which was also because of
> a dead lock between apper and nm, async solved the problem, but using
> threads would have solved too (which is why apper kded module now runs
> on a thread, colord-kde kded, and print-manager...)

	I mentioned desktop freezes in general, not that particular bug. Hmm I 
guess you created a thread that communicates with dbus and another that does 
the heavy work. Ok, that would be good approach to prevent kded modules from 
blocking kded. 

-- 
Lamarque V. Souza
KDE's Network Management maintainer
http://planetkde.org/pt-br

[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Tahoma'; font-size:12pt; font-weight:400; \
font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Em \
Wednesday 20 June 2012, Daniel Nicoletti escreveu:</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; Patch done, tested, works pretty well</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; \
https://git.reviewboard.kde.org/r/105310/</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; </p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; &gt; I changed it to QDBusReply, which is \
the equivalent to</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; \
QDBusPendingReply+waitForFinished, and the crash is gone (the link above</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; is a diff output \
showing thatt). The link in your last email states that</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; \
QDBusPendingReply::value() does an implicit waitForFinished. The code in</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; the link above is \
very old (probably more than three years old) and it</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; &gt; used to work perfectly until some \
months ago when I received a crash</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; &gt; report from bugs.kde.org. After reading the link you \
sent I am wondering</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; &gt; why out of sudden QDBusPendingReply::value() stopped \
doing the implicit</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; \
waitForFinished in Plasma NM? The interface is not invalid, if you read</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; the rest of Plasma \
NM code you will notice that the cod above run only</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; &gt; when the Plasma NM's kded module send \
the RemoteActivatableAdded signal,</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; &gt; which indicates the DBus interface is available.</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; Well I don't know the \
crash backtrace, so I can't tell what the problem is.</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">	The bug in question is this \
one: https://bugs.kde.org/show_bug.cgi?id=283241, it contains the crashlog and some \
other information.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; Ok, so how do you \
use them if they are still invalid after the service is</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; back to the \
bus?</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; </p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; Well the interface is \
invalid while no app has registered it, after some</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; app registers it you can access. I do this a \
lot on my apps.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">	Well, that did not work for Solid::Networking::status() and \
solid-networkstatus months ago, so I changed them to reallocate the QDBusInterface to \
solid-networkstatus, now it works. Maybe there is a latency somewhere in the \
QDBusInterface code.</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;"> </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; &gt; So why did you bring the kded latency problem to the \
talking? What was</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; &gt; \
your pointing in doing that?</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; Because you mentioned the desktop-freeze problem which was \
also because of</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; a dead \
lock between apper and nm, async solved the problem, but using</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; threads would have \
solved too (which is why apper kded module now runs</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; on a thread, colord-kde kded, and \
print-manager...)</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">	I mentioned desktop freezes in general, not that particular bug. \
Hmm I guess you created a thread that communicates with dbus and another that does \
the heavy work. Ok, that would be good approach to prevent kded modules from blocking \
kded. </p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Lamarque V. Souza</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">KDE's Network Management \
maintainer</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">http://planetkde.org/pt-br</p></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