Closed v534 closed 8 years ago
I also tried running on a real android device and it crashes in the same situation. I also tried building in release mode and got the error below. If I remove the Urho package from the Android project the error goes away but then it fails when you run the Urho page.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: error XA2006: Reference to metadata item '!!0[] System.Array::Empty()' (defined in 'Urho.Forms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Urho.Forms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. (FormsSample.Droid)
I have the same problem... I can't build FormsSample.Droid project in release mode. I got the error:
Severity Code Description Project File Line Suppression State Error The "LinkAssemblies" task failed unexpectedly. Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item '!!0[] System.Array::Empty()' (defined in 'Urho.Forms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Urho.Forms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve !!0[] System.Array::Empty() at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference) at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction) at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body) at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method) at Mono.Linker.Steps.MarkStep.ProcessQueue() at Mono.Linker.Steps.MarkStep.Process() at Mono.Linker.Steps.MarkStep.Process(LinkContext context) at Mono.Linker.Pipeline.Process(LinkContext context) at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context) at Xamarin.Android.Tasks.LinkAssemblies.Execute() --- End of inner exception stack trace --- at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args) at Xamarin.Android.Tasks.LinkAssemblies.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.
d__26.MoveNext() FormsSample.Droid
Can anyone help me to resolve this issue?
I tried the latest commits again and also still get this compile issue.
I also still get the crash issue when I replace "restartBtn.Clicked += (sender, e) => StartUrhoApp();" in App.cs with "restartBtn.Clicked += (sender, e) => Navigation.PushAsync(new UrhoPage());", and then click a few times on "Restart". Navigating back and forward several times also also crashes, although it seems less easily reproducible now.
@v534 we are working on this issue
@EgorBo thanks for your great work on urho-samples! Any ETA on these 2 issues? It's blocking me from moving forward.
I have the same 2 issues even after the latest update.
@v534 fixed in master, will be available with the next nuget update
I downloaded the latest FormSample files again and updated to the latest UrhoSharp.Forms 1.0.557 and Xamarin.Forms 2.2.0.43, but still have the same issues. Do I need to wait for something further?
ISSUES:
System.ArgumentException: 'jobject' must not be IntPtr.Zero.
Parameter name: jobject
at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod) [0x00010] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:170
at Android.Views.View.get_Context () [0x0002d] in /Users/builder/data/lanes/3236/ee215fc9/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.Views.View.cs:4891
at Urho.Forms.AndroidUrhoSurface+1[TUrhoApplication].MoveNext () [0x0008d] in <filename unknown>:0 at --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 at System.Runtime.CompilerServices.TaskAwaiter
1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3236/ee215fc9/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:372
at FormsSample.UrhoPage+
Visiting different pages each with an UrhoSurface seems to cause a crash after a few times.
For example if you replace "restartBtn.Clicked += (sender, e) => StartUrhoApp();" in App.cs with "restartBtn.Clicked += (sender, e) => Navigation.PushAsync(new UrhoPage());". After clicking a few times on "Restart", there is a crash with the error below. This also happens if you go back and then return to the page again.
Java.Lang.NullPointerException: at --- End of managed exception stack trace --- at java.lang.NullPointerException at at org.libsdl.app.SDLActivity.handleNativeExit(SDLActivity.java:170) at at org.libsdl.app.SDLSurface$1.run(SDLSurface.java:164) at at java.lang.Thread.run(Thread.java:841)