Search Issue Tracker
Fixed in 2020.1.X
Votes
2
Found in
2018.3.0a1
2018.4.0f1
2019.1.0a1
2019.1.3f1
2019.2.0a1
2019.3.0a1
Issue ID
1157345
Regression
Yes
"Cannot access a disposed object" exception when processing requests simultaneously with a specified timeout
Steps to reproduce:
1. Open user-supplied project ("BugReport.zip")
2. Run Scene "SampleScene"
Expected: no error is thrown
Actual: error is thrown after a couple of seconds
Reproduced in: 2018.3.0a1, 2018.4.2f1, 2019.1.4f1, 2019.2.0b5, 2019.3.0a5
Not reproduced in: 2017.4.29f1
Note:
Full error:
Uncatchable thread exception: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'MobileAuthenticatedStream'.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <1f0c1ef1ad524c38bbc5536809c46b48>:0
at Mono.Net.Security.MobileAuthenticatedStream+<StartOperation>d__58.MoveNext () [0x001bf] in <c9226b2f33b7421e85bb391f94075e49>:0
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'MobileAuthenticatedStream'.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <1f0c1ef1ad524c38bbc5536809c46b48>:0
at Mono.Net.Security.MobileAuthenticatedStream+<StartOperation>d__58.MoveNext () [0x001bf] in <c9226b2f33b7421e85bb391f94075e49>:0 <---
UnityEngine.Debug:Log(Object)
Test:LastExceptionHandler(Exception, String) (at Assets/Test.cs:55)
Test:<Start>b__0_0(Object, UnobservedTaskExceptionEventArgs) (at Assets/Test.cs:15)
System.Threading.Tasks.TaskExceptionHolder:Finalize()
Comments (2)
-
ismaelmolu
Mar 17, 2023 08:54
In unity LTS 2021.3.8 happens as well
-
valsidalf
Nov 17, 2020 14:53
Please, do you plan to fix this issue also in the latest LTS release 2019.4?
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Buttons in the Overlay Menu in the Scene View are all gray even if they're activated when Game View is maximized and minimized
- NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
- Editor crashes on PrepareSpriteTilingData when exiting Play mode
Resolution Note (fix version 2020.1):
Fix ObjectDisposedException that may occur when using HttpWebRequest.