[Gambas-user] gb.dbus & DBusExplorer : How to implement "_Introspect"? (If necessary??)

T Lee Davidson t.lee.davidson at gmail.com
Mon Jan 14 18:23:28 CET 2019


On 1/14/19 4:56 AM, Benoît Minisini wrote:
> Le 14/01/2019 à 08:28, Bruce a écrit :
>> Hi guys,
>>
>> I have a project (*^&*%& [1] ) that uses gb.dbus. It works fine most of the time but lately we have been getting strange
>> hangups, the cause of which I do not know.  So I have been trying the DBusExplorer from the farm to see if I can find the oddity.
>>
>> The problem is this, quite simply, when I 2xClick on the relative entry in the Session tab listbox it just goes to sleep.
>> Running in debug mode I see that it gets to FVersiongbXML.ShowPathContent() then tries to execute "sIntr = DBus[sBus &
>> sApplication]._Introspect(sPath)". Which is fine and good I suppose but, there is no public/exported (whatever)
>> "_Introspect()" method in that project.
>>
>> So, please, what do I have to do to implement such a method and what should it do?
> 
> _Introspect() is a method of the object returned by DBus[sBus & sApplication], it's not a DBus method. YOu don't have to
> implement anything.
> 
> This method asks DBus to introspect a DBus object of the specified application. DBus then calls the "Introspect()" DBus method
> that must be implemented by the DBus object, which is automatic as soon as this DBus object is implemented in Gambas and
> inherits the DBusObject class.
> 
> Show your project, and we will tell you what is wrong.
> 

I sometimes get a similar behavior with QDBusViewer. It seems that either some applications that expose an interface on the bus
do not properly implement the Introspect method, or a security policy blocks the message.

For example, when I try to inspect Thunderbird, it seems to hang for a while and then I get:
Error: Call to object / at org.mozilla.thunderbird.ZGVmYXVsdA__: org.freedesktop.DBus.Error.NoReply (Did not receive a reply.
Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the
reply timeout expired, or the network connection was broken.) failed


___
Lee


More information about the User mailing list