Skip to content
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

Bug report: Android built with VS 2019 16.1 cannot find libxenkoaudio.so when running #460

Closed
slango0513 opened this issue May 29, 2019 · 8 comments
Labels
bug

Comments

@slango0513
Copy link

@slango0513 slango0513 commented May 29, 2019

Release Type:
Official Nuget

Version:
3.1 beta 2

Platform(s):
Android

Describe the bug
Android can be successfully built using Visual Studio 2019 16.1 (after removing armeabi, see #461), but it will throw an error about cannot find libxenkoaudio.so when running.
It works fine with Visual Studio 2019 16.0.x. This issue may be related to:
https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes?view=vs-2019#xamarin

To Reproduce
Steps to reproduce the behavior:

  1. Using VS 2019 Create new Xamarin Android project, add Xenko.Engine nuget.
  2. Abis select only armeabi-v7a.
  3. MainActivity : AndroidXenkoActivity { override void OnCreate { base.OnCreate(savedInstanceState); Game = new MainGame(); Game.Run(); } }
  4. Using VS 2019 16.1 (current newest) build, deploy in physic android machine.
  5. Run game in phone.

Expected behavior
Crash.

Screenshots
See below.

@slango0513 slango0513 added the bug label May 29, 2019
@slango0513

This comment has been minimized.

Copy link
Author

@slango0513 slango0513 commented May 29, 2019

批注 2019-05-29 123059

@slango0513 slango0513 changed the title Bug report: Android cannot find libxenkoaudio.so when running. Bug report: Android built with VS 2019 16.1 cannot find libxenkoaudio.so when running May 29, 2019
@xen2 xen2 self-assigned this May 31, 2019
@xen2 xen2 added this to the 3.1 milestone May 31, 2019
@xen2 xen2 removed their assignment May 31, 2019
@xen2 xen2 removed this from the 3.1 milestone May 31, 2019
@xen2 xen2 self-assigned this May 31, 2019
@xen2 xen2 modified the milestone: 3.1 May 31, 2019
@xen2 xen2 removed their assignment May 31, 2019
@xen2

This comment has been minimized.

Copy link
Member

@xen2 xen2 commented Jul 22, 2019

I have latest VS 2019 (16.1.6)

I have tried the following:

  1. Create new Android project
  2. Added Xenko.Engine nuget
  3. Only armeabi-v7a
  4. Add following code to activity:
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            var ae = new AudioEngine();
        }

It seems to work OK.
In the .apk, I could see lib/armeabi-v7a/libxenkoaudio.so (and a bunch of other .so files). Do you see them?

Log:

07-22 14:37:16.689 D/Mono    (17791): DllImport loaded library 'libxenkoaudio.so'.
07-22 14:37:16.689 D/Mono    (17791): DllImport searching in: 'libxenkoaudio' ('libxenkoaudio.so').
07-22 14:37:16.689 D/Mono    (17791): Searching for 'xnAudioInit'.
07-22 14:37:16.689 D/Mono    (17791): Probing 'xnAudioInit'.
07-22 14:37:16.689 D/Mono    (17791): Found as 'xnAudioInit'.
@rahuldmistry

This comment has been minimized.

Copy link

@rahuldmistry rahuldmistry commented Jul 22, 2019

I added a comment on the same in Discord chat for this same issue, but didn't get any response. May be all busy I suppose. Android built app fails instantly after launch due to exception related to libxenkoaudio not found for VS2019 16.1.x , Xenko 3.1.627 for arm64/armeabi-v8 architectures.

I am new to Xenko and liked the engine. But need it to get working on Android to see its overall performance before developing some serious project.

@xen2

This comment has been minimized.

Copy link
Member

@xen2 xen2 commented Jul 22, 2019

Thanks for your answer.
Here are the currently shipped runtimes:

arm64-v8a
armeabi-v7a
x86
x86_64

Were you refering to arm64-v8a or something else by arm64/armeabi-v8?

@rahuldmistry

This comment has been minimized.

Copy link

@rahuldmistry rahuldmistry commented Jul 22, 2019

Just checked to my VS project. Its arm64-v8a exactly.. :)

@xen2

This comment has been minimized.

Copy link
Member

@xen2 xen2 commented Jul 22, 2019

Gave it a try:

07-22 18:07:41.129 D/Mono    (25609): DllImport error loading library 'libxenkoaudio.so': 'dlopen failed: cannot locate symbol "_Unwind_SetGR" referenced by "/data/app/com.companyname.AndroidApp1-pT-Jjf9tbwSPjLIOI4qO1A==/lib/arm64/libxenkoaudio.so"...'.
07-22 18:07:41.130 D/Mono    (25609): DllImport error loading library 'libxenkoaudio': 'dlopen failed: library "libxenkoaudio" not found'.
07-22 18:07:41.130 W/Mono    (25609): DllImport unable to load library 'dlopen failed: library "libxenkoaudio" not found'.

Seems to be #379 then!

@rahuldmistry

This comment has been minimized.

Copy link

@rahuldmistry rahuldmistry commented Jul 22, 2019

Hey Xen2, ran code at my side again, below are the results of exception:

07-22 22:24:55.692 E/mono    ( 8066): Unhandled Exception:

07-22 22:24:55.692 E/mono    ( 8066): System.TypeInitializationException: The type initializer for 'Xenko.Audio.AudioEngine' threw an exception. ---> System.DllNotFoundException: libxenkoaudio

07-22 22:24:55.692 E/mono    ( 8066):   at (wrapper managed-to-native) Xenko.Audio.AudioLayer.Init()

07-22 22:24:55.692 E/mono    ( 8066):   at Xenko.Audio.AudioEngine..cctor () [0x0000f] in <639cfe5bb9d747288da67f1f0ec3198e>:0 

07-22 22:24:55.692 E/mono    ( 8066):    --- End of inner exception stack trace ---

07-22 22:24:55.692 E/mono    ( 8066):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.10(intptr,intptr,intptr)

07-22 22:24:55.692 E/mono    ( 8066):   at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.10(intptr,intptr,intptr)

07-22 22:24:55.693 E/mono-rt ( 8066): [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Xenko.Audio.AudioEngine' threw an exception. ---> System.DllNotFoundException: libxenkoaudio

07-22 22:24:55.693 E/mono-rt ( 8066):   at (wrapper managed-to-native) Xenko.Audio.AudioLayer.Init()

07-22 22:24:55.693 E/mono-rt ( 8066):   at Xenko.Audio.AudioEngine..cctor () [0x0000f] in <639cfe5bb9d747288da67f1f0ec3198e>:0 

07-22 22:24:55.693 E/mono-rt ( 8066):    --- End of inner exception stack trace ---

07-22 22:24:55.693 E/mono-rt ( 8066):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.10(intptr,intptr,intptr)

07-22 22:24:55.693 E/mono-rt ( 8066):   at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.10(intptr,intptr,intptr)

referenceTable GDEF length=814 1

referenceTable GSUB length=11364 1

referenceTable GPOS length=47302 1

More info:
In Android "Properties", I'm selecting Android Options -> Advanced -> Supported architectures: arm64-v8a

@xen2

This comment has been minimized.

Copy link
Member

@xen2 xen2 commented Jul 22, 2019

Thanks. I have the same error at the end, so it's probably the same issue triggering this (_Unwind_SetGR missing)

xen2 added a commit that referenced this issue Jul 31, 2019
…emove our custom libc++abi (first step for #460 and #379)
@xen2 xen2 closed this in 71e6437 Jul 31, 2019
DaveTheGameDev added a commit to DaveTheGameDev/xenko that referenced this issue Aug 1, 2019
DaveTheGameDev added a commit to DaveTheGameDev/xenko that referenced this issue Aug 1, 2019
…h arm64 due to SLuint32 mapping to long instead of int) (fixes xenko3d#379) (fixes xenko3d#460)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.