Description
Hi,
I think I've discovered a bug in the point picking tool for V3.
I'm trying to make a annotation tool for my point cloud but Unity always crashes.
It works for a while but after a few seconds unity freezes.
A possible guess is that there are too many threads being started?
You can test it by changing the Update function in the 'PointPickerV3' script.
Change the 'Input.GetMouseButtonDown' to 'Input.GetMouseButton'. Then go into play mode and hold the left mouse button down while moving around the point cloud.
After a while Unity should freeze and crash without a crash report screen. In the editor log, this is the last log I get.
CLR: Managed code called FailFast, saying "An exception was not handled in an AsyncLocal notification callback."
(v3) Picked point at :(1.71, 1.54, 2.25)
UnityEngine.Debug:ExtractStackTraceNoAlloc (byte*,int,string)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
PointCloudExtras.PointPickerV3:PointSelected (UnityEngine.Vector3) (at Assets/Project/BIM/features/PointCloudTools/PointCloudViewerDX11/Scripts/Common/dev/PointPickerV3.cs:99)
unitycodercom_PointCloudBinaryViewer.PointCloudViewerTilesDX11:PointCallBack (object) (at Assets/Project/BIM/features/PointCloudTools/PointCloudViewerDX11/Scripts/PointCloudViewerTilesDX11.cs:1931)
UnityLibrary.MainThread/CallInfo:Execute () (at Assets/Project/BIM/features/PointCloudTools/PointCloudViewerDX11/Scripts/Common/MainThread.cs:25)
UnityLibrary.MainThread/d__12:MoveNext () (at Assets/Project/BIM/features/PointCloudTools/PointCloudViewerDX11/Scripts/Common/MainThread.cs:103)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
(Filename: Assets/Project/BIM/features/PointCloudTools/PointCloudViewerDX11/Scripts/Common/dev/PointPickerV3.cs Line: 99)
Unhandled Exception:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.ExecutionContext.OnAsyncLocalContextChanged (System.Threading.ExecutionContext previous, System.Threading.ExecutionContext current) [0x000ce] in :0
I'm not really sure where to start looking but I'll update in case I find something.