Log in or register to post comments

Random black AR camera video background

February 22, 2016 - 10:41am #9

Vuforia SDK Version: 5.0.10 -

Description with steps to reproduce:

Hello,

We're developing a Vuforia app using Unity 5.3.1f1 for a client. We're noticing a random black video background representing the AR camera. The app needs to be closed and restarted.

How can this be corrected?

-

Development OS (Mac OS X, Windows, Linux): Mac OS X -

Mobile OS and Version: iOS 9.2.1 -

Mobile Device Manufacturer and Model name: Apple iPhone 6 -

Do the Vuforia Sample Applications show the same behavior?: No.

Random black AR camera video background

February 22, 2016 - 4:08pm #8

Can you provide some video or screenshots of the problem? Have you made any modifications to the Cloud Reco sample app?

https://developer.vuforia.com/forum/device-support/how-report-device-issue

 

Random black AR camera video background

February 23, 2016 - 7:23am #7

In the attachment is the output log from XCode from the time when the app was built to when the black screen error occured. You'll notice in the log the Vuforia scene was loaded successfully several times then we returned to the start screen via a return button. Then we tried the Vuforia scene again. We repeated these steps several times returning to the Vuforia scene until we got the black screen. At the bottom of the log, there seems to be an error with loading the Vuforia scene and we don't know why.

AttachmentSize
Plain text icon xCode_outputLog_blackScreenBug.txt110.03 KB

Random black AR camera video background

February 23, 2016 - 8:10pm #6

From the logs, it appears the failure is due to a null reference exception. You may want to check for null values prior to calling methods on objects that might not be re-initialized yet when re-entering the scene. If you are exiting and re-entering Vuforia scenes rapidly some resources might not have finished before being requested again.

NullReferenceException
  at Vuforia.TrackableBehaviour.OnTrackerUpdate (Status newStatus) [0x00000] in <filename unknown>:0 
  at Vuforia.StateManagerImpl.SetTrackableBehavioursForTrackableToNotFound (Trackable trackable) [0x00000] in <filename unknown>:0 
  at Vuforia.ObjectTrackerImpl.Stop () [0x00000] in <filename unknown>:0 
  at Vuforia.VuforiaAbstractBehaviour.StopVuforia () [0x00000] in <filename unknown>:0 
  at Vuforia.VuforiaAbstractBehaviour.OnDisable () [0x00000] in <filename unknown>:0 

 

Random black AR camera video background

February 25, 2016 - 1:46am #5

Same problem here, is there any solution yet?

Random black AR camera video background

February 25, 2016 - 8:45am #4

We seemed to have found a solution. Originally, we changed the TrackableEventHandler to do a SendMessage but we did not set any options for this method. Our solution was to add SendMessageOptions.DontRequireReceiver to the SendMessage. I believe what was happening was Unity when loading the scene would occasionally load the trackable event handler before loading the object that was supposed to receive the message and this was causing the error.

It would be nice if Unity was consistent with the order of the objects that its loading but for some reason it isn't.

Random black AR camera video background

May 12, 2016 - 12:00pm #3

Hello ytz!

 

I'm having the same problem, and I'm not quite sure how you seemed to have implemented your solution. Would you mind helping me out?

 

Right now, in DefaultTrackableEventHandler.cs, I'm checking if mTrackableBehaviour != null before registering it as a trackable event handler, but i'm unsure how to use SendMessage() (i.e. what should it send a message to?)

 

Thanks a lot for your help!

Random black AR camera video background

May 14, 2016 - 6:04am #2

In the SendMessage documentation it explains how to set DoNotRequireReceiver so that it does not create an error if there is no receiving object. In addition to that setting, I also added a check to only use the SendMessage function if the object I'm trying to send to is not null. So the whole system is double checking that everthing is loaded correctly.

Random black AR camera video background

May 16, 2016 - 4:39pm #1

Thanks!

 

I have that part down already, but I'm not sure what should be replaced with a SendMessage()?

Should Start() in TrackableEventHandler.cs be changed so that it sends a message to TrackableBehaviour.cs and then gets registered there? I'm working my way through it but I haven't quite figured out how Vuforia updates its trackers and where exactly does the null ref exception happens...

Thanks for your help!

Log in or register to post comments