OYIon / LiveSharp

Public repository for the LiveSharp project
96 stars 4 forks source link

LiveSharp 1.6.31 crashes iOS app at launch #102

Open michaelstonis opened 3 years ago

michaelstonis commented 3 years ago

I updated LiveSharp to 1.6.31 and backed by server 1.6.7 and my iOS app crashes at launch with the following error. The livesharp.dashboard.cs file is using the out of the box configuration.

Transport type: LiveSharp.ServerClient.SocketTransport
2020-11-18 11:53:16.224143-0600 MyApp.iOS[82636:6193307] warning: mono_class_from_mono_type_internal: implement me 0x00
2020-11-18 11:53:16.224374-0600 MyApp.iOS[82636:6193307] error: * Assertion: should not be reached at /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mono/metadata/class.c:2082

=================================================================
    Native Crash Reporting
=================================================================
Got a abrt while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
    Native stacktrace:
=================================================================
    0x1047bf845 - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : mono_dump_native_crash_info
    0x1047b3cce - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : mono_handle_native_crash
    0x1047bee5f - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : sigabrt_signal_handler
    0x11771fd7d - /usr/lib/system/libsystem_platform.dylib : _sigtramp
    0x7ffeeb97ba30 - Unknown
    0x117434b94 - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
    0x104a03580 - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : _ZL12log_callbackPKcS0_S0_iPv
    0x1049c71e5 - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : monoeg_g_logv_nofree
    0x1049c736f - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : monoeg_assertion_message
    0x1049c73c7 - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : mono_assertion_message_unreachable
    0x10485ae22 - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : mono_class_from_mono_type_internal
    0x10490669e - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : param_objects_construct
    0x104904544 - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : check_or_construct_handle
    0x104892022 - /Users/mstonis/Library/Developer/CoreSimulator/Devices/07FDDAE4-1A5E-417F-A7F7-9EC96BE9D0EF/data/Containers/Bundle/Application/AAFFB2B8-A9F2-4623-929C-790AF3FDA8D1/MyApp.iOS.app/MyApp.iOS : ves_icall_System_Reflection_MonoMethodInfo_get_parameter_info_raw
    0x14addad3a - Unknown

=================================================================
    Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x1176c7462):0x1176c7452  ff ff c3 90 90 90 b8 48 01 00 02 49 89 ca 0f 05  .......H...I....
0x1176c7462  73 08 48 89 c7 e9 35 a2 ff ff c3 90 90 90 b8 53  s.H...5........S
0x1176c7472  00 00 02 49 89 ca 0f 05 73 08 48 89 c7 e9 1d a2  ...I....s.H.....
0x1176c7482  ff ff c3 90 90 90 b8 83 01 00 02 49 89 ca 0f 05  ...........I....

=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at System.Reflection.MonoMethodInfo:get_parameter_info <0x00099>
      at System.Reflection.MonoMethodInfo:GetParametersInfo <0x0007a>
      at System.Reflection.RuntimeMethodInfo:GetParameters <0x0008a>
      at LiveSharp.Runtime.IL.MethodMetadata:CreateInterceptorOnly <0x00295>
      at LiveSharp.Runtime.Virtual.VirtualAssembly:CreateCallInterceptors <0x0116a>
      at LiveSharp.Runtime.LiveSharpRuntimeProxy:OnMethodCallIntercepted <0x001aa>
      at LiveSharp.XamarinFormsViewModelHandler:Attach <0x0031c>
      at LiveSharp.Runtime.LiveSharpRuntimeProxy:AttachUpdateHandler <0x00503>
      at LiveSharp.Runtime.LiveSharpRuntimeProxy:UseDefaultXamarinFormsHandler <0x0017a>
      at LiveSharp.LiveSharpDashboard:Configure <0x0018c>
      at LiveSharp.Runtime.LiveSharpRuntime:Start <0x00758>
      at MyApp.App:.ctor <0x001c2>
      at MyApp.iOS.AppDelegate:FinishedLaunching <0x004ca>
      at <Module>:runtime_invoke_bool__this___object_object <0x00205>
      at <unknown> <0xffffffff>
      at UIKit.UIApplication:UIApplicationMain <0x00254>
      at UIKit.UIApplication:Main <0x000b2>
      at UIKit.UIApplication:Main <0x00132>
      at MyApp.iOS.Application:Main <0x00092>
      at <Module>:runtime_invoke_void_object <0x00198>
=================================================================
ionoy commented 3 years ago

Hey @michaelstonis

Did you restart Visual Studio after the update? Also, please make sure to do a full rebuild.

streinhard commented 3 years ago

I have the same issue with all Livesharp Versions higher than 1.6.12. The Crash is exactly the same as @michaelstonis stacktrace. I always did a full rebuild for every version. Seems like there is a bug in CreateInterceptorOnly().

ionoy commented 3 years ago

Hey guys!

This issue should be fixed in the latest release. Please try it out!

frinx commented 3 years ago

After experiencing the described issue on Xamarin iOS I updated the nuget to 1.6.52 and used server to 1.7.2. Crash still happens at iOS LoadApplication(new MyApp.FormsApp()), but with this Stracktrace

=================================================================
    Managed Stacktrace:
=================================================================
      at <unknown> <0xffffffff>
      at System.AppDomain:LoadAssemblyRaw <0x00007>
      at System.AppDomain:Load <0x0003b>
      at System.AppDomain:Load <0x0002f>
      at System.AppDomain:Load <0x00023>
      at System.Reflection.Assembly:Load <0x00023>
      at LiveSharp.Runtime.LiveSharpRuntime:LoadExtensions <0x002f7>
      at LiveSharp.Runtime.LiveSharpRuntime:Start <0x003c3>
      at MyApp.FormsApp:.ctor <0x0016b>
      at MyApp.iOS.AppDelegate:FinishedLaunching <0x008bb>
      at System.Object:runtime_invoke_dynamic <0x0010f>
      at <unknown> <0xffffffff>
      at UIKit.UIApplication:UIApplicationMain <0x00007>
      at UIKit.UIApplication:Main <0x0002f>
      at UIKit.UIApplication:Main <0x00043>
      at MyApp.iOS.Application:Main <0x000a3>
      at System.Object:runtime_invoke_dynamic <0x0010f>
=================================================================

Thanks for looking into this.