On Unpause (5/5 runs) - StraightLineCast has 0 length array
See original GitHub issueEnvironment
Unity 2020.3.16f1
- Code source: Zinnia
- Code version: 1.40
- Platform version: Android 10 ( API 29) , Pico VR ( old/new Unity SDK)
- 3rd party dependencies: None
Steps to reproduce
- Create simple rig with CameraRigs.TrackedAlias and 2 interactable pointers
- Add Straight Pointers for left/right hand. Make it always visible. Set activations so that the activation event is always processed (pointer is always active)
- Build Android Project and run on Pico
- Launch App
- Press Home button to navigate to Pico Quick System Menu. Wait for few seconds.
- Go back to your app ( continue your app)
- Sometimes it will throw out of boundary exceptions. ( 5/5) tries
This is also reproducible on Quest 1.
Expected behavior
It should have a check for length before using indecies.
Current behavior
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index ?, line 0, in System.ThrowHelper.ThrowArgumentOutOfRangeException ?, line 0, in System.ThrowHelper.ThrowArgumentOutOfRangeException ?, line 0, in System.Collections.Generic.List`1[T].set_Item ?, line 0, in Zinnia.Cast.StraightLineCast.GeneratePoints ?, line 0, in Zinnia.Cast.StraightLineCast.DoCastPoints ?, line 0, in Zinnia.Process.Moment.MomentProcess.ProcessNow ?, line 0, in Zinnia.Process.Moment.MomentProcessor.Process ?, line 0, in UnityEngine.Camera+CameraCallback.Invoke
Briefly describe what is actually happening.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
🎉 This issue has been resolved in version 1.45.0 🎉
The release is available on:
v1.45.0
Your semantic-release bot 📦🚀
@thestonefox found out the cause - public RaycastHit? TargetHit - is not being cleared on disable.