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

QColorSpace destructor causes random crash on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.14.2, 5.15.0 Beta3
    • GUI: Painting
    • None
    • macOS 10.14.6
    • macOS

    Description

      I keep getting random crashes on macOS like this:

       

      Crashed Thread: 5 QThread

      Exception Type: EXC_CRASH (SIGABRT)
      Exception Codes: 0x0000000000000000, 0x0000000000000000
      Exception Note: EXC_CORPSE_NOTIFY

      Application Specific Information:
      abort() called
      XXXX(54496,0x700009b02000) malloc: Incorrect checksum for freed object 0x7f8de15dac00: probably modified after being freed.
      Corrupt value: 0x0

      Thread 5 Crashed:: QThreadThread 5 Crashed:: QThread
      0   libsystem_kernel.dylib        0x00007fff7a21e2c2 __pthread_kill + 10
      1   libsystem_pthread.dylib        0x00007fff7a2d9bf1 pthread_kill + 284
      2   libsystem_c.dylib              0x00007fff7a1886a6 abort + 127
      3   libsystem_malloc.dylib        0x00007fff7a297077 malloc_vreport + 545
      4   libsystem_malloc.dylib        0x00007fff7a2afe0d malloc_zone_error + 183
      5   libsystem_malloc.dylib        0x00007fff7a2935c8 small_free_list_remove_ptr_no_clear + 1177
      6   libsystem_malloc.dylib        0x00007fff7a2927dc free_small + 853
      7   org.qt-project.QtGui          0x000000010bea7a22 QColorSpacePrivate::~QColorSpacePrivate() + 66
      8   org.qt-project.QtGui          0x000000010bea5bc3 QColorSpace::~QColorSpace() + 35
      9   org.qt-project.QtGui          0x000000010bd2235c QImageData::~QImageData() + 108
      10  org.qt-project.QtGui          0x000000010bd23e93 QImage::~QImage() + 51 
      ...

      It happened after repeated calls like this on many image files:

      QImage image(filename);

      ...some code to manipulate image pixel data directly...

      QImageWriter writer(filename);
      writer.setQuality(100);
      writer.write(image);

      It is unfortunately quite random but happens quite frequently. Both I and some of my users are getting this. Both on macOS 10.15.4 and 10.14.6. I'm wondering if anyone is aware of such issue.


      A little more information if it can be helpful:

      The crash is totally random. It may crash when loading an image file. But next time it would be fine loading the same file, but crash on another file. 

      If I remove the code that manipulate the image pixel data directly, I can't seem to make it crash anymore! I'm really baffled...

       

       

      Attachments

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

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            wtbuck Robert Wong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes