xenko
xenko copied to clipboard
Android startup error
Hello!
First off, awesome engine!!
Now about the error.
I have loaded the basic sceen, nothing on it, just sphere, camera and the light. Didn't touch the code, it works on Widnows 10, but it doesn't work on android.
When I try to start the sceen on Android I get this error:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'SiliconStudio.Xenko.Audio.AudioEngine' threw an exception.
Stack trace isn't showing anything useful... :
To see anything useful I need this file: Android.Views.ISurfaceHolder.cs , I presume it has something to do with Xamarin, but I can't find that file anywhere.
I get this for output: DebugLog.txt
Android OnCreate methode looks like this:
protected override void OnCreate(Bundle bundle){
base.OnCreate(bundle);
Game = new Game();
Game.Run(GameContext);
}
When I set a breakpoint on the start of the OnCreate() methode, it hits and I can step over until I try to step over Game.Run(GameContext);, then I get the error.
I'm using:
- Visual studio 2015
- Xenko 1.8.1-beta
- Physical device with 5.1 Android ( I tryed starting it on Emulated version from 4.4 - 6 but then I get the driver loading error, I don't think it has something to do with xenko)
- Latest stable version of Xamarin
Hope you fix it soon.
And continue the great work :)
~Ričko
Looks like your device is an x86 device, is that correct?
This is my hw, so no..

Xamarin version numbers? Make sure you are on a recent release please.
Ah latest stable, sorry. Could you try alpha version of Xamarin ? I remember seeing this kind of message (x86 lib folders) at some point.
Tryed it:
- Updated Xamarin to latest Alpha.
- Error1.txt
- Installed Java 1.8.0_101
- Installed JDK 8u101
- Changed NDK folder to C:\Program Files\Android\android-ndk-r12b
- Changed JDK folder to C:\Program Files\Java\jdk1.8.0_101
- Changed JAVA_HOME to C:\Program Files\Java\jdk1.8.0_101
- BuildLog1.txt
- Changed Compile using Android Version from Nuget 7.0 to Lolipop 5.1
- Changed Graphics Profile to Direct3D 10.0/OpenGL ES 3.0
- Still Nothing
- Created New Project
- BuildLog2.txt
- DebugLog1.txt
- Back where I started...
It didn't work :(
If I may suggest something. This is adb to my device landsky.ddnsking.net:55555, so you can just enter adb connect landsky.ddnsking.net:55555 in cmd and debug on my device, so that you can see if the problem is in my environment or in my device.
We might have found something that could cause your issue:
Please try to remove SiliconStudio.Core.Native.dll.config and SiliconStudio.Xenko.Native.dll.config from the Xenko installation folder ( something similar to C:\Program Files\Silicon Studio\Xenko\GamePackages\Xenko.1.8.0-beta\Bin\Android-OpenGLES ).
And delete them as well from your game output folder ( or just create a new game for testing ) and compile. Let me know if this works.
I have 1.8.1-beta installed and in 1.8.0-beta folder I only have Bin\Windows-Direct3D11 folder
- Deleted "(InstallLoc)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLES\SiliconStudio.Core.Native.dll"
- Deleted "(InstallLoc)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLES\SiliconStudio.Core.Native.dll.config"
- Deleted "(NewProject)\Bin"
- Deleted "(NewProject)\Obj"
- Deleted "(NewProject)\NewXenkoTest2.Android\obj"
- Build error: BuildLog1.txt
It's complaining about the files I deleted :(
Don't delete the .dll, just .dll.config please
Also should be in Android-OpenGLES of the latest installed version, 1.8.1 in your case
Sorry, I misread it...
I restored .dll but and deleted dll.config. Now it's building, but still getting the the original error.
Could you make sure you try with the files deleted on a new clean project?
I did this:
- Deleted
SiliconStudio.Core.Native.dll.config - Deleted
SiliconStudio.Xenko.Native.dll.config - Created new project inside of Xenko launcher
- Opened the project in IDE
- Build the project for Android
- Build Succesful: BuildLog1.txt
- Deployed to Device
- On Android Device got error
Unfortunately, NewXenkoTest3 has stopped - Inside Visual studio I didn't get any exeptions thrown, it just stopped debuging, with this DebugLog1.txt <- Stacktrace inside
- Created Class1.txt that extends the SiliconStudio.Xenko.Engine.Game() class to see what breakpoints app will hit
- It hit:
- PrepareContext() - Didn't crash
- OnWindowCreated() - Didn't crash
- Initialize() - Did crash
I guess this is a step forward, it didn't crash in managed code, it crashed in native...
We are going to look at the crash.
In the meantime, could you restore the .dll.config files with the ones attached in the zip file and simply recompile your game and verify that they are indeed in the output folder of your game (Bin\Android\Debug). Let us know if you get the initial failure or the crash when running your game.
On it boss! This is what happened:
- Repoend the project
- Build, deploys, Internal unmanaged native error again
- Restored new dll.config files
- Build Successful with BuildLog2.txt
- It didn't crash while running, but it was throwing errors on other threads, I think... Short vesion of the log:
- DebugLog2Short.txt
- Long vesion has 100k lines of this: DrawError2.txt
- Maybe useful things I noticed:
-
In MyGame class this is call order:
PrepareContext()- no errorOnWindowCreated()- no errorInitialize()- no errorBeginDraw()- Some errors, but no crash - BeginDrawError1.txtBeginRun()- no errorLoadContent()- no errorBeginDraw()- no errorDraw()- error, but no crash - DrawError1.txtBeginDraw()- no errorDraw()- error, but no crash - DrawError2.txt- Last two repeat forever with the same effect, as far as I can tell
-
It doesn't crash at any point
-
There are 10 active threads
-
This are the files you send:
- SiliconStudio.Core.Native.dll.config
<configuration> <dllmap dll="libcore" cpu="x86" target="x86/libcore.so"/> <dllmap dll="libcore" cpu="x86-64" target="x64/libcore.so"/> </configuration>- SiliconStudio.Xenko.Native.dll.config
<configuration> <dllmap dll="libxenko" cpu="x86" target="x86/libxenko.so"/> <dllmap dll="libxenko" cpu="x86-64" target="x64/libxenko.so"/> </configuration> -
This are the files I deleted:
- SiliconStudio.Core.Native.dll.config
<configuration> <dllmap dll="libcore" wordsize="32" target="x86/libcore.so"/> <dllmap dll="libcore" wordsize="64" target="x64/libcore.so"/> </configuration>- SiliconStudio.Xenko.Native.dll.config
<configuration> <dllmap dll="libxenko" wordsize="32" target="x86/libxenko.so"/> <dllmap dll="libxenko" wordsize="64" target="x64/libxenko.so"/> </configuration> -
If I replace your new
dll.configswith olddll.configsand deleteBinandObjfolder I get the original error. -
After Building, Deleting
Bin\Android\Debug foldera few times I can verify that there are nodll.configfiles in that folder -
I swaped the
dll.configfiles a few times and every time I got the expected error -
If I put new
dll.configsinBin\Android\Debugfolder I get native internal unmanaged error, and game crashes -
If I then remove it it's back to endless loop of Draw errors
-
Another step forward, yey :)
Thanks for the detailed report! Could you clarify that:
- If you put the new .dll.config files, you get the crash in the unmanaged part (when setting up the Audio)
- If you remove the .dll.config files, it goes further and infinitely loop in the drawing
?
If the second statement is true, it is strange that yesterday it was crashing in the Audio part as you also did not have the .dll.config files.
Let's see about the infinite error with finding the frame buffer. Could you install the OpenGL extension viewer app (https://play.google.com/store/apps/details?id=com.realtechvr.glview&hl=en) and provide us with the detailed on your version of OpenGL used on this Android device?
These are the cases:
- if there are
new dll.configsin(XenkoInstallFolder)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLESand there aren't anydll.configsin(TestProjectFolder)\Bin\Android\Debugthen I get infinite loop of drawing error - if there are
new dll.configsin(XenkoInstallFolder)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLESandnew dll.configsin(TestProjectFolder)\Bin\Android\Debugthen I get unmanaged error - if there are
new dll.configsin(XenkoInstallFolder)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLESandold dll.configsin(TestProjectFolder)\Bin\Android\Debug- didn't test this case. - if there are
old dll.configsin(XenkoInstallFolder)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLESand there aren't anydll.configsin(TestProjectFolder)\Bin\Android\Debugthen I get original error - if there are
old dll.configsin(XenkoInstallFolder)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLESandnew dll.configsin(TestProjectFolder)\Bin\Android\Debug- didn't test this case - if there are
old dll.configsin(XenkoInstallFolder)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLESandold dll.configsin(TestProjectFolder)\Bin\Android\Debug- didn't test this case - if thete aren't any
dll.configsin(XenkoInstallFolder)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLESand there aren't anydll.configsin(TestProjectFolder)\Bin\Android\Debugthen I get the unmanaged error - if thete aren't any
dll.configsin(XenkoInstallFolder)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLESandnew dll.configsin(TestProjectFolder)\Bin\Android\Debug- didn't test this case - if thete aren't any
dll.configsin(XenkoInstallFolder)\Silicon Studio\Xenko\GamePackages\Xenko.1.8.1-beta\Bin\Android-OpenGLESandold dll.configsin(TestProjectFolder)\Bin\Android\Debug- didn't test this case
Or this:
- new + no = inf loop
- new + old = null
- new + new = unmannaged
- old + no = original
- old + old = null
- old + new = null
- no + no = unmannaged
- no + old = null
- no + new = null
If you think there is need for testing the cases I didn't test, let me know and I'll do my best. And for the app, I installed it, but I'm not sure what do You what me to do with it.
For the App, if you could extract all the information on the OpenGL version that would be great.
Not sure if You wanted this, but it's the only thing I can find: glview-Mali-T720_Android_22.xml.txt
In the scenario of drawing error could you try to run a project that is no more then profile 9.3?
Sorry for the delay... This are results:
Table of errors:
| Graphics profile | Error | Debug log | Loops Draw methode |
|---|---|---|---|
| 9.1 | New error | DebugLog9.1.txt | Yes |
| 9.2 | Same as 9.1 | DebugLog9.2.txt | Yes |
| 9.3 | Same as 9.1 | DebugLog9.3.txt | Yes |
| 10.0 | Original inf loop error | DebugLog10.0.txt | Yes |
| 10.1 | Same as 10.0 | DebugLog10.1.txt | Yes |
| 11.0 | Same as 10.0 | DebugLog11.0.txt | Yes |
| 11.1 | Not supported | DebugLog11.1.txt | No |
| 11.2 | Not supported | DebugLog11.2.txt | No |
I see now why You only wanted the 9.3... But I tested every profile anyway.
Hello!
I don't know if you are still working on this problem, I hope you are...
Anyway I was testing base project on diferent devices, and I managed to make it work on redme note 2, so It's not my enviement that is misbehaving, it's my phone and xenko...
And I managed to take a OpenGl log of redme note, this are results:
| Phone | OpenGlLog | Works |
|---|---|---|
| Redme note 2 | WorkingGL.txt | Yes |
| Acer | NotWorkingGL1.txt | No |
| Some Qualcomm phone | NotWorkingGL2.txt | No |
Dif (Working\Notworking): WorkingMinusNotWorking.txt
It's interesting that phones that can't run the app don't have GL_IMG_* files and the phone that can run the app, has.
Hope it helps :)
Hi, i dont know if this was ever resolved but i seem to be having the same error of "The type initializer for 'SiliconStudio.Xenko.Audio.AudioEngine' threw an exception."
This error is only happening when i run the app on android with CPU architecture arm64-v8a, all other architectures work. Im currently using xenko 1.10.2 beta but i even tried the audio example in xenko 2.1.1.1 and there was the same problem.
Please help