Search Unity

Black camera on specific devices. Tracking works fine

Discussion in 'Vuforia' started by Freaking-Pingo, Feb 26, 2018.

  1. Freaking-Pingo

    Freaking-Pingo

    Joined:
    Aug 1, 2012
    Posts:
    310
    We have made an application that works on multiple devices but there are still some that displays a black camera image. Tracking, however, seems to be still functional despite no camera image is showing. The application also works fine for iOS devices.

    One of the devices that I am trying to debug with is a Sony Xperia XA1. The phone is running Android-version 7.0. We are building using Unity 2017.3.1p1, Vuforia 7.0.47 and a Mac running HighSierra.

    We have tried the following without successe:
    • Set Camera Device Mode to MODE_DEFAULT
    • Set Camera Direction to CAMERA_BACK
    • Tried forcing the target API level to a lower version
    • Disabled Mutlithreaded Rendering
    • Disabled Graphics Jobs (Experimental)
    • Updated to the latest Android SDK [Android API 27]
    • Updated to the latest JDK [jdk1.8.0_161.jdk]
    • Tried building the Vuforia samples downloaded from the Unity asset store but yielded the same result.
    I looked through Logcat:

    It tells me that Vuforia was successfully initialised:
    Code (CSharp):
    1. Unity   : Vuforia initialization successful
    and there was only a few messages that could suggest a problem:
    Code (CSharp):
    1. CameraDevice::getCameraCalibration(): Failed to get camera calibration because the camera is not initialized.
    Code (CSharp):
    1.  SeninfDrvImp: [setSeninfNCSI2]Err( 2029):CSI-1 calibration failed!, NCSI2Config Reg 0x44=0x0, 0x48=0x0.
    Lastly, Logcat spammed the following:
     
    Last edited: Feb 26, 2018
  2. bug5532

    bug5532

    Joined:
    Aug 16, 2011
    Posts:
    307
    I think I'm having the same problem, but for me it's just on some iOS devices. Also rather than a black camera, I get the "Made with Unity" splash screen. Also if I minimize the app and then reopen it, it will show the camera for a second before showing me the splash screen again. Tracking is still working. Sometimes it does show a black screen instead of the splash screen.

    I'm running Unity v2017.3.0f3. And have this problem on an ipad air (11.0.3) and an iPhone 6+ (11.2.5).

    Any suggestions? It is working fine on my android devices and lots of other iOS devices, including newer and older.
     
  3. aferriss

    aferriss

    Joined:
    Apr 4, 2013
    Posts:
    1
    I also ran into this today. On iPhone SE running iOS 11.3 I couldn't get a camera background, but with an iPhone 7 on 11.2 it worked fine.

    I got similar errors to OP

    Screen Shot 2018-02-26 at 1.34.19 PM.png

    EDIT: I downgraded to 11.2.5 on my SE and now things seem to be working, so seems like at least for me it was an issue with iOS versions.
     
    Last edited: Feb 26, 2018
  4. bug5532

    bug5532

    Joined:
    Aug 16, 2011
    Posts:
    307
  5. Freaking-Pingo

    Freaking-Pingo

    Joined:
    Aug 1, 2012
    Posts:
    310
    Yeah, this solves the problem for iOS devices but it is not a viable solution for Android devices experiencing the same problem.
     
  6. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
  7. Freaking-Pingo

    Freaking-Pingo

    Joined:
    Aug 1, 2012
    Posts:
    310
    After some further testing we have found the following:

    • We have tried creating the most simple app possible with Vuforia, where we simply just imported the standard Vuforia package and added the ARCamera to the scene. On most of our phones it works as expected and displays the camera image but on the Sony Xperia we are still seeing a black image.
    • It appears after approx 50-60 seconds of blackscreen the app seems to crash.
    • I have send a PM to @Vuforia-Strasza including a Verbose logcat file. There is quiet a lot of junk in the file but i believe you can filter out what is necessary for you.
    • We have planned a live test of our project this monday, so if there exist a temporary fix for the problem I would welcome it very much.
     
  8. michaelklenk

    michaelklenk

    Joined:
    Mar 9, 2018
    Posts:
    8
    I'm facing the exyatly same problem. Black Background, Object Reco with the vuforia demo app works as expected and the app crashes after about 50s

    Here a screenshot of my test.


    I working also with an Sony XA1 Phone.
    Android: 7.0
    Vuforia Verion 7.0.47
    Unity 2017.3.1.f1

    Thanks @Freaking-Pingo for all your tests and also for the los that you sent to vuforia. I hope they will find out soon where the problem could be.
     
  9. Le_Tai

    Le_Tai

    Joined:
    Jun 20, 2014
    Posts:
    442
    Did you guy use .NET 4.5? I have the same problem and revert to mono work
     
  10. Aidan-Wolf

    Aidan-Wolf

    Joined:
    Jan 6, 2014
    Posts:
    59
    This is still a problem, where is the fix Vuforia
     
  11. SkyAngel_AOG

    SkyAngel_AOG

    Joined:
    Apr 5, 2018
    Posts:
    1
    Hi, try build project in xcode 9.3, download and setup xcode 9.2, copy folder 11.3 (developer->platform->ios) from xcode 9.3 folder to xcode 9.2 folder and setup project from xcode 9.2
     
  12. theolagendijk

    theolagendijk

    Joined:
    Nov 12, 2014
    Posts:
    117
    Hi @SkyAngel_AOG, this thread is not about that iOS specific issue. The question is explicitly about an Android device.
     
  13. developersice

    developersice

    Joined:
    Nov 25, 2016
    Posts:
    36
    Having similar issue with ios devices on 10.3, watching this thread for an update...
     
  14. pixelstein

    pixelstein

    Joined:
    Sep 11, 2015
    Posts:
    1
    ERROR/AR(13740) 2018-05-15 21:38:32: CameraDevice::getCameraCalibration(): Failed to get camera calibration because the camera is not initialized....
    As far as I can see this is a very old bug and I think it is time to solve it now!!!
     
    vlasis likes this.
  15. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    The black screen issue has been resolved in 7.1.34.
     
  16. developersice

    developersice

    Joined:
    Nov 25, 2016
    Posts:
    36
    Are incompatibilities with Metal fixed in this update?
     
  17. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    114
    Issue persists on Pixel 2, Android 8.1.0, Vuforia 7.1.35, Unity 2018.1.0f2.
    You can see the image tracked at the edge of the screen, but no camera passthrough.
    Screenshot, logcat, and VuforiaConfiguration attached.
     

    Attached Files:

  18. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    114
    Of course as soon as I report this, I find out through a random forum thread that we need to use the "Vuforia" VR SDK in build settings. Please update your documentation, I've spent 2 hours on a task that should have taken 15 minutes with the right info. Thanks
     
    leoyakxi likes this.
  19. randmeyer

    randmeyer

    Joined:
    Aug 19, 2018
    Posts:
    1

    Hi @michaelklenk, did you ever find a solution to this? I'm having the same issue on Sony Xperia XA1 Ultra.
     
  20. sync3D

    sync3D

    Joined:
    Jan 16, 2017
    Posts:
    2
    @randmeyer @michaelklenk @Vuforia-Strasza Any news about Sony Xperia XA1 Black Screen Background, we publish the app and user write us for this problem can you help us to solve this issues. :(

    Thanks
     
  21. mon_carito

    mon_carito

    Joined:
    Sep 26, 2018
    Posts:
    2
    I have the same problem with Sony Xperia Xa1 Modelo G3123 Andorid 8, someone found a solution?
     
  22. ironbitUnity

    ironbitUnity

    Joined:
    Jun 29, 2017
    Posts:
    11
    this worked for me, put this code in your Script:

    Code (CSharp):
    1. void Start(){
    2. var vInit = Vuforia.VuforiaARController.Instance;
    3. vInit.RegisterVuforiaInitializedCallback(OnVuforiaStarted);
    4.  
    5. }
    6.  
    7. public void OnVuforiaStarted(){
    8. Vuforia.CameraDevice.Instance.SetFocusMode(Vuforia.CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);
    9.     }