Repository: HaishinKit/HaishinKit.swift

Issue #217: [Xcode 8.3.x]Crashes during streaming
Created: 2017-04-28T11:18:52Z
App always crashes after a while at VideoIOComponent:
func effect(_ buffer:CVImageBuffer) -> CIImage {
    var image:CIImage = CIImage(cvPixelBuffer: buffer)  <<--

malloc: *** error for object 0x17409c3dc: Invalid pointer dequeued from free list

Duplicate issue #221: [XCode8.3.x]SIGABRT error on RTMPMuxer.sampleOutput
Created: 2017-05-03T10:27:52Z
Hi there... Im getting the following SIGABRT error... after a few minutes of streaming. Keep in mind... Im not attaching the camera, but rather only using the rtmpStream.appendSampleBuffer(buffer, withType: .video); function. Everything works good, but after a few minutes.. of streaming a static texture, it breaks.
TRACE:
* thread #20, queue = 'com.apple.coremedia.compressionsession.clientcallback', stop reason = signal SIGABRT
    frame #0: 0x0000000185b16014 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x0000000185bde450 libsystem_pthread.dylib`pthread_kill + 112
    frame #2: 0x0000000185a8a3e0 libsystem_c.dylib`abort + 140
    frame #3: 0x0000000185b5aa38 libsystem_malloc.dylib`nanozone_error + 332
    frame #4: 0x0000000185b5cbf0 libsystem_malloc.dylib`_nano_malloc_check_clear + 392
    frame #5: 0x0000000185b5bb3c libsystem_malloc.dylib`nano_malloc + 44
    frame #6: 0x0000000185b4a2c4 libsystem_malloc.dylib`malloc_zone_malloc + 172
    frame #7: 0x0000000185b4d218 libsystem_malloc.dylib`malloc + 32
    frame #8: 0x00000001008bc028 libswiftCore.dylib`swift_slowAlloc + 12
    frame #9: 0x00000001008bc07c libswiftCore.dylib`_swift_allocObject_ + 28
    frame #10: 0x0000000100ccd754 libswiftFoundation.dylib`Foundation.Data.init (bytes : Swift.UnsafeRawPointer, count : Swift.Int) -> Foundation.Data + 72
    frame #11: 0x00000001003c38e0 lf`RTMPMuxer.sampleOutput(sampleBuffer=0x000000015fe47520, self=0x00000001700b27e0) -> () at RTMPMuxer.swift:94
    frame #12: 0x00000001003c3b18 lf`protocol witness for VideoEncoderDelegate.sampleOutput(video : CMSampleBuffer) -> () in conformance RTMPMuxer at RTMPMuxer.swift:0
  * frame #13: 0x000000010034b314 lf`H264Encoder.(outputCallbackRefCon=(_rawValue = 0x000000017416b4c0), sourceFrameRefCon=nil, status=0, infoFlags=[.asynchronous], sampleBuffer=0x000000015fe47520).(variable initialization expression).(closure #1) at H264Encoder.swift:223
    frame #14: 0x000000010034b3b0 lf`@objc H264Encoder.(callback).(variable initialization expression).(closure #1) at H264Encoder.swift:0
    frame #15: 0x00000001897052c0 VideoToolbox`__vtcsr_dequeueAllPendingFramesAndCallbackClientForEach_block_invoke + 384
    frame #16: 0x0000000100fc525c libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #17: 0x0000000100fc521c libdispatch.dylib`_dispatch_client_callout + 16
    frame #18: 0x0000000100fd280c libdispatch.dylib`_dispatch_queue_serial_drain + 296
    frame #19: 0x0000000100fc8ce4 libdispatch.dylib`_dispatch_queue_invoke + 672
    frame #20: 0x0000000100fd4e6c libdispatch.dylib`_dispatch_root_queue_drain + 584
    frame #21: 0x0000000100fd4bb8 libdispatch.dylib`_dispatch_worker_thread3 + 140
    frame #22: 0x0000000185bda2b8 libsystem_pthread.dylib`_pthread_wqthread + 1288
    frame #23: 0x0000000185bd9da4 libsystem_pthread.dylib`start_wqthread + 4

Closing comment (2017-05-03T14:49:52Z): Close. Duplicate #217.