Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Resolved Failed to Generate ARCoreReferenceImageLibrary using MARS Marker Library

Discussion in 'Unity MARS' started by ctherndon, Feb 25, 2021.

  1. ctherndon

    ctherndon

    Joined:
    Aug 22, 2015
    Posts:
    10
    Hi all, I'm working with mars and image markers. It fails to generate the image library when I go to build. The library is a mars image marker library. Everything works in simulation and device view. It's only when I go to build that I get the following error.

    I'm lost in that I'm not sure what the error is because the stderr coming from the arcoreimg exe is blank and the stdout seems to report having generated the image database which the "failed to generateARCoreReferenceImageLibrary" is claiming otherwise. I am not certain what could be the source of this error or what exactly the error is.

    BuildFailedException: Failed to generate image database. Output from arcoreimg:
    stdout:
    Image database generated at: C:/Filter.imgdb
    Image list file generated at: C:/Filter-imglist.txt
    ====
    stderr:
    ====
    UnityEditor.XR.ARCore.ARCorePreprocessBuild.BuildImageTrackingAssets () (at Library/PackageCache/com.unity.xr.arcore@4.1.5/Editor/ARCoreBuildProcessor.cs:333)
    UnityEditor.XR.ARCore.ARCorePreprocessBuild.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.xr.arcore@4.1.5/Editor/ARCoreBuildProcessor.cs:57)
    UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass15_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at <1e441e8684a14fe4b8f8a926d91afc3a>:0)
    UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at <1e441e8684a14fe4b8f8a926d91afc3a>:0)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
     
  2. mtschoen

    mtschoen

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    187
    Hi there! Sorry that you're running into issues. I haven't seen this particular error before, but it seems to be coming from the AR Core plugin. Usually, if there is an issue with the image itself you will see a warning about poor tracking quality or something similar. Is there more in the log that might help us out here?

    Are you able to submit a bug report (Help > Report a bug...) and attach the project so that we can try to replicate the issue on our end? If not, please describe the steps you took to get to this point, so that we can help diagnose the issue.

    Thanks for using MARS. Hope this helps!
     
    ctherndon likes this.
  3. ctherndon

    ctherndon

    Joined:
    Aug 22, 2015
    Posts:
    10
    My first assumption was the possibility of images being low quality. I used the arcoreimg eval-img to verify that the single target image I have in the reference library is at 100. So the image quality is not the issue.

    I'm going to see if rolling back my arcore version fixes this issue and will update.
     
  4. mtschoen

    mtschoen

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    187
    It's possible that this issue could be caused by spaces in path names. Is your project located in a path with spaces?
     
  5. ctherndon

    ctherndon

    Joined:
    Aug 22, 2015
    Posts:
    10
    Hey Matt, I noticed the project name had a space in it. I removed that and rebuilt the project. It works now. Thanks!
     
    maritajee likes this.