-
Notifications
You must be signed in to change notification settings - Fork 515
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
Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application in Xamarin.iOS #3399
Comments
^ it looks like you're trying to access a non secure resource, e.g. Apple started to disallow this, by default, a few years back. Try this with an |
Hi @spouliot , I tried to download Regards, |
That's weird because you should not be seeing the message you pasted. Anyway the best way to solve this is to attach a self-contained test case to this issue so we're able to duplicate the same crash (just by running the test case and see if crash). There's a lot of moving pieces in networking code and duplicating results can often be hard (timing, servers, protocols...). |
Hi @spouliot , Sorry for inconvenience. I tried to download Please find sample Xamarin iOS project with single download which using both http://files2.syncfusion.com/Downloads/BackgroundSample.zip Please check it and give your valuable suggestion. |
Hi @spouliot , I am struck on this for a week. Please give your valuable suggestion on this. Regards, |
Hi @spouliot , Is this Xamarin issue or not?. Please suggest any workaround for this if it is Xamarin issue or give any other suggestion to implement my process . I have already attached sample source in previous conversation itself. Please help me on this. Regards, |
@mandel-macaque can you please have a look at the attached sample ? thanks! |
Hi @spouliot / @mandel-macaque , Could you please update any on this? Regards, |
@Cheranarasu looking at the issue, will get back to you with more information ASAP. |
I have taken a look at the issue and the problem is not related to Xamarin but on how you are using the API. I have modified a little your code here to get you application to run and download several images asynchronously using the OS because you wanted to use a background session. The tasks are started in the background when Resume is called: var urls = new string[] { ApoloDownloadUrlString, RulesDownloadUrlString, SampleDownloadUrlString, XamarinDownloadUrlString };
foreach(var u in urls) {
using(var url = NSUrl.FromString(u)) {
var t = session.CreateDownloadTask(url);
t.Resume();
}
} So there is no need to use a ThredPool, await or any of the .net constructs. Something similar can be achieved with the Async methods, but those will be controlled by the app and will not use a background session. |
Thanks for your update. I thought you may misunderstood my concept. I have to download three file in a single click with background process too and maintain a three file download progress into single progress bar (Put calculation to progress by receiving byte divided by total byte of three file). If we do like above, download couldn't wait for another and also one file completed then download completed event triggers. Because of this only, try to use I have achieved this by WebClient Code Snippet:
Also three file downloaded source updated in it. Please find source below and check it. 2018-02-21 14:27:10.905 SimpleBackgroundTransfer[323:47059] Xamarin.iOS: IDE Port: 10000 Transport: USB 2018-02-21 14:27:21.676 SimpleBackgroundTransfer[323:47098] critical:
|
Hi @mandel-macaque , I have updated comment on this. Could you please reopen this issue and check it?. Please ping sample for Regards, |
@Cheranarasu I am not reopening the bug because there is no issue in the platform. The problem you have is that you are not an expert with the API and due to that you are getting a crash. This is not the right channel to request help with this kind of issues, I recommend the following: Nevertheless, here you have a sample code that will do the following:
The requests are done in parallel and the progress bar will be updated correctly. If you want to perform the downloads one after the other, you have to add logic so that,
Again, please do not use github issues to request support when you have issues understanding the API and use the forums or stack overflow for that kind of questions, this channel is just for bug reports which is not this case. |
I also have this problem, also download PDF files. bind the Objective-C API
call bind the Objective-C API
Crash output
Environment
|
Steps to Reproduce
I tried to download pdf format file using NSUrlSession and shown progress in UI.
Code Snippet:
Get download progress using following NSUrlSessionDwonloadDelegate:
Code to setup delegate and the delegate code itself:
It works fine but need to download three format file with single button click and also show progress of all format file download in a single progress control.
For this I have used CreateDownloadTaskAsync process as below,
await session.CreateDownloadTaskAsync(request, out downloadTask);
Following error comes in Xamarin.iOS:
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
If removed CreateDownloadTaskAsync process, it works fine. Please help me to resolve this.
Expected Behavior
Actual Behavior
Environment
=== Visual Studio Community 2017 for Mac ===
Version 7.2.2 (build 7)
Installation UUID: bb05f286-5b1f-48ab-b0d5-bc61d62b54cb
Runtime:
Mono 5.4.1.6 (2017-06/1f4613aa1ac) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Not Installed
=== Xamarin Inspector ===
Not Installed
=== Apple Developer Tools ===
Xcode 8.3.2 (12175)
Build 8E2002
=== Xamarin.iOS ===
Version: 11.2.0.11 (Visual Studio Community)
Hash: 2f8bbec
Branch: d15-4-xi
Build date: 2017-10-05 20:56:05-0400
=== Xamarin.Mac ===
Version: 3.8.1.0 (Visual Studio Community)
=== Build Information ===
Release ID: 702020007
Git revision: 2236098c68f51eeb447cb947a87371d1e84f6213
Build date: 2017-10-23 11:43:05-04
Xamarin addins: eaa605cf97f25ce184949f32c712b465ca96f665
Build lane: monodevelop-lion-d15-4
=== Operating System ===
Mac OS X 10.12.4
Darwin 16.5.0 Darwin Kernel Version 16.5.0
Fri Mar 3 16:52:33 PST 2017
root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
Build Logs
Example Project (If Possible)
The text was updated successfully, but these errors were encountered: