Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
141 stars 2 forks source link

Linux game crash: Releasing render texture that is set as Camera.targetTexture! #2524

Open coolymike opened 4 months ago

coolymike commented 4 months ago

Describe the issue.

I started the prerelease to test functionality on the Linux native version of Resonite, while in VR. I opened the settings menu of the dash, the game stopped rendering anything in VR (no new frames being pushed), showed a camera viewpoint somewhere far from where I was located on the desktop mirror, and the Resonite process became completely unresponsive to anything except forced termination.

Note that I am using Monado + OpenComposite. Monado is an OpenXR runtime (software to drive the VR headset, like SteamVR), and OpenComposite is a translation layer from OpenVR applications (like Resonite) to OpenXR runtimes (like Monado). Although it's intended to function similar to SteamVR, it differs in some ways. It is possible these have something to do with it. Monado + OC were still fully operational during and after the Resonite crash, with other overlay applications running at the same time without any interruption.

I am unable to test SteamVR, as it has not been properly functional on my system, and causes headaches due to broken reprojection when running Resonite under it.

To Reproduce

Trying to match the situation before the crash does not yield consistent results. It is likely the cause of the crash is elsewhere.

Expected behavior

No crash

Screenshots

No response

Resonite Version Number

2024.7.10.1077

What Platforms does this occur on?

Linux

What headset if any do you use?

Index (Monado+OC)

Log Files

Player.log Resonite.log

Additional Context

No response

Reporters

whippersnatchpupkinpatch on Discord

Frooxius commented 4 months ago

This looks like it's due to Steam overlay renderer. At the end of the log:

ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/user/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_OPERATION: Operation illegal in current state

I don't think it's relevant to the prerelease itself.

coolymike commented 4 months ago

I don't think I've had this happen on non-prerelease builds. The logs about gameoverlayrenderer.so being the wrong ELF class say "ignored" after it, meaning that library simply isn't loaded. It doesn't have anything to do with this issue.

I think the following part of the log is where the issue occurs:

OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_OPERATION: Operation illegal in current state
OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_OPERATION: Operation illegal in current state
Releasing render texture that is set as Camera.targetTexture!
 #0 GetStacktrace(int)
 #1 DebugStringToFile(DebugStringToFileData const&)
 #2 Camera::OnRenderTextureDestroyed(RenderTexture*)
 #3 RenderTexture::MainThreadCleanup()
 #4 delete_object_internal_step1(Object*)
 #5 DestroySingleObject(Object*)
 #6 Object_CUSTOM_DestroyImmediate(ScriptingBackendNativeObjectPtrOpaque*, unsigned char)
 #7  (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Object:DestroyImmediate (UnityEngine.Object,bool)
 #8  (Mono JIT Code) UnityFrooxEngineRunner.UnityAssetIntegrator:ProcessQueue (double)
 #9  (Mono JIT Code) FrooxEngine.AssetManager:Update (double)
 #10  (Mono JIT Code) FrooxEngine.Engine:UpdateStep ()
 #11  (Mono JIT Code) FrooxEngine.Engine:RunUpdateLoop ()
 #12  (Mono JIT Code) UnityFrooxEngineRunner.FrooxEngineRunner:UpdateFrooxEngine ()
 #13  (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
 #14 mono_print_method_from_ip
 #15 mono_perfcounter_foreach
 #16 mono_runtime_invoke
 #17 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
 #18 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
 #19 MonoBehaviour::CallUpdateMethod(int)
 #20 void BaseBehaviourManager::CommonUpdate<BehaviourManager>()
 #21 ExecutePlayerLoop(NativePlayerLoopSystem*)
 #22 ExecutePlayerLoop(NativePlayerLoopSystem*)
 #23 PlayerLoop()
 #24 PlayerMain(int, char**)
 #25 __libc_init_first
 #26 __libc_start_main
 #27 _start
Frooxius commented 4 months ago

How many times has this specific issue happened?

We haven't made any changes with rendering or camera textures either in the pre-release, so I don't see how this would happen on pre-release specifically.

coolymike commented 4 months ago

I cannot change the labels, but since the prerelease is going to be rolled out as release in a bit, maybe a good idea to remove the prerelease label, but keep the rest of the issue for tracking, in case it happens again and I get more information on the cause.

Frooxius commented 4 months ago

Removed the label!