Skip to content

3rd Party library internal invoke native code lead app crash #7532

@jingliancui

Description

@jingliancui

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

Version 17.3.6 Windows Version

Description

.Net6 app Invoke 3rd party lib will lead crash.
Native app didn't crash.

Please take a look at the attachment codes and run them.

Steps to Reproduce

JPushMAUI.zip
1.Unzip the ziped file.
2.Using Android Studio run the app that placed on the native folder with debug mode.
3.Using Visual Studio run the app that placed on the SampleApp folder with debug mode.
4.Native app normal run after occur JPushInterface.init(this); which wrote on MainActivity.java
5.SampleApp crash after occur CN.Jpush.Android.Api.JPushInterface.Init(this); which wrote on MainActivity.cs

Additions info:
Then we should focus on the logcat window on AS and the output window on VS for
[jiguang]
At last the crash are occur from the *.so exception because output window will show a message error like: fatal signal.

Take a look at csproj file because it need ManifestPlaceholder, But I've double checked in obj/Debug/net6.0-android/AndroidManifest.xml, I think all values are correctly set.

Did you find any workaround?

Sorry, I've no idea about that.

Relevant log output

[JIGUANG-JPush] [JPushInterface] action:init - sdkVersion:4.8.4, buildId:225
[JIGUANG-JPush] [AndroidUtil] action:checkValidManifest
[yname.sampleap] Accessing hidden method Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread; (greylist, reflection, allowed)
[yname.sampleap] Accessing hidden field Landroid/app/ActivityThread;->mActivities:Landroid/util/ArrayMap; (greylist, reflection, allowed)
[JIGUANG-JPush] [JPushConstants] found messageReceiverClass :com.companyname.sampleapp.SampleReceiverat com.companyname.sampleapp by getCommonReceiverNames
[JIGUANG-JPush] [AndroidUtil] The fileprovider required for inapp-message is incorrectly configured, please check AndroidManifest.xml
[JIGUANG-JPush] [ActionHelper] doSingleAction: third_init
[libc] Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x40 in tid 32024 (jg_fr_pool_thre), pid 31955 (yname.sampleapp)
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.ViewPager2.dll
Loaded assembly: /data/data/com.companyname.sampleapp/files/.__override__/Xamarin.AndroidX.ViewPager2.dll [External]
[TabLayout] MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.Runtime.dll
Loaded assembly: /data/data/com.companyname.sampleapp/files/.__override__/Xamarin.AndroidX.Lifecycle.Runtime.dll [External]

Metadata

Metadata

Assignees

Labels

Area: Mono RuntimeMono-related issues: BCL bugs, AOT issues, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions