maui icon indicating copy to clipboard operation
maui copied to clipboard

xamarin_find_protocol_wrapper_type

Open tnmp83 opened this issue 2 years ago • 15 comments

Description

I had migrate My Project from Xamarin to Maui (net7.0). After release and receive message from crashlytics This is full message from Crashlytics: issues_18426.txt

Crashed: .NET ThreadPool Worker 0 libsystem_kernel.dylib 0x7578 __pthread_kill + 8 1 libsystem_pthread.dylib 0x7118 pthread_kill + 268 2 libsystem_c.dylib 0x1d178 abort + 180 3 MyPro.MAUI 0x4b5ec60 xamarin_find_protocol_wrapper_type + 1194 (runtime.m:1194) 4 MyPro.MAUI 0x4d38478 mono_invoke_unhandled_exception_hook + 1253 (exception.c:1253) 5 MyPro.MAUI 0x4d95cbc start_wrapper_internal + 1223 (threads.c:1223) 6 MyPro.MAUI 0x4d95a08 start_wrapper + 1266 (threads.c:1266) 7 libsystem_pthread.dylib 0x16b8 _pthread_start + 148 8 libsystem_pthread.dylib 0xb88 thread_start + 8

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

7.0.96

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

7.0.96

Affected platforms

iOS

Affected platform versions

iOS 16.6.1, iPhone 14 Pro Max

Did you find any workaround?

No response

Relevant log output

No response

tnmp83 avatar Oct 30 '23 04:10 tnmp83

@rolfbjarne thoughts?

mattleibow avatar Nov 11 '23 12:11 mattleibow

@tnmp83 this will require more information, logs, a repro or a stack trace - or all of it. Please add more information so we can look closer. This appears to be a native crash report because of some sort of exception.

mattleibow avatar Nov 11 '23 12:11 mattleibow

Hi @tnmp83. We have added the "s/needs-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.

ghost avatar Nov 11 '23 12:11 ghost

Hi @tnmp83. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

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.

ghost avatar Nov 11 '23 12:11 ghost

Try adding this to the csproj, it might make the native stack trace a little more helpful:

<PropertyGroup>
    <NoSymbolStrip>true</NoSymbolStrip>
</PropertyGroup>

rolfbjarne avatar Nov 13 '23 07:11 rolfbjarne

Try adding this to the csproj, it might make the native stack trace a little more helpful:

<PropertyGroup>
    <NoSymbolStrip>true</NoSymbolStrip>
</PropertyGroup>

Thanks rolfbjarne I will add this config. Hopefully this error will no longer occur.

tnmp83 avatar Nov 14 '23 07:11 tnmp83

Hello, have any other solution for the issue ? It's a long time from latest comment ~

ThinhKVT avatar Nov 21 '23 03:11 ThinhKVT

We added above config that Mr. Rolfbjarne recommended but result still not good, crash still happen with same frequent. Anyone have other solution for the issue ? Please help us !!!!

ThinhKVT avatar Nov 28 '23 03:11 ThinhKVT

This isn't supposed to fix the crash:

<PropertyGroup>
    <NoSymbolStrip>true</NoSymbolStrip>
</PropertyGroup>

it's supposed to make the crash reports better.

This means you'll have to get and attach any new crash reports so that we can diagnose them.

rolfbjarne avatar Nov 28 '23 06:11 rolfbjarne

Yes. We are trying to get new crash reports.

ThinhKVT avatar Dec 07 '23 09:12 ThinhKVT

We are trying to reproduce the issue again, it may take more time. We will share crash report if happen the issue.

ThinhKVT avatar Dec 08 '23 03:12 ThinhKVT

We can not re-produce the issue again on IOS, it may be re-produced by end-user only. We need more time to get support. Anyone have any solution ?

ThinhKVT avatar Dec 18 '23 09:12 ThinhKVT

One idea would be to add event handlers to the exception marshaling events listed here: https://learn.microsoft.com/en-us/xamarin/ios/platform/exception-marshaling, and then use some sort of telemetry to collect those exceptions from your customer's devices.

You could also do the same for the AppDomain.UnhandledException event to ensure no fatal events escape you.

rolfbjarne avatar Dec 18 '23 10:12 rolfbjarne

Thank you @rolfbjarne . I appreciated your suggestion, we will try it, too.

ThinhKVT avatar Dec 25 '23 03:12 ThinhKVT

We added event handlers as your suggestion. But the issue is only on PROD, so it may take more time to get feedback from customer. Let us wait new information.

ThinhKVT avatar Jan 04 '24 08:01 ThinhKVT

Closing for now. Open a new issue if you get additional details

PureWeen avatar May 31 '24 17:05 PureWeen