2015-09-27 76 views
0

我從Google play獲得此報告。我正在開發使用Qt的應用程序。 那麼任何人都會介意給我一些建議嗎?Android-與線程相關的崩潰

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 
Build fingerprint: 'samsung/klteduosxx/klte:5.0/LRX21T/G900FDXXU1BOD1:user/release-keys' 
Revision: '14' 
ABI: 'arm' 
pid: 9031, tid: 16456, name: QtThread >>> org.qtproject.myapplication <<< 
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x9a500000 
    r0 9a4fff00 r1 00000100 r2 00000000 r3 00000120 
    r4 9a4ffffc r5 00000000 r6 00000000 r7 aeee1340 
    r8 9a4a4220 r9 00000124 sl 00000000 fp 00000000 
    ip aeee0e40 sp 9c829280 lr 9c3d7965 pc 9c3d68c6 cpsr 800b0030 

backtrace: 
    #00 pc 001d28c6 /data/app/org.qtproject.myapplication-1/lib/arm/libQt5Gui.so 
    #01 pc 001d3961 /data/app/org.qtproject.myapplication-1/lib/arm/libQt5Gui.so 
    #02 pc 000cd671 /data/app/org.qtproject.myapplication-1/lib/arm/libQt5Gui.so (QImage::smoothScaled(int, int) const+88) 
    #03 pc 000cd897 /data/app/org.qtproject.myapplication-1/lib/arm/libQt5Gui.so (QImage::transformed(QTransform const&, Qt::TransformationMode) const+326) 
    #04 pc 000e442d /data/app/org.qtproject.myapplication-1/lib/arm/libQt5Gui.so (QPlatformPixmap::transformed(QTransform const&, Qt::TransformationMode) const+28) 
    #05 pc 000dfa21 /data/app/org.qtproject.myapplication-1/lib/arm/libQt5Gui.so (QPixmap::transformed(QTransform const&, Qt::TransformationMode) const+52) 
    #06 pc 000dfae5 /data/app/org.qtproject.myapplication-1/lib/arm/libQt5Gui.so (QPixmap::scaled(QSize const&, Qt::AspectRatioMode, Qt::TransformationMode) const+188) 
    #07 pc 000f8c1f /data/app/org.qtproject.myapplication-1/lib/arm/libNavaMessenger.so (CGlobalZone::loadSmileyImages(int)+118) 
    #08 pc 0009f1ff /data/app/org.qtproject.myapplication-1/lib/arm/libNavaMessenger.so (main+3814) 
    #09 pc 00019989 /data/data/org.qtproject.myapplication/qt-reserved-files/plugins/platforms/android/libqtforandroid.so 
    #10 pc 000137bb /system/lib/libc.so (__pthread_start(void*)+30) 
    #11 pc 0001189b /system/lib/libc.so (__start_thread+6) 

回答

0

這似乎是你嘗試在非gui線程中繪製到QPixmap中。但是:

因爲QImage是一個QPaintDevice子類,QPainter可以用來直接繪製圖像。在QImage上使用QPainter時,可以在當前GUI線程之外的另一個線程中執行繪製。

here

因此,使用的QImage來代替。