[PyKDE] Cannot use KUniqueApplication with dcop

JIm Bublitz midwest at eskimo.com
Thu Sep 21 00:50:32 BST 2006


On Wednesday 23 August 2006 14:58, Sebastian Kügler wrote:
> I'm trying to make a KUniqueApplication accessible via dcop, but I'm
> getting the following error:
>
> dcop-testapp: ERROR: Communication problem with dcop-testapp, it probably
> crashed.
>
> If I change KUniqueApplication to KApplication, it works just fine. Does
> anyone know what's going on here? How can I debug this further?
>
> Attached small program illustrates the problem (It's mostly the same as in
> my previous post).

I found some time to look at this a little more. Your short sample app will 
"work" if you comment out the attach() call. You can also convert 
PyKDE/examples/example_dcopexport.py to KUniqueApplication (modify the import 
statement and the KApplication ctor call), and it will "work" from kdcop.

I say "work" because I ran into some other problems I didn't try to resolve, 
and I'm not sure if they're bugs or normal operation. The first is that 
executing your sample app creates two processes (pids), and two entires in 
kdcop (one with a pid, one without). That doesn't seem to be a big deal.

The other problem is that selecting "quit" via kdcop doesn't terminate the 
application when KUniqueApplication is used, but it just may be necessary to 
add some other code to accomplish that - I didn't try anything else. I'm not 
sure how KDE is written in that respect.

Jim




More information about the PyQt mailing list