Skip to content

Conversation

@nicolasgoutaland
Copy link
Contributor

Optimized layer content generation to reduce file size.

@futuretap
Copy link

When I use your patch, I get an EXC_BAD_ACCESS in NSData+SFPackedBits.m:99:

* thread #3, queue = 'com.apple.root.default-qos', stop reason = EXC_BAD_ACCESS (code=1, address=0x132000000)
  * frame #0: 0x0000000104092fd0 MMLayershots`-[NSData(self=4500 bytes, _cmd="sfPackedBitsForRange:skip:", range=location=0, length=18446744073709551536, skip=4) sfPackedBitsForRange:skip:] at NSData+SFPackedBits.m:99:18
    frame #1: 0x000000010409c3bc MMLayershots`-[SFPSDLayer layerChannels](self=0x00000002834681e0, _cmd="layerChannels") at SFPSDLayer.m:273:34
    frame #2: 0x000000010409b4d4 MMLayershots`-[SFPSDLayer writeLayerInformationOn:](self=0x00000002834681e0, _cmd="writeLayerInformationOn:", layerInformation=1210 bytes) at SFPSDLayer.m:179:34
    frame #3: 0x0000000104098008 MMLayershots`-[SFPSDWriter writeLayerAndMaskInformationSectionOn:](self=0x0000000280a3cb00, _cmd="writeLayerAndMaskInformationSectionOn:", result=76 bytes) at SFPSDWriter.m:489:9
    frame #4: 0x0000000104097618 MMLayershots`-[SFPSDWriter createPSDDataWithError:](self=0x0000000280a3cb00, _cmd="createPSDDataWithError:", error=0x000000016d372b20) at SFPSDWriter.m:387:5
    frame #5: 0x00000001040973e4 MMLayershots`-[SFPSDWriter createPSDData](self=0x0000000280a3cb00, _cmd="createPSDData") at SFPSDWriter.m:360:12
    frame #6: 0x0000000104090390 MMLayershots`-[MMLayershots layershotForScreen:](self=0x0000000281e95140, _cmd="layershotForScreen:", screen=0x0000000106500f50) at MMLayershots.m:186:23
    frame #7: 0x000000010408f960 MMLayershots`__46-[MMLayershots createLayershotAndCallDelegate]_block_invoke_2(.block_descriptor=0x0000000281f48cc0) at MMLayershots.m:132:28
    frame #8: 0x0000000105cd18ac libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #9: 0x0000000105cd2c88 libdispatch.dylib`_dispatch_client_callout + 16
    frame #10: 0x0000000105cd5384 libdispatch.dylib`_dispatch_queue_override_invoke + 872
    frame #11: 0x0000000105ce41ec libdispatch.dylib`_dispatch_root_queue_drain + 376
    frame #12: 0x0000000105ce4b14 libdispatch.dylib`_dispatch_worker_thread2 + 156
    frame #13: 0x00000001844f4f68 libsystem_pthread.dylib`_pthread_wqthread + 212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants