-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Connectivity NETWORK_CAPABILITIES_CHANGED causing SIGSEGV Segfault? #25446
Comments
@jonathanpeppers does this ring any bells? |
It looks to me like Java (Android OS) is throwing this exception:
Can you make a quick sample using It's possible something needs to be changed in MAUI essentials here, but I'm not sure we have enough info to know yet. |
I'm also experiencing the Segfault error as recorded by Sentry. However, I'm not using the |
…nectivity essentials plugin as per dotnet/maui#25446
@PureWeen in reply to your questions...
I've added it to my test project that I created to find out why Application.Current.Windows would reset to an empty list. It simply registers and listens to the connectivity event, with a binding to overlay a panel to indicate when there's no internet. https://github.com/RobbiewOnline/MauiAppWindowTest I've run it on a simulator in release mode and toggled wifi without issue, so I'm not sure yet whether I need to put it through a Google Play approval (so it's tested on more devices). Judging by Sentry it crashes, but it's not all the time.
As per Sentry for my Beta application... Armor X7 Pro, Pixel 8, Honor X7, Pixel 6 Pro and others, across all Android versions. |
This issue has been verified using Visual Studio 17.12 Preview 5(9.0.0-rc.2.24503.2). Not repro this issue on android emulator(Pixel 8 & Pixel 6 Pro ) and Android device(Google & SM) platform. Debugging was successful, no Exception was detected and no crash. |
Okay, will do - I will schedule this for Wednesday (to pull in DotNet 9 official) and then hopefully release to Google Play. Sentry does show that it has since regressed (it's come back in the last version deployed), so it's still an issue in DotNet 9 RC2, hopefully fixed in DotNet 9 released yesterday. Kind Regards, Rob. |
I note the s/try-latest-version tag has been removed, does this mean it's not expected to be fixed? |
Hmm, that was the bot... Not sure if it was supposed to do that. |
Not supposed to add or remove the tag? 🤣 |
Yea, I think the bot just removes it if you add a comment. |
Hi @RobbiewOnline. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
We're getting this same error on both .NET 8 and .NET 9. Only occurs on Release builds we've put into Google Play Console for test builds. As per the OP I'm also using Sentry, the crash report doesn't give much:
The app stays up for about 10 to 15 seconds, then crashes with the segfault. Sounds like some kind of polling routine checking for network connectivity, despite the fact our app doesn't use any network features whatsoever. EDIT:
It seems something in Maui is sensitive to certain OS level events being raised. |
This isn't complete; bad bot. |
Description
There's not much to go on here, except sentry.io capturing a segfault early in the application startup on numerous devices (Armor X7 Pro, Pixel 8, Honor X7, Pixel 6 Pro and others, across all Android versions.
The app is generally running okay, so it seems there's some network event causing it to be triggered which is making it hard to capture.
Steps to Reproduce
There's none of the usual sentry.io tracking for my app present, so it seems to crash early during the app lifecycle, always just after capturing a network event NETWORK_CAPABILITIES_CHANGED
I am using the MAUI Essentials, primarily the Connectivity.ConnectivityChanged event.
I don't know whether it's related, but I have also noticed previously that registering as a listener sometimes fails too on some devices, because I've witnessed crashes when registering the line marked
<<<<<<
The error was
As far as I know essentials should be doing this behind the scenes anyway? For example in the obj folder I do see manifests with
Like I say, I'm not sure whether that's related or not to the crashes.
Link to public reproduction project repository
No response
Version with bug
9.0.0-rc.2.24503.2
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
No response
Affected platforms
Android
Affected platform versions
Armor X7 Pro, Pixel 8, Honor X7, Pixel 6 Pro and others, across all Android versions.
Did you find any workaround?
None - its a segfault that kills the app
Relevant log output
No response
The text was updated successfully, but these errors were encountered: