List Info

Thread: Iris Update




Iris Update
user name
2006-05-03 07:10:05
On Tuesday 18 April 2006 00:54, Justin Karneges wrote:
> However, most of my work is based around refactoring. 
This means you
> probably won't see a search-and-replace Qt4-port
within the main Iris
> branch.  Iris will be fully Qt4 once I've refactored
most all of it.

I've decided this will only apply to xmpp-core.  My
refactoring plans for the 
high-level Iris components will be far too
resource-consuming, and so for now 
I'll opt for a quick port.  I'll be merging the Psi port
into Iris CVS as 
official.  The port *is* essentially search-and-replace, and
depends on 
Qt3Support.

This is not ideal, but refactoring the high-level layer will
take a lot of 
time and will break all projects considerably.  More
importantly is getting 
all projects standardized on the same Qt4 Iris branch.  In
some phase after 
that I'll de-Qt3Support-ify the code.  And in a much, much
later phase I'll 
consider a refactor.

That said, I want to restate that this is only for the
high-level Iris layer.  
The lower-level 'xmpp-core' part *will* be a refactor and
it *won't* have 
Qt3Support dependence.  Stay tuned.

Note: the Psi port merge into the Iris CVS will occur after
xmpp-core is 
ready.  However, until then I am evaluating the Psi port
within Leapfrog.

-Justin
_______________________________________________
delta mailing list
deltalists.affinix.com
http://lists.affinix.com/listinfo.cgi/delta-affinix.com
Ending an XMPP::Client connection
user name
2006-05-03 17:45:36
Hi

For a while now I've been using XMPP::Client without
troubles. Until 
now, when for some reason it started to crash after closing
a 
connection, so I am suspecting that I am not doing that part
right.

How should I finalize an ongoing connection ? What I do is
to call 
XMPP::Client::close() and wait for the ClientStream's
connectionClose() 
signal. And only then I delete the ClientStream, TLS,
TLSHandler, and 
Connector instances, in that order. Is that ok ? Do I need
to do 
something else ?

Thanks in advance.

Regards,
Hernán


_______________________________________________
delta mailing list
deltalists.affinix.com
http://lists.affinix.com/listinfo.cgi/delta-affinix.com
Ending an XMPP::Client connection
user name
2006-05-03 18:57:20
I've run into similar problems and I've found I can make
it go away by
waiting a bit before closing things down, e.g.:

  // wait a bit before closing...
  QTimer::singleShot( 500, this, SLOT( doClose() ) );

This is just a hack, I'd be interested in hearing better
ideas...

> -----Original Message-----
> From: delta-bounceslists.affinix.com
[mailto:delta-
> bounceslists.affinix.com] On Behalf Of Hernan Tylim
> Sent: Wednesday, May 03, 2006 1:46 PM
> To: Delta Project
> Subject: [Delta] Ending an XMPP::Client connection
> 
> Hi
> 
> For a while now I've been using XMPP::Client without
troubles. Until
> now, when for some reason it started to crash after
closing a
> connection, so I am suspecting that I am not doing that
part right.
> 
> How should I finalize an ongoing connection ? What I do
is to call
> XMPP::Client::close() and wait for the ClientStream's
connectionClose()
> signal. And only then I delete the ClientStream, TLS,
TLSHandler, and
> Connector instances, in that order. Is that ok ? Do I
need to do
> something else ?
> 
> Thanks in advance.
> 
> Regards,
> Hernán
> 
> 
> _______________________________________________
> delta mailing list
> deltalists.affinix.com
> http://lists.affinix.com/listinfo.cgi/delta-affinix.com

_______________________________________________
delta mailing list
deltalists.affinix.com
http://lists.affinix.com/listinfo.cgi/delta-affinix.com
Ending an XMPP::Client connection
user name
2006-05-04 08:37:41
Hernan,

Welcome to Qt and signals. 

You are probably deleting an object during its own signal. 
Delaying your 
cleanup code is the right approach.  Similarly, you could
use 
QObject::deleteLater.

I don't think a 500ms delay is necessary, just a trip back
to the eventloop.  
I think Psi uses queued signals (read: Qt::QueuedConnection)
for the job, but 
I'm not sure.

-Justin

On Wednesday 03 May 2006 11:57, Chuck Zumbrun wrote:
> I've run into similar problems and I've found I can
make it go away by
> waiting a bit before closing things down, e.g.:
>
>   // wait a bit before closing...
>   QTimer::singleShot( 500, this, SLOT( doClose() ) );
>
> This is just a hack, I'd be interested in hearing
better ideas...
>
> > -----Original Message-----
> > From: delta-bounceslists.affinix.com
[mailto:delta-
> > bounceslists.affinix.com] On Behalf Of Hernan
Tylim
> > Sent: Wednesday, May 03, 2006 1:46 PM
> > To: Delta Project
> > Subject: [Delta] Ending an XMPP::Client connection
> >
> > Hi
> >
> > For a while now I've been using XMPP::Client
without troubles. Until
> > now, when for some reason it started to crash
after closing a
> > connection, so I am suspecting that I am not doing
that part right.
> >
> > How should I finalize an ongoing connection ? What
I do is to call
> > XMPP::Client::close() and wait for the
ClientStream's connectionClose()
> > signal. And only then I delete the ClientStream,
TLS, TLSHandler, and
> > Connector instances, in that order. Is that ok ?
Do I need to do
> > something else ?
> >
> > Thanks in advance.
> >
> > Regards,
> > Hernán
> >
> >
> > _______________________________________________
> > delta mailing list
> > deltalists.affinix.com
> > http://lists.affinix.com/listinfo.cgi/delta-affinix.com
>
> _______________________________________________
> delta mailing list
> deltalists.affinix.com
> http://lists.affinix.com/listinfo.cgi/delta-affinix.com
_______________________________________________
delta mailing list
deltalists.affinix.com
http://lists.affinix.com/listinfo.cgi/delta-affinix.com
Ending an XMPP::Client connection
user name
2006-05-04 11:32:54
Agreed, I looked back through my call stack and sure enough
I was in a stack
that started with a signal from the client.  Just firing the
timer with a 0
delay takes me back to the event loop and lets everything
clean up properly
then.

> -----Original Message-----
> From: delta-bounceslists.affinix.com
[mailto:delta-
> bounceslists.affinix.com] On Behalf Of Justin Karneges
> Sent: Thursday, May 04, 2006 4:38 AM
> To: Delta Project
> Subject: Re: [Delta] Ending an XMPP::Client connection
> 
> Hernan,
> 
> Welcome to Qt and signals. 
> 
> You are probably deleting an object during its own
signal.  Delaying your
> cleanup code is the right approach.  Similarly, you
could use
> QObject::deleteLater.
> 
> I don't think a 500ms delay is necessary, just a trip
back to the
> eventloop.
> I think Psi uses queued signals (read:
Qt::QueuedConnection) for the job,
> but
> I'm not sure.
> 
> -Justin
> 
> On Wednesday 03 May 2006 11:57, Chuck Zumbrun wrote:
> > I've run into similar problems and I've found I
can make it go away by
> > waiting a bit before closing things down, e.g.:
> >
> >   // wait a bit before closing...
> >   QTimer::singleShot( 500, this, SLOT( doClose() )
);
> >
> > This is just a hack, I'd be interested in hearing
better ideas...
> >
> > > -----Original Message-----
> > > From: delta-bounceslists.affinix.com
[mailto:delta-
> > > bounceslists.affinix.com] On Behalf Of Hernan
Tylim
> > > Sent: Wednesday, May 03, 2006 1:46 PM
> > > To: Delta Project
> > > Subject: [Delta] Ending an XMPP::Client
connection
> > >
> > > Hi
> > >
> > > For a while now I've been using XMPP::Client
without troubles. Until
> > > now, when for some reason it started to crash
after closing a
> > > connection, so I am suspecting that I am not
doing that part right.
> > >
> > > How should I finalize an ongoing connection ?
What I do is to call
> > > XMPP::Client::close() and wait for the
ClientStream's
> connectionClose()
> > > signal. And only then I delete the
ClientStream, TLS, TLSHandler, and
> > > Connector instances, in that order. Is that
ok ? Do I need to do
> > > something else ?
> > >
> > > Thanks in advance.
> > >
> > > Regards,
> > > Hernán
> > >
> > >
> > >
_______________________________________________
> > > delta mailing list
> > > deltalists.affinix.com
> > > http://lists.affinix.com/listinfo.cgi/delta-affinix.com
> >
> > _______________________________________________
> > delta mailing list
> > deltalists.affinix.com
> > http://lists.affinix.com/listinfo.cgi/delta-affinix.com
> _______________________________________________
> delta mailing list
> deltalists.affinix.com
> http://lists.affinix.com/listinfo.cgi/delta-affinix.com

_______________________________________________
delta mailing list
deltalists.affinix.com
http://lists.affinix.com/listinfo.cgi/delta-affinix.com
Ending an XMPP::Client connection
user name
2006-05-04 13:49:48
And that was it!!

I can't believe that it didn't ocurred to me that earlier.
Even though I 
studied the call stack as a mad man.

Thanks again.

Regards
Hernán

Justin Karneges wrote:
> Hernan,
> 
> Welcome to Qt and signals. 
> 
> You are probably deleting an object during its own
signal.  Delaying your 
> cleanup code is the right approach.  Similarly, you
could use 
> QObject::deleteLater.
> 
> I don't think a 500ms delay is necessary, just a trip
back to the eventloop.  
> I think Psi uses queued signals (read:
Qt::QueuedConnection) for the job, but 
> I'm not sure.
> 
> -Justin
> 
> On Wednesday 03 May 2006 11:57, Chuck Zumbrun wrote:
> 
>>I've run into similar problems and I've found I
can make it go away by
>>waiting a bit before closing things down, e.g.:
>>
>>  // wait a bit before closing...
>>  QTimer::singleShot( 500, this, SLOT( doClose() )
);
>>
>>This is just a hack, I'd be interested in hearing
better ideas...
>>
>>
>>>-----Original Message-----
>>>From: delta-bounceslists.affinix.com
[mailto:delta-
>>>bounceslists.affinix.com] On Behalf Of Hernan
Tylim
>>>Sent: Wednesday, May 03, 2006 1:46 PM
>>>To: Delta Project
>>>Subject: [Delta] Ending an XMPP::Client
connection
>>>
>>>Hi
>>>
>>>For a while now I've been using XMPP::Client
without troubles. Until
>>>now, when for some reason it started to crash
after closing a
>>>connection, so I am suspecting that I am not
doing that part right.
>>>
>>>How should I finalize an ongoing connection ?
What I do is to call
>>>XMPP::Client::close() and wait for the
ClientStream's connectionClose()
>>>signal. And only then I delete the ClientStream,
TLS, TLSHandler, and
>>>Connector instances, in that order. Is that ok ?
Do I need to do
>>>something else ?
>>>
>>>Thanks in advance.
>>>
>>>Regards,
>>>Hernán
>>>
>>>
>>>_______________________________________________
>>>delta mailing list
>>>deltalists.affinix.com
>>>http://lists.affinix.com/listinfo.cgi/delta-affinix.com
>>
>>_______________________________________________
>>delta mailing list
>>deltalists.affinix.com
>>http://lists.affinix.com/listinfo.cgi/delta-affinix.com
> 
> _______________________________________________
> delta mailing list
> deltalists.affinix.com
> http://lists.affinix.com/listinfo.cgi/delta-affinix.com
> 
> 


_______________________________________________
delta mailing list
deltalists.affinix.com
http://lists.affinix.com/listinfo.cgi/delta-affinix.com
[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )