maui icon indicating copy to clipboard operation
maui copied to clipboard

ObjectDisposedException (thrown when app is reloaded/resumed from background during debugging): Cannot access a closed Stream

Open Aniobodo opened this issue 1 year ago • 9 comments

Description

System.ObjectDisposedException is thrown when app is reloaded from background. The exception message reads: Cannot access a closed Stream. It appears that the problem only occurs during debugging (with Visual Studio 2022 17.10.1, Windows 11). The app in question is a Xamarin (Android) app migrated to MAUI. The Xamarin app never had this problem. Exception Screenshot 2024-06-05 155601

Steps to Reproduce

Run MAUI app in debug mode using Android device. Click the home button on device to move the app to the background. Now reload the app again by clicking on the app's icon. 2024.06.05 16-39 Build Logs.zip

Link to public reproduction project repository

No response

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

android:targetSdkVersion="34", Windows 11 23H2, .NET SDK 8.0.300 (x64)

Did you find any workaround?

No response

Relevant log output

No response

Aniobodo avatar Jun 05 '24 14:06 Aniobodo

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Jun 05 '24 14:06 github-actions[bot]

Can you attach a logcat file with your crash? https://learn.microsoft.com/en-us/xamarin/android/deploy-test/debugging/android-debug-log?tabs=windows

PureWeen avatar Jun 05 '24 18:06 PureWeen

Logcat file: see attachment. Logcat stopped on exception.txt

The logging was stopped immediately at the exception.

Aniobodo avatar Jun 06 '24 06:06 Aniobodo

@PureWeen @jsuarezruiz Here is the repository for the reproduction: https://github.com/Aniobodo/BeeMobile

Aniobodo avatar Jun 07 '24 13:06 Aniobodo

@PureWeen @jsuarezruiz What‘s the latest?

Aniobodo avatar Jun 10 '24 17:06 Aniobodo

Can repro System.ObjectDisposedException at Android platform on the latest 17.10.2(8.0.40). exception

RoiChen001 avatar Jun 13 '24 09:06 RoiChen001

Same issue. I can reproduce without the debugger attached.

chrisg32 avatar Jul 23 '24 22:07 chrisg32

@Aniobodo: Did you find any solution/workaround? We also see this exception from some of our users...

Brosten avatar Sep 13 '24 13:09 Brosten

@Aniobodo: Did you find any solution/workaround? We also see this exception from some of our users...

No Workaround found

Aniobodo avatar Oct 20 '24 15:10 Aniobodo

We're also seeing this issue in AppCenter / in our production .NET MAUI app. Any update?

alexanderdibenedetto avatar Dec 04 '24 19:12 alexanderdibenedetto

I think it is necessary to register a bug fo Microsoft Maui team. It is a big problem cause turns impossible to manipulate images. This problem brings to me a great problem to concludes an important application.

AdaoPaulino avatar Jan 21 '25 16:01 AdaoPaulino