Hi Jerome
I've seen your post about Wengophone2.1-status.
As you may know I've written a few times about startup-troubles on
linux. I now also sent some startup-crash-dumps (with the
crash-report... if this is working?!?) with 2.1 on windows. I don't know
exactly if the problem is the same as I've fixed now in the 2.0 version
I'm working on!
=> I had some success before in adding a sleep into the Gaim-thread
before it was starting the g_main_loop. This worked in most cases but
when startup was even slower (because of networking troubles) this
didn't help! What I've now done is the following (and now it really
workes always!):
I'm not calling GaimMainEventLoop(gpointer data) anymore in
GaimIMInit(). Instead I've added a new function to GaimIMFactory:
bool GaimIMFactory::startGaimFactory() {
g_thread_create(GaimMainEventLoop, NULL, FALSE, NULL);
return true;
}
(and I also had to put a sleep(1) into GaimMainEventLoop to be shure
that really everything is ready)
=> I'm now starting this AFTER the userlist was initialised (in the
callback to QtWengoPhone that adds the UList to the Tab). Because the
problems I had seemed to have to do with the gui: IMAccounts were logged
in before the GUI was ready to handle the events. (This is an
assumption...).
QtWengoPhone.cpp then calls readyForEvents() that is passed back through
control to model. In userProfileHandler I then have the following:
void UserProfileHandler::readyForEvents()
{
if (_readyForEvents==false)
{
IMWrapperFactory::getFactory().startGaimFactory();
}
_readyForEvents=true;
_currentUserProfile->readyForEvents();
LOG_DEBUG("Connecting enabled!");
}
What also enables the ConnectionManger to connect => it is in a loop
before in the functions that could create connections:
while (_userProfile.getReadyForEvents()==false)
{
Thread::sleep(1);
}
I know, this is not the clean solution you are searching for! I only
wanted to show you how I solved all the startup-isssues I had. And
because I was limited in time and will have to pass a functioning
version over to someone other next week I had to work with such unclean
fixes.
And this REALLY works for me. Yesterday I've tested this about 50 times
without any crashes. Even the log-off/log-in now works as expected what
also didn't work always before!
While I don't think that you want to solve it this way I wanted to write
about my experiences here, perhaps my solution gives you an idea for a
cleaner one!
Cheers, Pirmin
_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel