1

I have created a Vidyo iOS app using Swift with following this tutorial.

But I am getting app Crash on the following:

connector = VCConnector(UnsafeMutableRawPointer(&vidyoView),
                                viewStyle: .default,
                                remoteParticipants: 4,
                                logFileFilter: UnsafePointer("warning"),
                                logFileName: UnsafePointer(""),
                                userData: 0)

Following is the Debugger Log:

ERROR: LmiFile: [System thread]: /tmp/SDK.Release.TRINITY_4_1_20_3.build.tO3KysfAv5/source/SDK/Lmi/Os/LmiFile.c:132: LmiFileOpen_: Error opening file v\217\206: Operation not permitted

Assertion failed: (newVal >= 0), function LmiSharedPtrRefCountDecUseCount, file /tmp/SDK.Release.TRINITY_4_1_20_3.build.tO3KysfAv5/source/SDK/Lmi/VidyoClient/../../../SDK/Lmi/Os/LmiSharedPtrInline.h, line 51.

Can anyone help?

Community
  • 1
  • 1
  • Check this: [App is Crash When I run my Vidyo code](https://stackoverflow.com/a/43724320/8346251) – Kevinosaurio Feb 28 '18 at 18:22
  • I have already added Keychain Capabilities. Still it Crashes on Second Run. First time It runs successfully if i run it Second time it Crashes. After some time if i try again it runs successfully for one attempt. I am not sure what exactly is happening – Saleel Karkhanis Mar 01 '18 at 04:47
  • @SaleelKarkhanis Have you got any solution? I am experiencing the same problem. My app crashes again and again even I have followed the same mentioned steps. What is the reason? `Vidyo.io` lacking issues documentation – Tekhe Jun 28 '20 at 13:06
  • For runtime crashes, I have applied this way and It looks resolved. https://stackoverflow.com/a/65793331/6135652 – iamburak Jan 19 '21 at 18:27

2 Answers2

0

The tutorial is wrong. Pass in logFileFilter: and logFileName: as regular Swift Strings.

connector = VCConnector(UnsafeMutableRawPointer(&vidyoView),
                                viewStyle: .default,
                                remoteParticipants: 4,
                                logFileFilter: "warning",
                                logFileName: "",
                                userData: 0)

The parameter type for logFileFilter: and logFileName: is const char*. You can pass a String to a parameter of this type and it will be converted for you.

Source: passing String to const char* parameter

You should be able to pass a String directly to a C function expecting const char * and it will be automatically converted to a null-terminated UTF-8 string

0

Make sure you are initializing the package before creating the connector:

// Initialize package
VCConnectorPkg.vcInitialize()

// Create connector
connector = VCConnector(UnsafeMutableRawPointer(&vidyoView),
                                viewStyle: .default,
                                remoteParticipants: 4,
                                logFileFilter: "warning",
                                logFileName: "",
                                userData: 0)

This fixed the issue for me. Good luck!

  • 1
    Reference to vidyo.io I have created test project in swift IOS, followed all procedures as mentioned but my application is continuously crashing. Error is `Thread 1: EXC_BAD_ACCESS` on this file. `#1 0x0000000103aec9dc in LmiWindowCreateChild_ at /tmp/SDK.Release.TRINITY_20_1_0_9.build.7uOSFpBWGF/source/SDK/Lmi/Ui/LmiWindowIPhone.m:394` Even clean and build again but no success. Please guide me. – Tekhe Jun 28 '20 at 13:10
  • @Tekhe Hi, did you find any solution about your issue? I'm experiencing same thing even newly created Swift project. – iamburak Jan 19 '21 at 07:30
  • For runtime crashes, I have applied this way and It looks resolved. https://stackoverflow.com/a/65793331/6135652 – iamburak Jan 19 '21 at 18:28
  • @iamburak Teşekkürler Aslında Vidyo güvenilir değil ve fazla dokümantasyona sahip değil. – Tekhe Jan 20 '21 at 10:43