So regarding the xrStopHapticFeedback
spam, its relatively easily “fixed” by overriding UpdateForceFeedback
in a custom PlayerController and not immediately returning. Somehow SetDisableHaptics(New Disabled: True)
and ForceFeedbackEnabled(False)
, still makes calls to UpdateForceFeedback
, which in turn causes the log spam. Obviously this disables force feedback though.
The more important issue regarding
Creating temporary JNIEnv. This is a heavy operation and should be infrequent.
In the logs I see a process id of 31940
and in the Perfetto logs this corresponds to the Unreal RenderThread, I would’ve expected it to refer to some oculus process, not the RenderThread. Especially because I can’t find any reference to it in the Engine source, neither in epic’s branch nor the Oculus one. I have no idea what i’m doing regarding performance traces, but I see no mentions of JNI calls during a frame and of the calls there, nothing sticks out as particularly “heavy”.
@VictorLerp Could you shed some more light regarding the JNI log string, have you encountered this and should it be ignored?
I’ve never seen this. Which HMD and runtime are you using?
Quest 2 and the default selected “Native OpenXR with vendor extensions”.
What OS and GPU are you using?
Windows 11 - Version 10.0.22000 Build 22000
Nvidia 2070 Super
Just to check I created a new project in the src-built unreal, without touching any of the settings. Building lighting worked fine but it refused to launch at first with:
LogPlayLevel: Warning: UAT: LogCook: Warning: Cooker has been blocked from saving the current packages for 120.000000 seconds.
LogPlayLevel: UAT: LogCook: Display: 1 packages in the savequeue:
LogPlayLevel: UAT: LogCook: Display: /Game/VRTemplate/Maps/VRTemplateMap_BuiltData
LogPlayLevel: UAT: LogCook: Display: 3 objects that have not yet returned true from IsCachedCookedPlatformDataLoaded:
LogPlayLevel: UAT: LogCook: Display: LightMapTexture2D /Game/VRTemplate/Maps/VRTemplateMap_BuiltData.VRTemplateMap_BuiltData:HQ_Lightmap0_7
LogPlayLevel: UAT: LogCook: Display: LightMapTexture2D /Game/VRTemplate/Maps/VRTemplateMap_BuiltData.VRTemplateMap_BuiltData:HQ_Lightmap0_6
LogPlayLevel: UAT: LogCook: Display: LightMapTexture2D /Game/VRTemplate/Maps/VRTemplateMap_BuiltData.VRTemplateMap_BuiltData:HQ_Lightmap0_5
LogPlayLevel: UAT: LogCook: Display: Cooked packages 462 Packages Remain 1 Total 463
LogPlayLevel: UAT: LogCook: Display: Cook Diagnostics: OpenFileHandles=465, VirtualMemory=976MiB
I counted 13x in my logs before I killed it(I still have the logs). I then retried the build and the result was the same, again hanging on the Warning: Cooker has been blocked
.
Restarting Unreal and building again caused it to compile everything over again([840/840]) and this time it succeeded but instead of being deployed to the quest it popped up in windows desktop(Quest must have went into standby I guess).
Finally retrying again deployed it correctly on the quest with correct graphics. I can’t tell you why I had the initial black and white graphics, maybe it’s an cache issue somewhere or maybe like you said I enabled Instanced Stereo right at the start and if I recompiled Unreal completely from scratch it might happen again but this takes too long and I’m much more interested in the JNI issue.