[Bug 22837] calling context->setFinished() when handling channels not possible outside of handleChannels() method.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jul 19 18:28:10 CEST 2009


http://bugs.freedesktop.org/show_bug.cgi?id=22837





--- Comment #1 from Andre Moreira Magalhaes <andrunko at gmail.com>  2009-07-19 09:28:09 PST ---
By looking at the MC log it seems tp-qt4 is sending
org.freedesktop.Telepathy.Qt4.ErrorHandlingError as an error. This happens in 2
cases, one is when context is destroyed without being finished, other is when
you call setFinishedWithError with no error code.

Could you please add a debug message on MethodInvocationContext destructor and
check if it's being called with mFinished set to false.

Also please provide tp-qt4 logs :)

(In reply to comment #0)
> The scenario:
> =============
> 
> I have a Telepathy Channel Handler Client. Before I decide whether I want to
> handle some channels or not, I want to find out the aliases of the remote
> contacts of the channels. In order to do this, I have the following pseudocode:
> 
> MyChannelHandler::handleChannels(Channel channel, Context context)
> {
>   connect(channel->becomeReady(),
>           SIGNAL(finished()),
>           SLOT(onChannelReady()));
> 
>   m_context = context;
>   m_channel = channel;
> }
> 
> MyChannelHandler::onChannelReady()
> {  
>   if (m_channel->initiator()->alias() == "test at test.com") {
>     m_context->setFinished();
>   } else {
>     m_context->setFinishedWithError();
>   }
> }
> 
> The problem:
> ============
> 
> The finished() signal is never emitted, so onChannelReady() never gets called.
> MC Output reports an error from TpQt4.
> 
> MC Output:
> ==========
> 
> ** (process:17704): DEBUG: on_new_channels:
> /org/freedesktop/Telepathy/Connection/gabble/jabber/telepathy_2dtest2_40jabber_2eorg_2fTelepathy_2e52c9dcb6/ImChannel3
> ** (process:17704): DEBUG: on_new_channels:  
> "org.freedesktop.Telepathy.Channel.InitiatorID" => "grundleborg at googlemail.com"
> ** (process:17704): DEBUG: on_new_channels:  
> "org.freedesktop.Telepathy.Channel.TargetHandleType" => 1
> ** (process:17704): DEBUG: on_new_channels:  
> "org.freedesktop.Telepathy.Channel.TargetHandle" => 3
> ** (process:17704): DEBUG: on_new_channels:  
> "org.freedesktop.Telepathy.Channel.TargetID" => "grundleborg at googlemail.com"
> ** (process:17704): DEBUG: on_new_channels:  
> "org.freedesktop.Telepathy.Channel.Requested" => FALSE
> ** (process:17704): DEBUG: on_new_channels:  
> "org.freedesktop.Telepathy.Channel.ChannelType" =>
> "org.freedesktop.Telepathy.Channel.Type.Text"
> ** (process:17704): DEBUG: on_new_channels:  
> "org.freedesktop.Telepathy.Channel.InitiatorHandle" => 3
> ** (process:17704): DEBUG: on_new_channels:  
> "org.freedesktop.Telepathy.Channel.Interfaces" => ((GStrv*) 0x1f56110)
> ** (process:17704): DEBUG: _mcd_mission_set_parent: child = 0x1f57e30, parent =
> 0x1f3e8b0
> ** (process:17704): DEBUG: _mcd_channel_set_status: 0x1f57e30, 3
> ** (process:17704): DEBUG: _mcd_dispatcher_enter_state_machine: CTXREF11 on
> 0x1f5ed40
> ** (process:17704): DEBUG: _mcd_dispatcher_enter_state_machine: new dispatcher
> context 0x1f5ed40 for unrequested channel 0x1f57e30 (only):
> /org/freedesktop/Telepathy/Connection/gabble/jabber/telepathy_2dtest2_40jabber_2eorg_2fTelepathy_2e52c9dcb6/ImChannel3
> ** (process:17704): DEBUG: mcd_dispatch_operation_constructor: do10/0x1f45d90
> ** (process:17704): DEBUG: mcd_dispatch_operation_constructor: Channel:
> /org/freedesktop/Telepathy/Connection/gabble/jabber/telepathy_2dtest2_40jabber_2eorg_2fTelepathy_2e52c9dcb6/ImChannel3
> ** (process:17704): DEBUG: _mcd_dispatcher_enter_state_machine: No filters
> found for context 0x1f5ed40, starting the channel handler
> ** (process:17704): DEBUG: mcd_dispatcher_context_ref: CTXREF07 on 0x1f5ed40
> (ref = 1)
> ** (process:17704): DEBUG: mcd_dispatcher_context_ref: CTXREF13 on 0x1f5ed40
> (ref = 2)
> ** (process:17704): DEBUG: handlers_can_bypass_approval:
> org.freedesktop.Telepathy.Client.KopetePluginHandler has BypassApproval=T
> ** (process:17704): DEBUG: mcd_dispatcher_context_release_client_lock: called
> on 0x1f5ed40, locks = 1
> ** (process:17704): DEBUG: mcd_dispatcher_context_ref: CTXREF04 on 0x1f5ed40
> (ref = 3)
> ** (process:17704): DEBUG: mcd_dispatcher_run_handlers: Possible handler:
> org.freedesktop.Telepathy.Client.KopetePluginHandler (still exists: Y)
> ** (process:17704): DEBUG: _mcd_channel_set_status: 0x1f57e30, 4
> ** (process:17704): DEBUG: mcd_dispatcher_context_ref: CTXREF03 on 0x1f5ed40
> (ref = 4)
> ** (process:17704): DEBUG: mcd_dispatcher_handle_channels: calling
> HandleChannels on KopetePluginHandler for context 0x1f5ed40
> ** (process:17704): DEBUG: mcd_dispatcher_context_unref: CTXREF04 on 0x1f5ed40
> (ref = 5)
> ** (process:17704): DEBUG: mcd_dispatcher_context_unref: CTXREF13 on 0x1f5ed40
> (ref = 4)
> ** (process:17704): DEBUG: mcd_dispatcher_context_unref: CTXREF07 on 0x1f5ed40
> (ref = 3)
> ** (process:17704): DEBUG: mcd_dispatcher_context_unref: CTXREF11 on 0x1f5ed40
> (ref = 2)
> ** (process:17704): DEBUG: on_channel_ready: channel 0x1f57e30 is ready
> ** (process:17704): DEBUG: mcd_dispatcher_context_ref: CTXREF02 on 0x1f5ed40
> (ref = 1)
> ** (process:17704): WARNING **: handle_channels_cb got error:
> org.freedesktop.Telepathy.Qt4.ErrorHandlingError:
> org.freedesktop.Telepathy.Qt4.ErrorHandlingError
> ** (process:17704): DEBUG: _mcd_channel_set_status: 0x1f57e30, 6
> ** (process:17704): DEBUG: _mcd_channel_undispatchable: 0x1f57e30:
> /org/freedesktop/Telepathy/Connection/gabble/jabber/telepathy_2dtest2_40jabber_2eorg_2fTelepathy_2e52c9dcb6/ImChannel3
> ** (process:17704): DEBUG: _mcd_channel_undispatchable: calling Destroy()
> ** (process:17704): DEBUG: mcd_dispatcher_context_unref: CTXREF02 on 0x1f5ed40
> (ref = 2)
> ** (process:17704): DEBUG: mcd_handler_call_data_free: called
> ** (process:17704): DEBUG: mcd_dispatcher_context_unref: CTXREF03 on 0x1f5ed40
> (ref = 1)
> ** (process:17704): DEBUG: mcd_dispatcher_context_unref: freeing the context
> 0x1f5ed40
> ** (process:17704): DEBUG: _mcd_dispatch_operation_finish: do10/0x1f45d90 has
> finished
> ** (process:17704): DEBUG: proxy_destroyed: Channel proxy invalidated:
> tp_dbus_errors_quark 8: Channel was closed
> ** (process:17704): DEBUG: mcd_channel_abort: 0x1f57e30
> ** (process:17704): DEBUG: _mcd_mission_set_parent: child = 0x1f57e30, parent =
> (nil)
> ** (process:17704): DEBUG: _mcd_operation_remove_mission: removing mission:
> 0x1f57e30
> ** (process:17704): DEBUG: _mcd_channel_dispose: 0x1f57e30 (is disposed = 0)
> ** (process:17704): DEBUG: _mcd_mission_dispose: mission disposed 0x1f57e30
> ** (process:17704): DEBUG: _mcd_mission_finalize: mission finalized 0x1f57e30
> 


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the telepathy-bugs mailing list