Mirror icon indicating copy to clipboard operation
Mirror copied to clipboard

UnityEditor.ObjectPreview was not disposed properly

Open psociety opened this issue 2 years ago • 2 comments

Describe the bug Since i installed Mirror package (using the Asset Store) I'm getting the following message:

UnityEditor.ObjectPreview was not disposed properly. Make sure that base.Cleanup is called if overriding the Cleanup method. If you are implementing this in an Editor or EditorWindow, don't forget to call ObjectPreview.Cleanup in OnDisable. 0x00007ff7744fe10d (Unity) StackWalker::GetCurrentCallstack 0x00007ff774504e69 (Unity) StackWalker::ShowCallstack 0x00007ff7754709d3 (Unity) GetStacktrace 0x00007ff775b027dd (Unity) DebugStringToFile 0x00007ff77366d172 (Unity) DebugLogHandler_CUSTOM_Internal_Log 0x0000018a23f72343 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object) 0x0000018a23f7225b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) 0x0000018a23f71fa0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object) 0x0000018a23f71e65 (Mono JIT Code) UnityEngine.Debug:LogError (object) 0x0000018a23f71dcb (Mono JIT Code) UnityEditor.ObjectPreview:Finalize () 0x0000018a473c815c (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) 0x00007ffb180af215 (mono-2.0-bdwgc) [gc.c:383] mono_gc_run_finalize 0x00007ffb183279ee (mono-2.0-bdwgc) [finalize.c:1309] GC_invoke_finalizers 0x00007ffb180b0889 (mono-2.0-bdwgc) [gc.c:1036] finalizer_thread 0x00007ffb1804b94b (mono-2.0-bdwgc) [threads.c:1268] start_wrapper_internal 0x00007ffb1804bb26 (mono-2.0-bdwgc) [threads.c:1344] start_wrapper 0x00007ffb96ef7034 (KERNEL32) BaseThreadInitThunk 0x00007ffb989a2651 (ntdll) RtlUserThreadStart

Didn't happen before having Mirror + LS Example : s Trace log seems useless. I don't know how to improve it.

If i search by ObjectPreview i only get the following result: image

[IMPORTANT] How can we reproduce the issue, step by step:

  1. I just start playing and stop playing in Unity Editor

Desktop:

  • OS: Windows
  • Build target: Windows 64b
  • Unity version: 2021.3.3f1
  • Mirror branch: Asset Store

Additional context I also have installed the recommended List example https://github.com/SoftwareGuy/NodeListServer-Example

psociety avatar Jun 13 '22 16:06 psociety

What version of Unity are you getting this issue on? If it's an Alpha or Beta version of Unity, they're not fully supported as per the developers' support policy.

If it's something specific related to the NodeLS Example Browser client project, then that's my own code and not related to Mirror as per se. In that case you'd be better off opening a ticket on my repository.

SoftwareGuy avatar Jun 14 '22 02:06 SoftwareGuy

Hi @SoftwareGuy! Ty for creating NodeListServer!

  • Unity version: 2021.3.3f1 LTS

I don't have Alpha or Beta versions, Unity's "stable" versions are already buggy enough.

image

If it's something specific related to the NodeLS Example Browser client project, then that's my own code and not related to Mirror as per se. In that case you'd be better off opening a ticket on my repository.

I don't think it has anything to do with your project as the only existing reference to ObjectPreview comes from Mirror itself, yet i listed it because "you never know" as the trace that Unity gives is quite useless.

psociety avatar Jun 14 '22 05:06 psociety

@psociety sorry for late reply. does it still happen with Unity 2021.3.9 LTS? we've never seen that error before.

the preview component is basically useless though. we just kept it from the UNET days. either we need to figure out how to reproduce it (any ideas?) or we (or you) could just remove the comp

miwarnec avatar Sep 24 '22 15:09 miwarnec

the preview component is basically useless though. we just kept it from the UNET days. either we need to figure out how to reproduce it (any ideas?) or we (or you) could just remove the comp

By simply installing the package and starting the game on saig unity version i had the error. I ended up removing the only match of ObjectPreview and as nothing broke, i just kept it deleted.

psociety avatar Sep 25 '22 16:09 psociety

Closing per comments above. This is believed to be a Unity issue.

MrGadget1024 avatar Nov 24 '22 10:11 MrGadget1024