osy / HaC-Mini

Intel NUC Hades Canyon Hackintosh support
MIT License
1.22k stars 160 forks source link

Hardware JPEG decoding not working #17

Closed osy closed 5 years ago

osy commented 5 years ago

Preview freezes when opening .jpeg files. Spindump output:

Process:         Preview [1226]
UUID:            9BDA0774-432D-30FB-91EA-C7A1A8966169
Path:            /Applications/Preview.app/Contents/MacOS/Preview
Architecture:    x86_64
Parent:          launchd [1]
UID:             501
Footprint:       180.06 MB
Start time:      2019-07-20 16:05:43 -0700
End time:        2019-07-20 16:05:53 -0700
Num samples:     1000 (1-1000)
Note:            Unresponsive for 50 seconds before sampling
Note:            1 idle work queue thread omitted

  Thread 0x13bd8            DispatchQueue 1           1000 samples (1-1000)     priority 47 (base 47)
  1000  start + 1 (libdyld.dylib + 91093) [0x7fff7e11c3d5]
    1000  NSApplicationMain + 777 (AppKit + 11644) [0x7fff4f85bd7c]
      1000  -[NSApplication run] + 699 (AppKit + 79932) [0x7fff4f86c83c]
        1000  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361 (AppKit + 104223) [0x7fff4f87271f]
          1000  _DPSNextEvent + 965 (AppKit + 108935) [0x7fff4f873987]
            1000  _BlockUntilNextEventMatchingListInModeWithFilter + 64 (HIToolbox + 42038) [0x7fff514d9436]
              1000  ReceiveNextEventCommon + 603 (HIToolbox + 42661) [0x7fff514d96a5]
                1000  RunCurrentEventLoopInMode + 292 (HIToolbox + 43371) [0x7fff514d996b]
                  1000  CFRunLoopRunSpecific + 455 (CoreFoundation + 239806) [0x7fff521ed8be]
                    1000  __CFRunLoopRun + 2289 (CoreFoundation + 242689) [0x7fff521ee401]
                      1000  __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 (CoreFoundation + 244951) [0x7fff521eecd7]
                        1000  _dispatch_main_queue_callback_4CF + 1135 (libdispatch.dylib + 59021) [0x7fff7e0da68d]
                          1000  _dispatch_client_callout + 8 (libdispatch.dylib + 13885) [0x7fff7e0cf63d]
                            1000  _dispatch_call_block_and_release + 12 (libdispatch.dylib + 9720) [0x7fff7e0ce5f8]
                              1000  ??? (Preview + 1027696) [0x101833e70]
                                1000  ??? (Preview + 49584) [0x1017451b0]
                                  1000  ??? (Preview + 53818) [0x10174623a]
                                    1000  -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131 (Foundation + 730946) [0x7fff544e7742]
                                      1000  -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 1119 (Foundation + 699672) [0x7fff544dfd18]
                                        1000  ??? (Preview + 54049) [0x101746321]
                                          1000  -[NSWindowController showWindow:] + 36 (AppKit + 2708351) [0x7fff4faee37f]
                                            1000  ??? (Preview + 48166) [0x101744c26]
                                              1000  -[NSWindowController window] + 110 (AppKit + 1028440) [0x7fff4f954158]
                                                1000  -[NSWindowController _windowDidLoad] + 542 (AppKit + 1689086) [0x7fff4f9f55fe]
                                                  1000  ??? (Preview + 55777) [0x1017469e1]
                                                    1000  ??? (Preview + 57204) [0x101746f74]
                                                      1000  ??? (Preview + 102859) [0x1017521cb]
                                                        1000  ??? (Preview + 128063) [0x10175843f]
                                                          1000  ??? (Preview + 129560) [0x101758a18]
                                                            1000  -[IKImageContentView setImageURL:imageAtIndex:withDisplayProperties:] + 160 (ImageKit + 13628) [0x7fff5c31f53c]
                                                              1000  -[IKImageContentView _setImageFromImageSource:imageAtIndex:withDisplayProperties:] + 716 (ImageKit + 957886) [0x7fff5c405dbe]
                                                                1000  __82-[IKImageContentView _setImageFromImageSource:imageAtIndex:withDisplayProperties:]_block_invoke + 64 (ImageKit + 958122) [0x7fff5c405eaa]
                                                                  1000  -[IKImageContentView _newScaledImageFromSource:index:imageScale:canUseExistingThumbnail:displayProperties:] + 483 (ImageKit + 955645) [0x7fff5c4054fd]
                                                                    1000  CGImageSourceCreateThumbnailAtIndex + 357 (ImageIO + 414495) [0x7fff54c4531f]
                                                                      1000  IIOImageSource::createThumbnailAtIndex(unsigned long, IIODictionary*) + 3181 (ImageIO + 458255) [0x7fff54c4fe0f]
                                                                        1000  CGImageCreateCopyWithParametersNew(CGImage*, CGColor*, CGAffineTransform, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, CGColorSpace*, unsigned int, bool, int, int, bool) + 2150 (ImageIO + 404502) [0x7fff54c42c16]
                                                                          1000  CGContextDrawImage + 51 (CoreGraphics + 210911) [0x7fff5262c7df]
                                                                            1000  CGContextDrawImageWithOptions + 432 (CoreGraphics + 211364) [0x7fff5262c9a4]
                                                                              1000  CGContextDelegateDrawImage + 41 (CoreGraphics + 213446) [0x7fff5262d1c6]
                                                                                1000  ripc_DrawImage + 704 (CoreGraphics + 214165) [0x7fff5262d495]
                                                                                  1000  ripc_AcquireRIPImageData + 293 (CoreGraphics + 217440) [0x7fff5262e160]
                                                                                    1000  RIPImageCacheGetRetained + 661 (CoreGraphics + 218680) [0x7fff5262e638]
                                                                                      1000  RIPImageDataInitializeShared + 207 (CoreGraphics + 219814) [0x7fff5262eaa6]
                                                                                        1000  CGSImageDataLock + 1258 (CoreGraphics + 221198) [0x7fff5262f00e]
                                                                                          1000  img_data_lock + 2857 (CoreGraphics + 240101) [0x7fff526339e5]
                                                                                            1000  CGAccessSessionCreate + 98 (CoreGraphics + 248310) [0x7fff526359f6]
                                                                                              1000  CGDataProviderRetainData + 69 (CoreGraphics + 248636) [0x7fff52635b3c]
                                                                                                1000  provider_for_destination_retain_data + 17 (CoreGraphics + 248671) [0x7fff52635b5f]
                                                                                                  1000  CGDataProviderRetainData + 69 (CoreGraphics + 248636) [0x7fff52635b3c]
                                                                                                    1000  imageProvider_retain_data + 77 (CoreGraphics + 248764) [0x7fff52635bbc]
                                                                                                      1000  CGImageProviderCopyImageBlockSetWithOptions + 141 (CoreGraphics + 248980) [0x7fff52635c94]
                                                                                                        1000  IIOImageProviderInfo::CopyImageBlockSetWithOptions(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 654 (ImageIO + 97756) [0x7fff54bf7ddc]
                                                                                                          1000  IIOImageProviderInfo::copyImageBlockSetWithOptions(CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 499 (ImageIO + 98355) [0x7fff54bf8033]
                                                                                                            1000  IIO_Reader::CopyImageBlockSetProc(void*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 100 (ImageIO + 98716) [0x7fff54bf819c]
                                                                                                              1000  AppleJPEGReadPlugin::copyImageBlockSet(InfoRec*, CGImageProvider*, CGRect, CGSize, __CFDictionary const*) + 1802 (ImageIO + 103246) [0x7fff54bf934e]
                                                                                                                1000  AppleJPEGReadPlugin::createImageBlockSetWithHardwareDecode(InfoRec*, CGImageProvider*, CGSize, bool*) + 85 (ImageIO + 912547) [0x7fff54cbeca3]
                                                                                                                  1000  AppleJPEGReadPlugin::createImageBlockSetWithHardware_intel(InfoRec*, CGImageProvider*, __CFData const*, CGSize, bool*) + 337 (ImageIO + 520753) [0x7fff54c5f231]
                                                                                                                    1000  AppleJPEGReadPlugin::createIOSurfaceWithHardware_intel(CGImageProvider*, __CFData const*, unsigned int, VPA_HWJPEGDecodeSession*, __IOSurface**) + 74 (ImageIO + 517308) [0x7fff54c5e4bc]
                                                                                                                      1000  AppleJPEGReadPlugin::acquireSession() + 24 (ImageIO + 515904) [0x7fff54c5df40]
                                                                                                                        1000  _pthread_mutex_firstfit_lock_slow + 222 (libsystem_pthread.dylib + 5325) [0x7fff7e30e4cd]
                                                                                                                          1000  __psynch_mutexwait + 10 (libsystem_kernel.dylib + 16134) [0x7fff7e253f06]
                                                                                                                           *1000  psynch_mtxcontinue + 0 (pthread + 10172) [0xffffff7f82d6c7bc] (blocked by pthread mutex owned by this thread)
osy commented 5 years ago

Users report that enabling IGPU mitigates issue.