Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67727

Qt crashes when loading image file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.8.0
    • None
    • Mac OSX 10.9.5

    Description

      I'm getting crash in my Mac OSX very often when I try to work with multiple images. I'm trying to generate thumbnails for images with the following piece of code. 

      // code placeholder
      path=eventDict['path']
      image=QPixmap(path)
      if not image.isNull():
          transformation=Qt.SmoothTransformation
          if fileInfo.size()>3145728:# 3 MB
              transformation = Qt.FastTransformation
              if image.width()>320 and image.height()>320:
                  result = image.scaled(320, 320).scaled(32, 32, Qt.IgnoreAspectRatio, transformation)
              else:
                  result=image
      result.save(thumbnailPath,"png")
      

      The crash logs from Mac is 

      // code placeholder
      OS Version: Mac OS X 10.9.5 (13F34)
      Report Version: 11
      Anonymous UUID: 1FB1182A-75DC-96B2-2899-83A7CA5FAE02
      
      Sleep/Wake UUID: 81BAF6DD-75B2-4F52-AEC1-0C31A8385BA1
      
      Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
      
      Exception Type: EXC_BAD_ACCESS (SIGSEGV)
      Exception Codes: KERN_INVALID_ADDRESS at 0x000000032804bde4
      
      VM Regions Near 0x32804bde4:
      CG shared images 00000001c871f000-00000001c8727000 [ 32K] r--/r-- SM=SHM 
      --> 
      __TEXT 0000123400000000-000012340047c000 [ 4592K] r-x/rwx SM=COW /System/Library/Extensions/AppleIntelHD4000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD4000GraphicsGLDriver
      
      Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
      0 libsystem_kernel.dylib 0x00007fff8f885292 __kill + 10
      1 libsystem_platform.dylib 0x00007fff8c8d05aa _sigtramp + 26
      2 QtGui 0x000000010582369e qt_blend_argb32_on_argb32_ssse3(unsigned char*, int, unsigned char const*, int, int, int, int) + 350
      3 QtGui 0x0000000105715f07 QRasterPaintEnginePrivate::drawImage(QPointF const&, QImage const&, void (*)(unsigned char*, int, unsigned char const*, int, int, int, int), QRect const&, int, QRect const&) + 503
      4 QtGui 0x000000010571fb26 QRasterPaintEngine::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) + 7750
      5 QtGui 0x000000010573562f QPainter::drawPixmap(QRectF const&, QPixmap const&, QRectF const&) + 1039
      6 QtWidgets 0x0000000105fcb693 QCommonStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const + 18019
      7 QtWidgets 0x00000001063051e3 QMacStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const + 18339
      8 QtWidgets 0x0000000105fc7521 QCommonStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const + 1265
      9 QtWidgets 0x0000000106300c6d QMacStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const + 557
      10 QtWidgets 0x0000000105ff7f8a QStyleSheetStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const + 19114
      11 QtWidgets 0x00000001060da365 QPushButton::paintEvent(QPaintEvent*) + 117
      12 QtWidgets.so 0x0000000105afe8d0 sipQPushButton::paintEvent(QPaintEvent*) + 128
      13 QtWidgets 0x0000000105f8b28a QWidget::event(QEvent*) + 2154
      14 QtWidgets 0x000000010603a9ff QAbstractButton::event(QEvent*) + 175
      15 QtWidgets.so 0x0000000105aff77f sipQPushButton::event(QEvent*) + 191
      16 QtWidgets 0x0000000105f4a58d QApplicationPrivate::notify_helper(QObject*, QEvent*) + 269
      17 QtWidgets 0x0000000105f4ced2 QApplication::notify(QObject*, QEvent*) + 5906
      18 QtWidgets.so 0x0000000105b1c2b7 sipQApplication::notify(QObject*, QEvent*) + 231
      19 QtCore 0x0000000103c8c544 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
      20 QtWidgets 0x0000000105f84acb QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 3467
      21 QtWidgets 0x0000000105f852f8 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1192
      22 QtWidgets 0x0000000105f84d70 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 4144
      23 QtWidgets 0x0000000105f852f8 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1192
      24 QtWidgets 0x0000000105f85186 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 822
      25 QtWidgets 0x0000000105f85186 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 822
      26 QtWidgets 0x0000000105f84d70 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 4144
      27 QtWidgets 0x0000000105f852f8 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1192
      28 QtWidgets 0x0000000105f84d70 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 4144
      29 QtWidgets 0x0000000105f852f8 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1192
      30 QtWidgets 0x0000000105f84d70 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 4144
      31 QtWidgets 0x0000000105f852f8 QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 1192
      32 QtWidgets 0x0000000105f84d70 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) + 4144
      33 QtWidgets 0x0000000105f57d9e QWidgetBackingStore::doSync() + 4830
      34 QtWidgets 0x0000000105f8b4bc QWidget::event(QEvent*) + 2716
      35 QtWidgets.so 0x0000000105b0ac8f sipQDialog::event(QEvent*) + 191
      36 QtWidgets 0x0000000105f4a58d QApplicationPrivate::notify_helper(QObject*, QEvent*) + 269
      37 QtWidgets 0x0000000105f4ced2 QApplication::notify(QObject*, QEvent*) + 5906
      38 QtWidgets.so 0x0000000105b1c2b7 sipQApplication::notify(QObject*, QEvent*) + 231
      39 QtCore 0x0000000103c8c544 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 164
      40 QtCore 0x0000000103c8d1c8 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 600
      41 libqcocoa.dylib 0x000000011179ff5e QCocoaEventDispatcherPrivate::processPostedEvents() + 190
      42 libqcocoa.dylib 0x00000001117a0821 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 33
      43 com.apple.CoreFoundation 0x00007fff901385b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      44 com.apple.CoreFoundation 0x00007fff90129c62 __CFRunLoopDoSources0 + 242
      45 com.apple.CoreFoundation 0x00007fff901293ef __CFRunLoopRun + 831
      46 com.apple.CoreFoundation 0x00007fff90128e75 CFRunLoopRunSpecific + 309
      47 com.apple.HIToolbox 0x00007fff9356ea0d RunCurrentEventLoopInMode + 226
      48 com.apple.HIToolbox 0x00007fff9356e7b7 ReceiveNextEventCommon + 479
      49 com.apple.HIToolbox 0x00007fff9356e5bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
      50 com.apple.AppKit 0x00007fff8b69224e _DPSNextEvent + 1434
      51 com.apple.AppKit 0x00007fff8b69189b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
      52 com.apple.AppKit 0x00007fff8b68599c -[NSApplication run] + 553
      53 libqcocoa.dylib 0x000000011179f6bf QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2143
      54 QtCore 0x0000000103c88781 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 401
      55 QtCore 0x0000000103c8cbb5 QCoreApplication::exec() + 341
      56 QtWidgets.so 0x0000000105c0a962 meth_QApplication_exec(_object*, _object*) + 82
      57 org.python.python 0x000000010006a7b8 _PyCFunction_FastCallDict + 552
      58 org.python.python 0x00000001000f4164 call_function + 612
      59 org.python.python 0x00000001000f5b74 _PyEval_EvalFrameDefault + 5604
      60 org.python.python 0x00000001000f3eae fast_function + 606
      61 org.python.python 0x00000001000f414b call_function + 587
      62 org.python.python 0x00000001000f5b74 _PyEval_EvalFrameDefault + 5604
      63 org.python.python 0x00000001000f3500 _PyEval_EvalCodeWithName + 2720
      64 org.python.python 0x00000001000f3d2b fast_function + 219
      65 org.python.python 0x00000001000f414b call_function + 587
      66 org.python.python 0x00000001000f5b74 _PyEval_EvalFrameDefault + 5604
      67 org.python.python 0x00000001000f3500 _PyEval_EvalCodeWithName + 2720
      68 org.python.python 0x00000001000f36a4 PyEval_EvalCode + 100
      69 org.python.python 0x000000010013000e PyRun_FileExFlags + 206
      70 org.python.python 0x00000001001302af PyRun_SimpleFileExFlags + 447
      71 org.python.python 0x0000000100149b3a Py_Main + 3914
      72 org.python.python 0x0000000100000dfe 0x100000000 + 3582
      73 org.python.python 0x0000000100000c34 0x100000000 + 3124
      

      Please let me know if any possible solutions exist

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            rtfa Goku Balu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes