Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Aniobodo opened this issue Jun 5, 2024 · 9 comments
Labels
area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events platform/android 🤖 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@Aniobodo
Copy link

Aniobodo commented Jun 5, 2024

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 Aniobodo added the t/bug Something isn't working label Jun 5, 2024
Copy link
Contributor

github-actions bot commented Jun 5, 2024

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.

@PureWeen PureWeen added area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events s/needs-repro Attach a solution or code which reproduces the issue labels Jun 5, 2024
@PureWeen
Copy link
Member

PureWeen commented Jun 5, 2024

@Aniobodo
Copy link
Author

Aniobodo commented Jun 6, 2024

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

The logging was stopped immediately at the exception.

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Jun 6, 2024
@Aniobodo
Copy link
Author

Aniobodo commented Jun 7, 2024

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

@Aniobodo
Copy link
Author

@PureWeen @jsuarezruiz
What‘s the latest?

@RoiChen001 RoiChen001 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jun 13, 2024
@RoiChen001
Copy link

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

@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jun 13, 2024
@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
@chrisg32
Copy link

Same issue. I can reproduce without the debugger attached.

@Brosten
Copy link

Brosten commented Sep 13, 2024

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

@Aniobodo
Copy link
Author

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

No Workaround found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events platform/android 🤖 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants