libpurple API called from different threads
|Reported by:||cavedon||Owned by:||vadim|
libpurple is not thread safe add all API must be called from the *same* thread:
In the current implementation, libpurple is initialized in
PurpleIMFactory::PurpleIMInit(), but all other operations are handled by a glib event loop PurpleMainEventLoop?() running in a seperate thread created by PurpleIMFactory::PurpleIMFactory
For this reason, libpurple might crash in very weird ways (as I actually found trying to use an external libpurple compiled against nss).
I think the easiest way should be handling initialization and every call to libpurple de-initialization of liburple inside that glib loop (which is created before initializing libpurple).
The alternative, more efficient, would be to get rid of the glib event loop and sue WengoPhone::runEvents() even loop also for libpurple. I do not know how hard it is tough, as it should also handle event on sockets.
Change History (20)
comment:2 Changed 3 years ago by chris-mac
- Milestone changed from QuteCom 2.3 to QuteCom 2.2-RC4
- Version changed from 2.2-RC3 to 2.2
comment:4 Changed 3 years ago by cavedon
- field_os set to all
- Resolution fixed deleted
- Status changed from closed to reopened