Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initializing HMSSDK with hmsTrackSetting causes crash on IOS. #929

Closed
joshmossas opened this issue Nov 15, 2022 · 7 comments
Closed

Initializing HMSSDK with hmsTrackSetting causes crash on IOS. #929

joshmossas opened this issue Nov 15, 2022 · 7 comments

Comments

@joshmossas
Copy link

joshmossas commented Nov 15, 2022

Happens in the IOS emulator and running on a 9th generation iPad (running iPadOS 15.7.1) when running in debug or profile mode. No crash occurs on android. I have not tested in release mode yet.

hmssdk_flutter version
^0.7.8

HMS Dependencies in Podfile.lock

- HMSBroadcastExtensionSDK (0.0.4)
  - HMSSDK (0.4.6):
    - HMSWebRTC (= 1.0.4898)
  - hmssdk_flutter (0.7.8):
    - Flutter
    - HMSBroadcastExtensionSDK (= 0.0.4)
    - HMSSDK (= 0.4.6)
  - HMSWebRTC (1.0.4898)

Flutter Doctor

[✓] Flutter (Channel stable, 3.3.8, on macOS 13.0.1 22A400
    darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android
    SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.73.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

Log Output

Launching lib/main.dart on Joshua’s iPad in profile mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: C89V55G77L
Xcode build done.                                           560.2s
(lldb) 2022-11-15 16:11:52.650677-0600 Runner[20531:1489098] 10.1.0 - [FirebaseCore][I-COR000005] No app has been configured yet.
Connecting to VM Service at ws://127.0.0.1:49504/FLOiVmG5CyQ=/ws
[CoreBluetooth] XPC connection invalid
[connection] nw_socket_handle_socket_event [C3.1:1] Socket SO_ERROR [54: Connection reset by peer]
[CoreBluetooth] XPC connection invalid
Unsupported value: <HMSSimulcastLayerSettings: 0x280b5bf00> of type HMSSimulcastLayerSettings
*** Assertion failure in -[FlutterStandardWriter writeValue:], FlutterStandardCodec.mm:338
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unsupported value for standard codec'
*** First throw call stack:
(0x180b0a288 0x19983e744 0x18239b340 0x106be7684 0x106be7874 0x106be7874 0x106be7dfc 0x106be4e74 0x102aa71ac 0x102aa9a58 0x102a96ac0 0x106be4ddc 0x1066bf44c 0x18076fe6c 0x180771a30 0x18077ff48 0x18077fb98 0x180ac2800 0x180a7c704 0x180a8fbc8 0x19cbff374 0x183405b58 0x183187098 0x102050078 0x102499da4)
libc++abi: terminating with uncaught exception of type NSException
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001b797db38 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
->  0x1b797db38 <+8>:  b.lo   0x1b797db58               ; <+40>
    0x1b797db3c <+12>: pacibsp
    0x1b797db40 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1b797db44 <+20>: mov    x29, sp
Target 0: (Runner) stopped.
Lost connection to device.
Exited
@joshmossas
Copy link
Author

joshmossas commented Nov 15, 2022

Playing around with it more it looks like the following line is causing the issue:

hmssdk = HMSSDK(
  hmsTrackSettings: trackSettings, // this line causes the crash
  hmsLogSettings: logSettings
)

after commenting out that line the crash no longer occurs. So this is an issue with creating the HMSSDK with the hmsTrackSetting on IOS.

@joshmossas joshmossas changed the title Crash on IOS when attempting to join room. Initializing HMSSDK with hmsTrackSetting causes crash on IOS. Nov 15, 2022
@govindmaheshwari2
Copy link
Contributor

Hey, @joshmossas are you using the example app?

@joshmossas
Copy link
Author

No this is happening in our own app. Although we have been referencing the example apps.

@joshmossas
Copy link
Author

In the example app HMSAudioTrackSettings is being initialized with audio source set to a value and HMSVideoTrackSettings is being initialized with forceSoftwareDecoder having a value set as well. In our app we have not defined these values as the dart interface says they can be null. So maybe this bug occurs when one of those values isn't set.

I will check when I get the chance and report back my findings.

@ygit
Copy link
Member

ygit commented Dec 14, 2022

hey @joshmossas
Hope you were able to resolve the issue. Closing this now.

@ygit ygit closed this as completed Dec 14, 2022
@joshmossas
Copy link
Author

@ygit
The fix for this was in https://github.com/100mslive/100ms-flutter/tree/fixedDefaultSimulcastSettings

Has this been added to the latest release?

@ygit
Copy link
Member

ygit commented Dec 15, 2022

Yes @joshmossas
It is already available in the latest release

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

No branches or pull requests

3 participants