Unity Issue on Startup 5.3.2p4 — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Unity Issue on Startup 5.3.2p4

CodingJarCodingJar Posts: 46 Oculus Start Member
edited March 2016 in Audio SDK Development
Hello,

I've noticed that if I build a non-release build, the audio is super crackly when loading my Unity VR game. It's immediately noticeable on the title screen which has only ambient music playing (not spatialized). I looked at the log and found this:

02-26 16:38:49.901: E/Unity(30459): Unable to find libAudioPluginOculusSpatializer
02-26 16:38:49.911: E/Unity(30459): Could not load symbol ovrp_GetEyeOcclusionMesh : undefined symbol: ovrp_GetEyeOcclusionMesh
02-26 16:38:49.911: E/Unity(30459):
02-26 16:38:49.911: E/Unity(30459): (Filename: ./Runtime/Modules/LoadDylib.cpp Line: 207)
02-26 16:38:49.911: E/Unity(30459): Could not load symbol ovrp_GetAudioOutId : undefined symbol: ovrp_GetAudioOutId
02-26 16:38:49.911: E/Unity(30459):
02-26 16:38:49.911: E/Unity(30459): (Filename: ./Runtime/Modules/LoadDylib.cpp Line: 207)
02-26 16:38:49.911: E/Unity(30459): Could not load symbol ovrp_GetAudioInId : undefined symbol: ovrp_GetAudioInId
02-26 16:38:49.911: E/Unity(30459):
02-26 16:38:49.911: E/Unity(30459): (Filename: ./Runtime/Modules/LoadDylib.cpp Line: 207)

This leads me to believe something is wrong in the plug-in. Confusing still, it appears that the audio is still spatialized despite these errors. I can sometimes get the build to work by changing "Best Latency" in the Unity Audio settings to "Default".

Note I'm writing this as I'm testing, so I've just tested this again: Switched to "Best Latency", did a Development build, and it worked for two restarts. Then I switched the Gear VR Service to be in Development Mode and the crackling re-appeared on start-up. There are NO code changes, simply toggling that switch made it appear. Now it appears I can get it to fail about 50% on start-up with re-launches.

The reason I want to test this in Development mode is that I've noticed when we have too many sounds playing in the Release build that our audio crackles and frame rate drops. For this reason, I've created a dynamic spatialization manager that prioritizes certain sounds to be spatialized (and can therefore toggle it at runtime). However, I'm noticing now that the framerate doesn't drop significantly when using the debug build and I am able to spatialize 10+ sounds with no issues. However, I'm getting these weird errors and now I'm worried testing this in Development mode is unreliable.

Any pointers? Has anyone else seen this issue? Keep in mind NO sounds are spatialized when I see it exhibit this error.
Developer of Elementalist X: Immersive and intense tower defense for Gear VR.

Comments

  • KeksmaniaKeksmania Posts: 3
    NerveGear
    I came here for a similar issue. In the editor everything works fine, but when I make a test build on startup the game crashes 50% of the time and for the rest of the time it crackles.. I found a workaround by not using the Oculus spatializer effects on the audio mixer or by changing the output audio mixer 0.5 sec after the game starts .. but obviously that's not how it should be
  • CodingJarCodingJar Posts: 46 Oculus Start Member
    I've been developing with "Default" instead of "Best Latency". Not sure I can release with "Best Latency"... doesn't appear it's possible.
    Developer of Elementalist X: Immersive and intense tower defense for Gear VR.
  • petergiokarispetergiokaris Posts: 170 Oculus Staff
    Hello,

    We have also experienced cracking with both Spatialization on or off using Best Latency. On PC this represents a buffer size of 256 samples. I would recommend using Good Latency (which should be 512 samples) and that should resolve crackling.

    The crashing issue is something that we will need to investigate further. Are you seeing this crash occur with the test scene that is included with the integraton (RedBallGreenBall)?
    Peter Giokaris
    Senior Software Engineer
  • CodingJarCodingJar Posts: 46 Oculus Start Member
    Thank you for the reply. Does the fix in Unity 5.3.3p2 have anything to do with this? From the release notes:
    Android: Audio - Don't select OpenSL output if the native device params are too bad for fast path (fixes audio issues on buggy devices).
    Developer of Elementalist X: Immersive and intense tower defense for Gear VR.
  • petergiokarispetergiokaris Posts: 170 Oculus Staff
    It may very well be. Are you selecting OpenSL and seeing these problems occur? I would recommend not using OpenSL at this time if the application is more stable.
    Peter Giokaris
    Senior Software Engineer
  • CodingJarCodingJar Posts: 46 Oculus Start Member
    I've not selected OpenSL, I didn't know that was an option, thought it might do this under the hood. I can't find this option in the Editor settings.
    Developer of Elementalist X: Immersive and intense tower defense for Gear VR.
  • petergiokarispetergiokaris Posts: 170 Oculus Staff
    I've never seen this either, although being that it's within the docs there should be a way to select. The info given about not selecting OpenSL from below does not give any indication on what devices are buggy, so I don't think we can rely on the info to help with this issue.

    Have you tried updating to the latest Unity public release (5.3.3f1)? This is the version I am currently using. I recommend updating to this release.
    Peter Giokaris
    Senior Software Engineer
  • MarkVincentMarkVincent Posts: 3
    NerveGear
    Hi, I am too suddenly getting a list of errors in Unity 5.3.3p2 after checking the "Virtual Reality Supported" checkbox.
    Building for GearVR

    Could not load symbol ovrp_GetEyeOcclusionMesh : dlsym(0x10ab8f940, ovrp_GetEyeOcclusionMesh): symbol not found
    Could not load symbol ovrp_GetAudioOutId : dlsym(0x10ab8f940, ovrp_GetAudioOutId): symbol not found
    Could not load symbol ovrp_GetAudioInId : dlsym(0x10ab8f940, ovrp_GetAudioInId): symbol not found

    Compositor failed to initialize.
    Bad config or LibOVR not found. VR disabled.
    Oculus HMD not present. VRSettings.enabled set to false.

    This is new. Did not get any of these warnings in previous versions.

    Any ideas on what could be causing this?
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    The ovrp_* messages should be warnings. Right? Have you installed the Oculus runtime from https://developer.oculus.com/downloads/ ? Unity spins up the Rift rendering stack while building for Gear VR. It's an issue we are fixing for a near-future release. However, it's always done this. Not sure why it just started failing now. Can you send Editor.log?
  • MarkVincentMarkVincent Posts: 3
    NerveGear
    Hi vrdaveb,

    I've upgraded to 5.3.4f1 and I'm still getting the errors.
    I've included attached the Editor.log

    Thanks, Mark
  • petergiokarispetergiokaris Posts: 170 Oculus Staff
    Mark,

    I think you only installed the latest Unity as I had suggested, but Dave mentioned that you should install the latest runtime:

    https://developer.oculus.com/downloads/

    Could you try installing this to see if this resolves your issues?

    Best,
    Peter Giokaris
    Senior Software Engineer
  • CodingJarCodingJar Posts: 46 Oculus Start Member
    I should note my original post and error log were all taken on the device, not during the build process. Unless there is an issue with it trying to load a non-existent Oculus runtime on the Android device, I don't think this is the issue.
    Developer of Elementalist X: Immersive and intense tower defense for Gear VR.
  • MarkVincentMarkVincent Posts: 3
    NerveGear
    Hi Peter,

    Sorry for not being clear in my reply.
    I installed Unity3D 5.3.4f1 AND oculus_runtime_sdk_0.5.0.1_osx.
    I am still getting the errors on 2 different machines, same configuration.
    Clean project with only "Virtual Reality supported" checked and build platform set to Android.

    Perhaps this helps,
    When I open OVRServer I get:

    Error: {ERR-014} [NetServer] Unable to start listening socket
    OVR::DeviceManagerThread - running (ThreadId=0x0x10dba3000).
    OVR::DeviceManager - initialized.
    CameraFactory starts
    [TrackingManager] Entering tracking thread

    Could this be an issue? Or does that just mean there is no HMD connected?
    I am still only trying to build for GearVR.

    Thanks
  • BrainloginBrainlogin Posts: 57
    Brain Burst
    Hi @vrdaveb , I'm seeing the same errors reported here (Could not load symbol ovrp_GetAudioInId : dlsym(0x10ab8f940, ovrp_GetAudioInId): symbol not found etc.), just by creating a new project, installing the latest Unity version, latest runtime for OSX.

    And when I setup the same versions on Windows, I have other warnings ([VRDevice] Initialization of device oculus failed)
  • benairdbenaird Posts: 2
    NerveGear
    I was seeing the same errors that others have mentioned here, upgrading to 5.3.4p6 fixed the issue.
Sign In or Register to comment.