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

List:       kde-devel
Subject:    Re: help with KIO::CopyJob
From:       "Jason Harris" <kstars () 30doradus ! org>
Date:       2007-09-13 1:29:54
Message-ID: 401f1570709121829x6aeb53a0q92edb26c5e25c7e3 () mail ! gmail ! com
[Download RAW message or body]

Hi,

Thanks for all the replies.  I didn't see anything obvious in the
valgrind output, though it's entirely possible that I missed
something.

I simplified the code by using KIO::storedGet() instead of copy(), and
getting rid of the KTemporary file stuff and JobList altogether.  Now,
I can close the ThumbnailPicker tool, and its parent dialog (the
Object Details window), without any problems.  However, when I quit
KStars, I get the following error message:

Fatal Error: Accessed global static 'KSharedUiServerProxy
*serverProxy()' after destruction. Defined at
/home/kstars/kde4svn/kdelibs/kdeui/jobs/kuiserverjobtracker.cpp:32

I thought maybe my call to "job->setUiDelegate(0)" was causing it, but
commenting that out did nothing.  The problem is, I don't know what
KSharedUiServerProxy is, although I presume it has something to do
with kio job management.  Also, since I am still getting many messages
like "kdeinit4: PID 7465 terminated." on the console, a few *seconds*
after the above error is printed, the problem seems to be that these
jobs are not being deleted properly.

As a test, I also added some test code that uses KIO::storedGet() to
download an image from my webserver every time I press a key.  I can
press this key many times, and see the download repeating in the
console, and yet I don't get any errors or stray PID messages when I
quit KStars after this test.

My guess is that it has trouble downloading some of the URLs in the
google image search, and these in-progress jobs are still around when
I quit the program.  If this is indeed the case, how can I get rid of
these lingering jobs?  I tried putting JobList back in so that I could
loop over all jobs in the list and kill() them in the desructor, but
this does not alter the behavior (i.e., I still get the same
KSharedUiserverProxy error when I quit KStars, and I still get the
long list of "PID terminated" messages long after the program has
quit).

Maybe I just need to understand better how the KIO job/scheduler stuff
works.  When I call KIO::storedGet() a number of times, what is in
charge of managing those jobs?  Is there a way I can access this
manager and tell it to clear all pending jobs?  Maybe that would clear
up my problem, if I could put that in ~ThumbnailPicker().

thanks for any ideas, and sorry for my ignorance!
Jason
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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