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()
-
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (fix version 2020.1):
Fix ObjectDisposedException that may occur when using HttpWebRequest.