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
- Getting a deprecated package for JetBrains Rider pop up when opening or creating a project
- [Android] Volume level of the same audio file is different on Samsung Galaxy Tab A8 between 2023.3.0b3 and 2023.3.0b4
- ‘Expected end of value’ warning occurs when a property declaration includes five or more variable references
- Crash on BurstCompilerService::CompileAsync when entering Play mode in a specific scene
- InvalidOperationException when using Game Camera Preview in Scene window with a custom RenderGraph pass
Resolution Note (fix version 2020.1):
Fix ObjectDisposedException that may occur when using HttpWebRequest.