-
Notifications
You must be signed in to change notification settings - Fork 533
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
Random NullReference and InvalidCast crashes in mono class libraries #1188
Comments
/cc @brendanzagaeski could Mono part of the problem be addressed by your latest fix |
Hmm. These look a bit different. I quickly checked to see how unobserved exceptions from Tasks look on Xamarin.Android. As it turns out, exception telemetry coming from the |
@brendanzagaeski, @marek-safar: Related: Issue #1144.
Not quite; the presence of For example, consider Android calling an [Activity]
partial class BadExample : Activity {
protected override void OnCreate(Bundle bundle) {
throw new InvalidOperationException("Bwa-ha-ha-ha");
}
} In the above, we'll have a Java stack frame calling
When Unfortunately (Issue #1144) we neglected to "unwrap" the |
@Belorus wrote:
Xamarin.Android doesn't support Boehm. You're already using SGen -- it's the only GC that Xamarin.Android supports.
How are you collecting those stack traces? They seem oddly truncated, in that I would expect more than two calling frames. Maybe even the Java-side stack trace? |
@jonpryor Via HockeyApp SDK 4.1.5 |
@Belorus: I don't recognize that interface. :-( I can only assume it's a web UI to some crash reporter, which means I need to ask what the crash reporter is, how it works, and (most importantly) where is the rest of the stack trace? :-/ |
I can only assume I need to spend more time on reading comprehension, as you said it was "HockeyApp SDK 4.1.5". Doh! Unfortunately that doesn't immediately answer the "how does it work", though a bit of spelunking suggests that The possible answer to "where is the rest of the stack trace" is probably "< insert gnashing of teeth here >" ^H^H^H I mean "They use
At present, Which isn't particularly helpful. |
Today i saw the winner (https://snag.gy/9R6ewZ.jpg):
We have realtime logs on client devices, there i saw the following (Still truncated, although received not via HockeyApp):
In code it looks like (simplified):
Looks like exception that we get in event handler is already very lets say... consise. |
I'm not exactly sure why, but this is using the legacy TLS stack, which is no longer supported and will soon be deleted. Looking over your stack traces:
I am very confused about these stack traces and don't really understand what's happening here. If this is related to TLS at all, then we should try to at least use BTLS on Android. Testing with the new web stack (once it gets integrated into Android) would be helpful as well. Let me know if there's anything I can help you with - at the moment, I'm not sure what I could possibly do because I just don't understand what's happening. |
@baulig Issue isn't in C# implementation of TLS. Issue is in runtime or GC, or bridge. In app version with native TLS we have huge amount of nullref crashes as well. But in other places. |
Is there any way to downgrade Xamarin Andoid to 7.4 inside VS2017? |
@Belorus the msi is only installing for VS2015. There is no easy way to downgrade an installed package in VS2017 AFAIK. I may be wrong, though. |
I'm not sure if it will be helpful for this particular scenario (Xamarin.Android 7.1.0.43 might be too old for what you need), but for reference, Visual Studio 2017 version 15.0 is available from the Downloads section of my.VisualStudio.com to align with the Visual Studio servicing guidelines. (Related: Installing an earlier release of Visual Studio 2017.) |
Hi, sorry for necroposting, but are there any updates regarding this? We are still experiencing this issue with the crashes around TLS, even thought we've updated Xamarin and VS since then: Android SDK Tools 1.16 Here is a few of the crashes:
|
Would anyone be able to comment if this issue is solved in .NET 6 Android projects? Thanks! |
Hi @Belorus. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. 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. |
Hi @Belorus. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you. |
Steps to Reproduce
We have a big game that communicates with server via HTTP.
GCBridge - default, it is tarjan in this XA version.
Actual Behavior
Most of the crashes come from SSL/TLS stack, but List.Add, Dictionary.Add also crash for some users, but 50 times less often.
Crashes on Androids:
An so on.
Version Information
Microsoft Visual Studio Professional 2017
Version 15.5.2
VisualStudio.15.Release/15.5.2+27130.2010
Microsoft .NET Framework
Version 4.7.02053
Installed Version: Professional
Xamarin 4.8.0.753 (6575bd113)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 8.1.0.25 (HEAD/d8c6e504f)
Xamarin.Android Reference Assemblies and MSBuild support.
Other
My naive assumptions is that this is a bug in GC, we'll definitely try SGEN in next release to check that.
Will try new GC bridge as well
The text was updated successfully, but these errors were encountered: