Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QApplication ownership #6

Open
alcantara09 opened this issue Jan 18, 2019 · 0 comments
Open

QApplication ownership #6

alcantara09 opened this issue Jan 18, 2019 · 0 comments
Labels

Comments

@alcantara09
Copy link
Contributor

QApplication should be a singleton and if one wants to spawn more than one instance of Vizkit3dWorld, it is not possible. Rock has the support to tag if a component uses qt (use_qt) and spawn it. In my understading, Vizkit3dWorld should not have the ownership over the QApplication and its caller should provide it.

However when using the QApplication from the component with the use_qt method, we are getting the an error complaning that the QApplication cannot be in a different thread. Currently we do not have time to fix ti. To support multilple instances of Vizkit3dWorld, we create one QApplication object and never delete it, so it is leaking.

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 Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::ScrollBarEngine(0x55c23a9defc0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::ScrollBarEngine(0x55c23a9defc0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::ScrollBarEngine(0x55c23a9defc0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::ScrollBarEngine(0x55c23a9defc0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject::startTimer: QTimer can only be used with threads started with QThread QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::ScrollBarEngine(0x55c23a9defc0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::ScrollBarEngine(0x55c23a9defc0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::ScrollBarEngine(0x55c23a9defc0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::ScrollBarEngine(0x55c23a9defc0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QPixmap: It is not safe to use pixmaps outside the GUI thread QPainter::begin: Paint device returned engine == 0, type: 2 QPainter::save: Painter not active QPainter::save: Painter not active QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::translate: Painter not active QPainter::setBrush: Painter not active QPainter::setPen: Painter not active QPainter::restore: Unbalanced save/restore QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::translate: Painter not active QPainter::setPen: Painter not active QPainter::restore: Unbalanced save/restore QPainter::end: Painter not active, aborted QPainter::begin: Paint device returned engine == 0, type: 2 QPainter::save: Painter not active QPainter::save: Painter not active QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::translate: Painter not active QPainter::setBrush: Painter not active QPainter::setPen: Painter not active QPainter::restore: Unbalanced save/restore QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::translate: Painter not active QPainter::setPen: Painter not active QPainter::restore: Unbalanced save/restore QPainter::end: Painter not active, aborted QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) 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 Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9dee50), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9dee50), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject::installEventFilter(): Cannot filter events for objects in a different thread. 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 Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) 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 Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::HeaderViewEngine(0x55c23a8cf270), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) 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 Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject: Cannot create children for a parent that is in a different thread. (Parent is Breeze::WidgetStateEngine(0x55c23a9afbd0), parent's thread is QThread(0x55c23a7f9450), current thread is QThread(0x7ff69000f5c0) QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QPixmap: It is not safe to use pixmaps outside the GUI thread QPainter::begin: Paint device returned engine == 0, type: 2 QPainter::translate: Painter not active QPainter::save: Painter not active QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::setPen: Painter not active QPainter::setBrush: Painter not active QPainter::setPen: Painter not active QPainter::setBrush: Painter not active QPainter::setBrush: Painter not active QPainter::setPen: Painter not active QPainter::drawRects: Painter not active QPainter::restore: Unbalanced save/restore QPixmap: It is not safe to use pixmaps outside the GUI thread QPainter::begin: Paint device returned engine == 0, type: 2 QPainter::translate: Painter not active QPainter::save: Painter not active QPainter::setRenderHint: Painter must be active to set rendering hints QPainter::setPen: Painter not active QPainter::setBrush: Painter not active QPainter::setPen: Painter not active QPainter::setBrush: Painter not active QPainter::restore: Unbalanced save/restore 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread 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::startTimer: QTimer can only be used with threads started with QThread QObject::startTimer: QTimer can only be used with threads started with QThread [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. orogen_default_imaging_sonar_simulation__ScanningSonarTask: ../../src/xcb_io.c:165: dequeue_pending_request: Assertion !xcb_xlib_unknown_req_in_deq' failed.
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant