Jump to content

Recommended Posts

Posted

I had a working standalone app for the Focus 3, made in Unity 2019.3.14f1 in standard render pipeline. After Upgrading to 2022.3.9f1 and switching to URP the app now randomly crashes, most likely during a scene transition, but also just randomly in between. Tried downgrading to 2021 LTS, but still same issue, so URP is my most likely suspect atm.

I attached 2 logcat files from shortly before till after it crashes (first is a random crash, second on scene switch; app name: com.my.test.app).

Also attached the manifest, though that wasn't an issue in 2019 w.o URP.

log.txt log2.txt AndroidManifest.xml

Posted

@RicePort

Howdy, 

Sorry to hear that you're experiencing crashes.

There are a few open questions about the project and logfiles

1) What sdk and version are you using - wave or openxr, and have you tried updating to the latest versions of the corresponding packages 
2) There seems to be some issue with "com.HTC.MotionTracker.MotionTrackerDataHandler.UpdateData" and i'm not sure I'm seeing where that might come from
3) Most likely is that the memory grew too large in the scene change based on "2023-11-07 09:53:35.662 836-836/? E/lowmemorykiller: Kill 'com.my.test.app' (19898), uid 10162, oom_adj 0 to free 1726804kB"

There are more ways to accidentally use a ton of memory in the new rendering pipelines, so maybe check this out in your app with the memory profiler https://docs.unity3d.com/Manual/ProfilerMemory.html

Posted

Hello,

I was thinking among similar lines, however the lowmemorykiller is only supposed to kill apps that are not in foreground, so it shouldn't kill it? I also tested it in a very small scene, and it still crashed after ~30min of doing nothing while I could stick around for hours in way larger scenes before; so a memory leak would be the only explanation there, though 1.7GB doesn't sound like it's too large.

OpenXR Plugin is 1.8.2 (shouldn't matter since it compiles to Wave XR?), but I tested multiple versions of Wave XR Plugin. Oddly enough the newer versions (5+) don't let me start the app at all (immediately crashes; don't remember the crash log but I can build again with a newer version) so I was building with 4.2.

Posted

@RicePort
lowmemory killer starts with the background apps then kills the foreground if there still is not enough memory, which is what it did in the logs

RE openxr, https://github.com/ViveSoftware/VIVE-OpenXR/ 2.0.0 is the latest. When switching you might have been seeing some cached AndroidManifest.xml files causing conflict between versions. It's useful information usually, but it does look like a memory issue that the profiler and memory profiler would expose quickly.

Posted (edited)

VIVE OpenXR is for PC-VR only, is it not? If there is an OpenXR version for Focus 3 standalone that'd be great.

Since this is a standalone application and I'm using Wave XR Plugin (OpenXR is just used for in editor testing). I just created a build with WaveXR Plugin 5.4 (newest); still same issue. I believe you're right that it's a memory issue (apparently since 2018 lowmemorykiller kills foreground apps as well), and I can just hope it's not an inbuilt URP issue.

Another issue I noticed when upgrading to WaveXR Plugin 5.4 (which I remember is why I didn't use that version): The unity Editor crashes on hitting play with that version installed; I'm assuming it has to do with it trying to initialize itself even though the project is set to use OpenXR in editor and not WaveXR.

Crash report for that attached, though I guess I might want to open a different topic for that.

Editor.log

Edited by RicePort
Posted

Hey,

thanks for the links, I'll be checking that out.

Do you know what the proposed memory limit for an app on the Focus 3 should be? The app crashed after hitting 4639 MB total reserved memory; which does seem quite high; I'll make another build without URP and check the memory usage there to ballpark a safe limit.

Posted

Just a quick update; the issue has been resolved, the app took 4 - 4.6GB RAM after upgrading to URP, and only 2 - 2.6 using built-in.

The main issue was that the URP Lit shader took up 1.5GB RAM; oddly enough the solution was to only have one Quality Setting, which reduced it to 100MB; apparently Unity loads every shader variant even for the not-selected quality into memory.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...