Open DAConsulting opened 2 months ago
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!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
This issue has been verified using latest Visual Studio 17.12.0 Preview 1.0 (8.0.82) & 17.11.2 NET7 7.0.101, Can repro on Android platform
I don't believe this will be a MAUI UI issue, it seems like a runtime bug, @jonathanpeppers What do you think?
Yes, System.Net.NetworkInformation.Ping
, so moving to dotnet/runtime.
Tagging subscribers to this area: @dotnet/ncl See info in area-owners.md if you want to be subscribed.
Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger See info in area-owners.md if you want to be subscribed.
This could be related to https://github.com/dotnet/runtime/issues/97209
Description
Exceptions generated by the system are not "caught" in a release build of an Android MAUI application, IF System.Net.NetworkInformation.Ping is used. Instead, the catch handler is never called and the application abends and quits. Note that it is not necessary for the background thread to be running to cause this issue when the exception occurs. If the background thread was run once, then stopped, the problem will still occur.
Steps to Reproduce
UPDATE!!! It is not necessary to run Ping on a background thread to cause this error. Simply calling Ping once will cause subsequent error handling to fail. So this some sort of bug in Ping.
Link to public reproduction project repository
https://drive.google.com/file/d/1mCSkiVGwSh3aHpwCZXhUb-AvEo4QNttv/view?usp=sharing
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 31 Targeted
Did you find any workaround?
Only workaround is to NOT use the Ping class in the background thread.
Bjuild logs are attached here, since there is no way to upload from "Relevant log output" below.
TestException_Release_Build_Logs.zip
Relevant log output
No response