Уведомления

Группа в Telegram: @pythonsu

#1 Март 23, 2012 07:25:19

spirits25
От:
Зарегистрирован: 2011-09-29
Сообщения: 18
Репутация: +  0  -
Профиль   Отправить e-mail  

Разваливается многопоточный клиент

При обращении к отключившемуся серверу клиент падает, выдавая в консоль:

QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2b70370), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2b76250), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2b76250), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2b70370), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2b70370), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::LabelEngine(0x2b77b20), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2b70370), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2b70370), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::LabelEngine(0x2b77b20), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2b70370), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is Oxygen::WidgetStateEngine(0x2b70370), parent's thread is QThread(0x1b6c7f0), current thread is QThread(0x302f600)
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python2: /var/calculate/tmp/portage/x11-libs/libX11-1.4.4/work/libX11-1.4.4/src/xcb_io.c:178: dequeue_pending_request: Проверочное утверждение «!xcb_xlib_unknown_req_in_deq» не выполнено.
Аварийный останов
Как я понял мне нужно запустить XInitThreads перед вызовом потока??
Где-то нашёл такой код:
from miro.platform import xlibhelper
if xlibhelper.XInitThreads() == 0:
print "WARNING: XInitThreads() failed!"
но неужели для этого нужно ставить media-video/miro? Что-то я не понимаю, подскажите.



Офлайн

Board footer

Модераторировать

Powered by DjangoBB

Lo-Fi Version