App Crashed when clicked Chat button

Description

We updated our app MobileRTC SDK from 5.2 to 5.12.2 ( because of the minimum version policy )

After the update, the chat feature does not work and gives an error when clicked.

We also tried different SDK versions, ( 5.9, 5.11, 5.12) same problem.

Error Is : *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘data parameter is nil’

Screenshots

Which iOS Meeting SDK version?

v5.12.2.4959 ( LATEST )
v5.12.0.4903
v5.11.10.4556
v5.9.0.2170

We tried 4 different version. It was worked v5.2.42037

Build Environment : XCode 13.2.1 , macOS Big Sur

To Reproduce(If applicable)

Clicking on the Chat feature via three dots after joining the conversation

Note: It also crashes when emoji icons are clicked .

Screen Record : RPReplay_Final1666423889

Smartphone (please complete the following information):

We tried with differend devices and different iOS versions.

iPad Air 2 - iOS 13.1
iPhone 7 - iOS 15.6
iPhone 12 - iOS 15.6

Hi @utku.erturk ,
Did you build you app with embed ‘ MobileRTCResources.bundle’?
If the crash still exist after you include the bundle file, please send us the crash log.
With type “bt all; image list” in the lldb console when the crash issued again. And copy the output text to us.
Thanks

Hi @jackie.chen ,

Sorry for late response. I didn’t see the notificaion email.

When I type bt all; image list it gives error.

(lldb) bt all;image list
error: bt [ | all]

You can find the logs below with bt command

*** First throw call stack:
(0x19b68298c 0x19b3ab0a4 0x19b97932c 0x108048238 0x108047bc8 0x1080473e4 0x108047178 0x1082ce054 0x107ee40d0 0x107ee3fc0 0x107ee7894 0x107f04fa0 0x107f0953c 0x19f07e07c 0x19f082b8c 0x19f082f94 0x19f000cac 0x19efaa110 0x19efa638c 0x19f698b98 0x19f6887c0 0x19f6b8594 0x19b5ffc48 0x19b5fab34 0x19b5fb100 0x19b5fa8bc 0x1a5465328 0x19f68f6d4 0x1009a4de0 0x19b485460)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
terminating with uncaught exception of type NSException
(lldb) bt
  * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x000000019b47aebc libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x000000019b396790 libsystem_pthread.dylib`pthread_kill$VARIANT$mp + 112
    frame #2: 0x000000019b2ea824 libsystem_c.dylib`abort + 100
    frame #3: 0x000000019b4437d4 libc++abi.dylib`abort_message + 128
    frame #4: 0x000000019b4439c4 libc++abi.dylib`demangling_terminate_handler() + 296
    frame #5: 0x000000019b3ab358 libobjc.A.dylib`_objc_terminate() + 124
    frame #6: 0x000000019b450304 libc++abi.dylib`std::__terminate(void (*)()) + 16
    frame #7: 0x000000019b44fed8 libc++abi.dylib`__cxa_rethrow + 144
    frame #8: 0x000000019b3ab258 libobjc.A.dylib`objc_exception_rethrow + 40
    frame #9: 0x000000019b5fa92c CoreFoundation`CFRunLoopRunSpecific + 576
    frame #10: 0x00000001a5465328 GraphicsServices`GSEventRunModal + 104
    frame #11: 0x000000019f68f6d4 UIKitCore`UIApplicationMain + 1936
  * frame #12: 0x00000001009a4de0 DoctorFollow`main at AppDelegate.swift:20:7
    frame #13: 0x000000019b485460 libdyld.dylib`start + 4

Screen Shot : Screen-Shot-2022-11-01-at-12-11-43 — ImgBB

If you need a different log, I can share it quickly.

Thanks,
Utku

Hi @utku.erturk ,
It seems crash in your app’s code, which in the ‘DoctorFollow’.
Please check it first,
thanks.

(post deleted by author)

Hi, @jackie.chen

When I debug the app, I discovered another log. This log printed when I clicked the … button.

2022-11-01 15:55:46.352374+0300 DoctorFollow[45195:1783818] [general] *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x1f610ed38) [/System/Library/Frameworks/Foundation.framework]' for key 'value', even though it was not explicitly included in the client allowed classes set: '{(
    "'NSSet' (0x1f6103c60) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'ZMRecentEmojiMeta' (0x1108467a0) [/var/containers/Bundle/Application/EEBC5B09-003E-4A6E-84F2-A1BDB4856D63/DoctorFollow.app/Frameworks/MobileRTC.framework]",
    "'NSString' (0x1f610e4f0) [/System/Library/Frameworks/Foundation.framework]",
    "'NSMutableIndexSet' (0x1f610c538) [/System/Library/Frameworks/Foundation.framework]",
    "'NSDate' (0x1f61036e8) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'NSArray' (0x1f6103670) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'NSMutableSet' (0x1f6102770) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'NSMutableArray' (0x1f6103bc0) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'NSURL' (0x1f6104200) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'NSIndexSet' (0x1f610c448) [/System/Library/Frameworks/Foundation.framework]",
    "'NSMutableString' (0x1f610d6b8) [/System/Library/Frameworks/Foundation.framework]",
    "'NSMutableDictionary' (0x1f6103508) [/System/Library/Frameworks/CoreFoundation.framework]",
    "'NSDictionary' (0x1f6103850) [/System/Library/Frameworks/CoreFoundation.framework]"
)}'. This will be disallowed in the future.
data parameter is nil
(null)

As you can see there is a ZMRecentEmojiMeta on the list.

And the logs says MobileRTC`___lldb_unnamed_symbol

Could the error be related to emojis? The application receives an error in 3 cases.

Screen : Imgur: The magic of the Internet

1- Click chat button
2- Click one of chat emojis on this screen
3- Click the … button near the emojis


(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = hit Objective-C exception
    frame #0: 0x0000000198177eac libobjc.A.dylib`objc_exception_throw
    frame #1: 0x0000000182029c3c Foundation`+[NSJSONSerialization JSONObjectWithData:options:error:] + 188
    frame #2: 0x000000010d818238 MobileRTC`___lldb_unnamed_symbol16887 + 172
    frame #3: 0x000000010d817bc8 MobileRTC`___lldb_unnamed_symbol16882 + 36
    frame #4: 0x000000010d8173e4 MobileRTC`___lldb_unnamed_symbol16875 + 508
    frame #5: 0x000000010d817178 MobileRTC`___lldb_unnamed_symbol16873 + 76
    frame #6: 0x000000010da9e010 MobileRTC`___lldb_unnamed_symbol30880 + 52
    frame #7: 0x000000010da9df84 MobileRTC`___lldb_unnamed_symbol30879 + 68
    frame #8: 0x000000010d9e7948 MobileRTC`___lldb_unnamed_symbol26575 + 344
    frame #9: 0x000000010d8abe70 MobileRTC`___lldb_unnamed_symbol19803 + 532
    frame #10: 0x00000001808ee2e8 CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
    frame #11: 0x00000001809838e4 CoreFoundation`___CFXRegistrationPost_block_invoke + 48
    frame #12: 0x0000000180958c04 CoreFoundation`_CFXRegistrationPost + 416
    frame #13: 0x0000000180903070 CoreFoundation`_CFXNotificationPost + 708
    frame #14: 0x000000010e116068 MobileRTC`___lldb_unnamed_symbol55691 + 60
    frame #15: 0x000000010f7d6b68 MobileRTC`___lldb_unnamed_symbol142710 + 476
    frame #16: 0x000000010f6cee00 MobileRTC`___lldb_unnamed_symbol137955 + 732
    frame #17: 0x000000010f6ce098 MobileRTC`___lldb_unnamed_symbol137949 + 560
    frame #18: 0x000000010f7d5a60 MobileRTC`___lldb_unnamed_symbol142688 + 188
    frame #19: 0x000000010d7a7e38 MobileRTC`___lldb_unnamed_symbol14136 + 116
    frame #20: 0x000000010d8c035c MobileRTC`___lldb_unnamed_symbol20123 + 2036
    frame #21: 0x000000010d7c42b4 MobileRTC`___lldb_unnamed_symbol14847 + 136
    frame #22: 0x0000000183096754 UIKitCore`-[UIApplication sendAction:to:from:forEvent:] + 96
    frame #23: 0x00000001831b587c UIKitCore`-[UIControl sendAction:to:forEvent:] + 124
    frame #24: 0x0000000182f4b9f8 UIKitCore`-[UIControl _sendActionsForEvents:withEvent:] + 352
    frame #25: 0x0000000182fe2998 UIKitCore`-[UIButton _sendActionsForEvents:withEvent:] + 156
    frame #26: 0x000000018325a4cc UIKitCore`-[UIControl touchesEnded:withEvent:] + 516
    frame #27: 0x0000000182d60188 UIKitCore`-[UIWindow _sendTouchesForEvent:] + 1228
    frame #28: 0x0000000182d8fca8 UIKitCore`-[UIWindow sendEvent:] + 4372
    frame #29: 0x0000000182f30ac0 UIKitCore`-[UIApplication sendEvent:] + 892
    frame #30: 0x0000000182d64c88 UIKitCore`__dispatchPreprocessedEventFromEventQueue + 8148
    frame #31: 0x0000000182d59b4c UIKitCore`__processEventQueue + 6544
    frame #32: 0x0000000182d5ef68 UIKitCore`__eventFetcherSourceCallback + 168
    frame #33: 0x00000001809784fc CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
    frame #34: 0x000000018098862c CoreFoundation`__CFRunLoopDoSource0 + 204
    frame #35: 0x00000001808ca834 CoreFoundation`__CFRunLoopDoSources0 + 256
    frame #36: 0x00000001808cff08 CoreFoundation`__CFRunLoopRun + 768
    frame #37: 0x00000001808e3250 CoreFoundation`CFRunLoopRunSpecific + 572
    frame #38: 0x00000001a140e988 GraphicsServices`GSEventRunModal + 160
    frame #39: 0x00000001830e3a94 UIKitCore`-[UIApplication _run] + 1080
    frame #40: 0x0000000182e7cfd4 UIKitCore`UIApplicationMain + 336
  * frame #41: 0x00000001009410b0 DoctorFollow`main at AppDelegate.swift:20:7
    frame #42: 0x0000000102a7c4d0 dyld`start + 444
(lldb) 

Hi @utku.erturk ,
Does your app include the MobileRTCResources.bundle for resource load?

Hi, yes it was attached but the MobileRTC Resources.bundle version is outdated.

Once we added the one for 5.12 the issue was resolved.

Thank you for your help.

1 Like

@utku.erturk ,

Glad @jackie.chen was able to help get you back on track. Should you have additional questions, please let us know.