Bug 59189 - native call xamarin.ios c# action
Summary: native call xamarin.ios c# action
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll (show other bugs)
Version: XI 10.12 (d15-3)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-02 05:40 UTC by JesseZhang
Modified: 2017-09-28 13:03 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: No
Last known good build:


Attachments
oc (137.52 KB, image/png)
2017-09-02 05:40 UTC, JesseZhang
Details
binding (228.68 KB, image/png)
2017-09-02 05:41 UTC, JesseZhang
Details
c#impl (121.57 KB, image/png)
2017-09-02 05:42 UTC, JesseZhang
Details
TestDemo (2.62 MB, application/zip)
2017-09-08 06:30 UTC, JesseZhang
Details

Description JesseZhang 2017-09-02 05:40:57 UTC
Created attachment 24527 [details]
oc

2017-09-02 13:31:54.776 Kwy.Demo.iOS[64760:7835596] critical: Stacktrace:

2017-09-02 13:31:54.776 Kwy.Demo.iOS[64760:7835596] critical:   at <unknown> <0xffffffff>
2017-09-02 13:31:54.777 Kwy.Demo.iOS[64760:7835596] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) [0x0005c] in <d5a258578a6941c88634929b51cc6ce5>:0
2017-09-02 13:31:54.777 Kwy.Demo.iOS[64760:7835596] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/src/UIKit/UIApplication.cs:79
2017-09-02 13:31:54.777 Kwy.Demo.iOS[64760:7835596] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/src/UIKit/UIApplication.cs:63
2017-09-02 13:31:54.777 Kwy.Demo.iOS[64760:7835596] critical:   at Kwy.Demo.iOS.Application.Main (string[]) [0x00002] in /Users/jessezhang/Projects/Kwy/Kwy.Demo.iOS/Main.cs:15
2017-09-02 13:31:54.777 Kwy.Demo.iOS[64760:7835596] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <880c1aaa744840939855ccf2caa02286>:0
2017-09-02 13:31:54.777 Kwy.Demo.iOS[64760:7835596] critical: 
Native stacktrace:

2017-09-02 13:31:54.786 Kwy.Demo.iOS[64760:7835596] critical: 	0   Kwy.Demo.iOS                0x000000010d80e4a4 mono_handle_native_crash + 244
2017-09-02 13:31:54.786 Kwy.Demo.iOS[64760:7835596] critical: 	1   Kwy.Demo.iOS                0x000000010d81a5a0 mono_sigsegv_signal_handler + 288
2017-09-02 13:31:54.786 Kwy.Demo.iOS[64760:7835596] critical: 	2   libsystem_platform.dylib            0x000000011a251b3a _sigtramp + 26
2017-09-02 13:31:54.786 Kwy.Demo.iOS[64760:7835596] critical: 	3   ???                                 0x0000000000000001 0x0 + 1
2017-09-02 13:31:54.786 Kwy.Demo.iOS[64760:7835596] critical: 	4   Kwy.Demo.iOS                0x000000010d9b4416 xamarin_get_delegate_for_block_parameter + 102
2017-09-02 13:31:54.787 Kwy.Demo.iOS[64760:7835596] critical: 	5   Kwy.Demo.iOS                0x000000010d9b746c xamarin_invoke_trampoline + 2412
2017-09-02 13:31:54.787 Kwy.Demo.iOS[64760:7835596] critical: 	6   Kwy.Demo.iOS                0x000000010d9bf13d xamarin_arch_trampoline + 189
2017-09-02 13:31:54.787 Kwy.Demo.iOS[64760:7835596] critical: 	7   Kwy.Demo.iOS                0x000000010d9c0501 xamarin_x86_64_common_trampoline + 110
2017-09-02 13:31:54.787 Kwy.Demo.iOS[64760:7835596] critical: 	8   CoreFoundation                      0x0000000118815c6c __invoking___ + 140
2017-09-02 13:31:54.787 Kwy.Demo.iOS[64760:7835596] critical: 	9   CoreFoundation                      0x0000000118815b40 -[NSInvocation invoke] + 320
2017-09-02 13:31:54.788 Kwy.Demo.iOS[64760:7835596] critical: 	10  Foundation                          0x0000000110b0ffd1 __NSThreadPerformPerform + 334
2017-09-02 13:31:54.788 Kwy.Demo.iOS[64760:7835596] critical: 	11  CoreFoundation                      0x0000000118833c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
2017-09-02 13:31:54.788 Kwy.Demo.iOS[64760:7835596] critical: 	12  CoreFoundation                      0x00000001188190cf __CFRunLoopDoSources0 + 527
2017-09-02 13:31:54.788 Kwy.Demo.iOS[64760:7835596] critical: 	13  CoreFoundation                      0x00000001188185ff __CFRunLoopRun + 911
2017-09-02 13:31:54.788 Kwy.Demo.iOS[64760:7835596] critical: 	14  CoreFoundation                      0x0000000118818016 CFRunLoopRunSpecific + 406
2017-09-02 13:31:54.789 Kwy.Demo.iOS[64760:7835596] critical: 	15  GraphicsServices                    0x000000011a45fa24 GSEventRunModal + 62
2017-09-02 13:31:54.789 Kwy.Demo.iOS[64760:7835596] critical: 	16  UIKit                               0x000000010e3b1134 UIApplicationMain + 159
2017-09-02 13:31:54.789 Kwy.Demo.iOS[64760:7835596] critical: 	17  ???                                 0x0000000130e40254 0x0 + 5115216468
2017-09-02 13:31:54.789 Kwy.Demo.iOS[64760:7835596] critical: 	18  ???                                 0x0000000130e3fe8d 0x0 + 5115215501
2017-09-02 13:31:54.789 Kwy.Demo.iOS[64760:7835596] critical: 
=================================================================
Comment 1 JesseZhang 2017-09-02 05:41:49 UTC
Created attachment 24528 [details]
binding
Comment 2 JesseZhang 2017-09-02 05:42:35 UTC
Created attachment 24529 [details]
c#impl
Comment 3 JesseZhang 2017-09-02 05:44:17 UTC
oc calls c# to Protocol the protocol crash!
Comment 4 Vincent Dondain [MSFT] 2017-09-04 02:13:14 UTC
Please include your full build logs, crash reports (if any), test case (to reproduce) and all version information.

To get full build logs just set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build
- On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run

On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.

Easiest way to get exact version information:
- On Visual Studio for Mac: "Visual Studio" menu, "About Visual Studio" item, "Show Details" button.
- On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item.
Then copy/paste the version information (you can use the "Copy Information" button).
Comment 5 JesseZhang 2017-09-04 09:59:27 UTC
Visual Studio Community 2017 for Mac
Version 7.1 (build 1297)
Installation UUID: aef15dec-698d-4165-afef-8c0154fae71e
Runtime:
	Mono 5.2.0.215 (d15-3/da80840) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000215

NuGet
版本: 4.3.0.2418

.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	2.0.0
	1.1.2
	1.0.5
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Versions:
	2.0.0
	1.0.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

Xamarin.Profiler
'/Applications/Xamarin Profiler.app' not found

Apple Developer Tools
Xcode 8.3.3 (12175.1)
Build 8E3004b

Xamarin.Android
版本: 7.4.0.19 (Visual Studio Community)
Android SDK: /Users/jessezhang/Documents/xamarin/android-sdk-macosx
	受支持的 Android 版本:
		2.3   (API 级别 10)
		4.0.3 (API 级别 15)
		4.1   (API 级别 16)
		4.2   (API 级别 17)
		4.3   (API 级别 18)
		4.4   (API 级别 19)
		5.0   (API 级别 21)
		5.1   (API 级别 22)
		6.0   (API 级别 23)
		7.0   (API 级别 24)
		7.1   (API 级别 25)

SDK 工具版本: 25.2.5
SDK 平台工具版本: 25.0.4
SDK 生成工具版本: 25.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL 代码在此处提供:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Inspector
Not Installed

Xamarin.iOS
Version: 10.12.0.18 (Visual Studio Community)
Hash: 4a279c9a
Branch: d15-3
Build date: 2017-08-02 12:38:11-0400

Xamarin.Mac
Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

Build Information
Release ID: 701001297
Git revision: 9c5299666538b2f8baf501418a5c064d784d64da
Build date: 2017-08-07 11:29:35-04
Xamarin addins: 3bb0c32a14f1b7e368bf5ac53a84c3581c019391
Build lane: monodevelop-lion-d15-3

Operating System
Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 6 Vincent Dondain [MSFT] 2017-09-07 21:43:38 UTC
Hi,

Do you have a small test case (binding project + ObjC) so we can easily reproduce the issue?

Also please include your full build log following the instructions above.

Thanks.
Comment 8 JesseZhang 2017-09-08 06:32:10 UTC
thanks you, please use iphone x86_64 simulator!
Comment 9 Vincent Dondain [MSFT] 2017-09-08 17:55:16 UTC
Hi,

I can confirm the issue with the test case provided in Comment 7 and the following environment: https://gist.github.com/VincentDondain/7e509c848f8e76e20c21f8bf5ba375c2

This does not look like a regression (tried with XI 10.10.0.36).
Comment 10 JesseZhang 2017-09-09 03:28:11 UTC
ok,thanks,did you find the problem?
Comment 11 JesseZhang 2017-09-27 05:51:20 UTC
???
Comment 12 Vincent Dondain [MSFT] 2017-09-27 20:07:12 UTC
We have not had the opportunity to revisit this bug report, it is in our queue and we will get back to you.

Xamarin.iOS and Xamarin.Mac are open source projects. Asking the broader developer community could help to find a workaround or get others interested in fixing the issue.

You can post question on Stack Overflow [0] or the Xamarin Forums [1][2].

[0] https://stackoverflow.com/questions/tagged/xamarin
[1] https://forums.xamarin.com/categories/ios
[2] https://forums.xamarin.com/categories/mac

In case it might also be a helpful reference, you can find some general recommendations on the best places to ask various kinds of questions about Xamarin on:

https://developer.xamarin.com/guides/cross-platform/troubleshooting/support-options/
Comment 13 JesseZhang 2017-09-28 13:03:14 UTC
oh,thks!
only you can solve, test cases I have uploaded

Note You need to log in before you can comment on or make changes to this bug.