0

We got the Vidyo SDK working great opening the first time. Everything works great, much based on the SDK code example. When call is done and the view is change we use viewDidDisappear and set:

[[NSNotificationCenter defaultCenter] removeObserver:self];
[vc disconnect];
[vc disable]; // releases the camera, mic, speaker
vc = nil;
[VCConnectorPkg uninitialize];

How every if we the start a new call we get EXC_BAD_ACCESS when calling the view. Using Zombie in xcode gives me the following error:

*** -[LmiVideoCapturerImplementationAVFoundation retain]: message sent to deallocated instance 0x131f7f940

It feels like there is something we are not terminating correct, what are we missing?

1 Answers1

1

The cause of that is you're trying to start a new call after [VCConnectorPkg uninitialize] was called.

Vidyo.io API calls should be smth like:

  • Call [VCConnectorPkg vcInitialize] only once - in (void)viewDidLoad
  • Call [VCConnectorPkg uninitialize] only once - in (void)appWillTerminate
  • Call [vc disable] and vc = nil in case if you leave the Vidyo view controller.

And be sure you call vc = [VCConnector alloc] init:(void*)&videoView in case if you disabled and nil'ed it previously.

voltar
  • 66
  • 3
  • Okay I have removed [VCConnectorPkg uninitialize], just using (void)viewDidDisappear the calling: [vc disable] vc = nil Clean, reinstalled a few times but still getting the same error. How ever since [VCConnectorPkg vcInitialize] in (void)viewDidLoad is called every time the view is loaded maybe I need to create a if statement if already initialize? – user2052501 Jan 18 '18 at 14:39
  • 1
    Yep, you shouldn't call initialize twice, just check whether it has been initialized or not. Same applies to uninitialize. – voltar Jan 19 '18 at 10:11