shogo4405 / HaishinKit.swift

Camera and Microphone streaming library via RTMP and SRT for iOS, macOS, tvOS and visionOS.
https://docs.haishinkit.com/swift/latest
BSD 3-Clause "New" or "Revised" License
2.78k stars 618 forks source link

Exception on AudioConverterNewSpecific #589

Closed leo150 closed 5 years ago

leo150 commented 5 years ago

Description

This is a report about #296 which can be reproduced in the sample iOS app. Exception raises on following line in AudioConverter.swift:235. However, it doesn't crash the app. Moreover, sound works as well.

status = AudioConverterNewSpecific(
     &inSourceFormat!,
     &inDestinationFormat,
     UInt32(inClassDescriptions.count),
     &inClassDescriptions,
     &_converter
)

My setup is iPhone 7+ with iOS 12.4. I only changed stream url and key to Twitch. This is a C++ exception and I receive it every time I start a stream in the app. Here is a C++ breakpoint that catches the exception:

Screen Shot 2019-09-03 at 3 43 11 PM

Stacktrace of the exception:

Screen Shot 2019-09-03 at 3 42 21 PM

To Reproduce Steps to reproduce the behavior:

  1. Setup C++ exception breakpoint
  2. Click on publics
  3. AudioConverterNewSpecific raises the exception

Smartphone (please complete the following information):

leo150 commented 5 years ago

Close, as it's not related to the crash itself

floriangbh commented 4 years ago

Hello @leo150 , I have the same crash when I setup a C++ exception breakpoint ! Did you find the root cause ? Thanks

leo150 commented 4 years ago

Is rather an exception than a crash. It looks like this is a normal behavior, as status is checked later. You can auto-enable C++ breakpoint after some other breakpoint is triggered when return _converter! is passed.