-
Notifications
You must be signed in to change notification settings - Fork 260
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
SIGABRT after UnknownHostException #229
Comments
Hmm getting the same exception.... Been trying to hunt down random app crashes that started happening about a month ago after a Xamarin upgrade and finally was able to boil it down to this one as well... I took a tombstone file and did an NDK-STACK against it and came up with what I pasted below... I'm a bit new to using ndk-stack so hopefully I did it correctly :-/ It's odd because I setup an empty project with ModernHttpclient and it works fine when the network is disconnected but on my main project it crashes... I removed ModernHttpclient completely from my main project and now it's not crashing at all.. Still trying to track down the difference between the fresh project and my own to see why one works with Modern and the other doesn't
|
I opened an issue in Xamarin's bugtracker, because this error only appears in Xamarin cycle 8. https://bugzilla.xamarin.com/show_bug.cgi?id=45003 Downgrading to latest cycle 7 (Xamarin.VisualStudio_4.1.2.18.msi in my case) fixed the problem. I'm not sure that someone from ModernHttpClient can do much about it. |
Yea I saw that and the response of NEEDINFO :-/ That's what I was trying to create a sample for but so far I haven't been successful.. I think the issue might more be with OkHttp but that's just a wild guess... The only way I've been able to sort of simulate the issue is if I create lots of overlapping requests if the network is disconnected So just kicking off a bunch of these
If I'm connected to wifi or I don't use Modern then it just trucks along. But if I disconnect from my network eventually I get things like this...
or this
For now I've removed Modern and we are seeing no more app crashes. Unfortunately Modern currently can't be compiled against the latest Mono so not sure if something else more sinister has also fallen out of sync The version you said is working for you has Mono Framework 4.4 where as the versions after have 4.6 ... There were some changes to TLS in 4.6 Not sure if that relates :-) |
I'm currently on vacation and had no chance to supply something for We need to use mordern, because of the lack of TLS 1.2 support in the Mono When I'm back I'll try to run some tests in my environment. 2016-10-07 21:17 GMT+02:00 Shane Neuville [email protected]:
|
Aw ok It looks like recent mono has brought TLS 1.2 to the table http://www.mono-project.com/docs/about-mono/releases/4.6.0/ And through android you can use to Get TLS 1.2 |
Hey ! I found why we have crash when okhttp throw exception : When an exception occurs, it is set on the task. Then this exception is catch here : And when accessing the Java exception, it fails with sigsev. I think the Java collector collected the exception and we are accessing a part of the memory that we souldn't. What I did ; I'm gonna put my version on a fork and provide a nuget package |
Hotfix branch https://github.com/Youscribe/ModernHttpClient/tree/hotfix/cycle8-issue Nupkg is attached (rename to .nupkg) |
I'm so sick of xamarin :'( |
I confirm that this fix solves a number of random crashes I experienced in my app. A network exception thrown by modern would eventually crash the app somewhere else. Any chance somebody can merge the fix? |
I also am experiencing this problem. I am using VS Xamarin 4.2.1.64.. |
Youscribe hotfix branch seems to address the crashes. Development of ModernHttpClient seems to be pretty stagnant. Is anybody going to merge the branch with the source? |
Xamarin does some things really well... but the added level and number of poorly maintained projects/bindings is really sad. Thanks @kYann for this fix, I'm trying now and hoping it fixes my issue. Hopefully it will be merged into this soon? |
+1. I'd really like to see this being merged as well. The solution is seemingly quite simple and straight forward. Unfortunately, we can not downgrade to Cycle 7, as others have suggested, as we depend on Android Nougat (SDK 24) as our Target Platform which consequently requires Cycle 8. Does anyone who are involved in this ticket know who we need to reach out to before this issue retrieves some attention? |
We are using this fork, where a patch is implemented.
See:
#229 (comment)
2017-02-15 11:27 GMT+01:00 David Laundav <[email protected]>:
… +1. I'd really like to see this being merged as well. The solution is
seemingly quite simple and straight forward.
Unfortunately, we can not downgrade to Cycle 7, as others have suggested,
as we depend on Android Nougat (SDK 24) as our Target Platform which
consequently requires Cycle 8.
Does anyone who are involved in this ticket know who we need to reach out
to before this issue retrieves some attention?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#229 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIjcxKUxJVUdwk-ymTDfjaSMJnkXdO4ks5rctL2gaJpZM4KKG4z>
.
|
This is unfortunately not a viable solution for us either due to maintainability. We have to use official resources (i.e. the NuGet Package Manager) as we're shipping an application which is utilised by million of users. Does anyone know when an official update will be provided through the NuGet Package Manager? |
After making an http a call while network is disconnected, I get an UnknownHostException (which can be catched). Now turning on wifi and making the second call results in a app crash, which cannot be catched.
09-29 16:53:42.741: W/dalvikvm(14941): Invalid indirect reference 0xa2590e20 in decodeIndirectRef 09-29 16:53:42.741: I/dalvikvm(14941): "OkHttp https://*****/token" prio=5 tid=14 RUNNABLE 09-29 16:53:42.741: I/dalvikvm(14941): | group="main" sCount=0 dsCount=0 obj=0xb30f97f8 self=0xb8ff6130 09-29 16:53:42.741: I/dalvikvm(14941): | sysTid=15173 nice=0 sched=0/0 cgrp=apps handle=-1179120768 09-29 16:53:42.741: I/dalvikvm(14941): | state=R schedstat=( 49673122 22762814 2813 ) utm=4 stm=0 core=0 09-29 16:53:42.741: I/dalvikvm(14941): at md595f4b8ab717b9da13f11267a86077f20.AwaitableOkHttp_OkTaskCallback.monodroidAddReference(AwaitableOkHttp_OkTaskCallback.java:-1) 09-29 16:53:42.741: I/dalvikvm(14941): at md595f4b8ab717b9da13f11267a86077f20.AwaitableOkHttp_OkTaskCallback.n_onResponse(Native Method) 09-29 16:53:42.741: I/dalvikvm(14941): at md595f4b8ab717b9da13f11267a86077f20.AwaitableOkHttp_OkTaskCallback.onResponse(AwaitableOkHttp_OkTaskCallback.java:39) 09-29 16:53:42.741: I/dalvikvm(14941): at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:168) 09-29 16:53:42.741: I/dalvikvm(14941): at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) 09-29 16:53:42.741: I/dalvikvm(14941): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 09-29 16:53:42.741: I/dalvikvm(14941): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 09-29 16:53:42.741: I/dalvikvm(14941): at java.lang.Thread.run(Thread.java:841) 09-29 16:53:42.741: E/dalvikvm(14941): VM aborting 09-29 16:53:42.741: A/libc(14941): Fatal signal 6 (SIGABRT) at 0x00003a5d (code=-6), thread 15173 (OkHttp Dispatch)
The text was updated successfully, but these errors were encountered: