Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt/Android: Use QPainter in secondary thread.
kiozen last edited by
I am using Qt5.2.0 for Android. I would like to draw to a QImage in a QThread object's run() method. But every call into QPainter's drawXXX methods will block for a few seconds and the application terminates. The famous last words are:
F/libc (21070): Fatal signal 4 (SIGILL) at 0xacc04a10 (code=1), thread 21094 (CMapRMAP)
D/dalvikvm(21070): GC_FOR_ALLOC freed 111K, 10% free 3092K/3404K, paused 102ms, total 104ms
F/libc (21070): Fatal signal 11 (SIGSEGV) at 0xacc04a10 (code=2), thread 21094 (CMapRMAP)
The same code works perfectly on a PC/Linux system. Is this a known issue for Qt/Android? Or does it take some prerequisites to use QPainter in a thread? I am very well aware of the general problem not to use QPixmap as drawing context in a thread. That's why I use QImage.
Thanks for help.
agocs last edited by
There should be no platform specific limitation for painting into a QImage on another thread. Best would be to create a bug report on https://bugreports.qt-project.org