I have an app targeting Oculus Go, and a strange issue has come up. Namely, when I take a specific path through the app, at a certain point I do a LoadScene and this causes the app to exit and the Oculus Home to come up. What makes this so infuriating to debug is that I cannot get any useful information about what might be causing it.
- The same scene can be loaded through a different path, and it works fine.
- Rolling back to an earlier revision, it works fine. I narrowed it down to a commit that has no code changes to the scenes in question, after which it breaks. The only close-to-relevant change is an autogenerated change to the plugins csproj, adding a “subtype component” declaration, whatever that means.
- Some of the first revisions with the bug exhibit the curious behavior of crashing the first time, but on subsequent load of the app, they work fine. Nondeterministic error? Awesome.
- The big one - there are NO LOGS AT ALL in logcat that seem even somewhat related. I put logs on both sides of the scene load (in SceneLoaded and SceneUnloaded events, and on Awake in scripts in the new scene), and on one side i get the output “calling LoadScene” and that’s the last line of unity output. Looking at all the logcat logs, I see a bunch of creepy facebook/oculus logs but they appear to simply be reporting on the fact that an app crashed and Oculus Home is reloading. Nothing else besides normal system heartbeat stuff.
So, how do you even begin to debug this? Let’s say it was an out-of-memory issue: would this at least log something? Is there a way I can leverage LoadSceneAsync and get more information? (I tried this, and it still crashed. I don’t know what other information I could glean from the async load but I don’t usually use async loading)
Any advice, suggestions, or if anyone has had similar issues on Oculus Go, or android in general, with LoadScene causing a fully unreported crash condition? Thanks for any help.