xamarin / SignaturePad

MIT License
246 stars 150 forks source link

UWP Crashes when restoring points from a property #112

Open mseamari opened 6 years ago

mseamari commented 6 years ago

When i assign points through the "Points" properties the app crashes with the exception ComTypeMarshalling_MissingInteropData

this happens in UWP Release when you compile the app with the .NET Native Toolchain.

someone else made a post on stackoverflow who has the exact same issue as i do

https://stackoverflow.com/questions/46391416/uwp-app-is-crashing-in-release-mode-when-using-xamarin-controls-signaturepad-for

[Edit 08 jan 2018]

here is a stack trace of the error

   at System.Runtime.InteropServices.__interface_ccw.Allocate(ComCallableObject managedCCW, McgTypeInfo typeInfo) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\ComCallableObject.cs:line 112
   at System.Runtime.InteropServices.ComCallableObject.GetComInterfaceForTypeInfo_NoCheck_NoAddRef(McgTypeInfo typeInfo) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\ComCallableObject.cs:line 1550
   at System.Runtime.InteropServices.ComCallableObject.GetComInterfaceForTypeInfo_NoCheck(McgTypeInfo typeInfo) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\ComCallableObject.cs:line 1574
   at System.Runtime.InteropServices.ComCallableObject.GetComInterfaceForIIDInternal(Guid& iid, McgTypeInfo typeInfo) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\ComCallableObject.cs:line 1523
   at System.Runtime.InteropServices.ComCallableObject.GetComInterfaceForIID(Guid& iid, McgTypeInfo typeInfo) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\ComCallableObject.cs:line 1303
   at System.Runtime.InteropServices.McgComHelpers.ManagedObjectToComInterfaceInternal(Object obj, Guid& iid, McgTypeInfo itfTypeInfo) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\McgComHelpers.cs:line 845
   at System.Runtime.InteropServices.McgComHelpers.ObjectToComInterfaceInternal(Object obj, McgTypeInfo typeInfo) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\McgComHelpers.cs:line 801
   at System.Runtime.InteropServices.McgModuleManager.ObjectToComInterface(Object obj, RuntimeTypeHandle typeHnd) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\McgModuleManager.cs:line 777
   at Windows.UI.Input.Inking.IInkStrokeBuilder2__Impl.StubClass.CreateStrokeFromInkPoints(__ComObject __this, IEnumerable`1 inkPoints, Matrix3x2 transform) in D:\MyApp\obj\x64\Release\ilc\intermediate\MyApp.McgInterop\ImplTypes.g.cs:line 159401
   at Xamarin.Controls.Extensions.<>c__DisplayClass4_0.<AddStrokes>b__1(Point[] s)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() in f:\dd\ndp\fxcore\Open\src\System.Linq\src\System\Linq\Enumerable.cs:line 469
   at System.Runtime.InteropServices.WindowsRuntime.IIteratorOfT_PrivateCCWAdapter`1.MoveNext() in f:\ddSetup\SD\2\setup\msis\x86ret\enu\netfx_ProjectNamd64\TestILC\ExternalFiles\SharedAssemblyPath\ret.intermediate\System.Private.SharedLibrary.Interop.Generated\Adapters.g.cs:line 473
   at System.Runtime.InteropServices.WindowsRuntime.IIteratorOfT_PrivateCCWAdapter`1.get_HasCurrent() in f:\ddSetup\SD\2\setup\msis\x86ret\enu\netfx_ProjectNamd64\TestILC\ExternalFiles\SharedAssemblyPath\ret.intermediate\System.Private.SharedLibrary.Interop.Generated\Adapters.g.cs:line 463
   at McgInterop.Toolbox.IIteratorThunk[T](IIterator`1 it, IIterator_Oper oper, Object& item, Int32 len) in D:\MyApp\obj\x64\Release\ilc\intermediate\MyApp.McgInterop\Helpers.g.cs:line 453
   at System.Runtime.InteropServices.CalliIntrinsics.Call[T](IntPtr pfn, Object iterator, IIterator_Oper oper, Object& data, Int32 len)
   at System.Runtime.InteropServices.SharedCcw_IIterator.get_HasCurrent(IntPtr pComThis, IntPtr pValue) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Interop\src\Shared\McgHelpers.cs:line 1461
   at McgInterop.McgHelpers.ThrowFailed(Int32 hr, RuntimeTypeHandle typeHnd) in D:\MyApp\obj\x64\Release\ilc\intermediate\MyApp.McgInterop\Helpers.g.cs:line 8497
   at McgInterop.ComCallHelpers.ComCall__HRESULT(__ComObject __this, RuntimeTypeHandle __typeHnd, Int32 __targetIndex, Void* arg0) in D:\MyApp\obj\x64\Release\ilc\intermediate\MyApp.McgInterop\SharedStubs.g.cs:line 9431
   at McgInterop.ForwardComSharedStubs.Proc_TArg0__[TThis,TArg0](__ComObject __this, TArg0 dp, Int32 __targetIndex) in D:\MyApp\obj\x64\Release\ilc\intermediate\MyApp.McgInterop\SharedStubs.g.cs:line 290
   at Xamarin.Controls.Extensions.AddStrokes(InkPresenter inkPresenter, IList`1 strokes, Color color, Single width)
   at Xamarin.Controls.SignaturePadCanvasView.LoadPoints(Point[] loadedPoints)
   at SignaturePad.Forms.SignaturePadCanvasRenderer.OnPointsSpecified(Object sender, PointsEventArgs e)
   at SignaturePad.Forms.SignaturePadCanvasView.SetSignaturePoints(IEnumerable`1 points)
mattleibow commented 6 years ago

Is this still happening? I just want to check your versions of SignaturePad and the version of the native compiler so I can test this issue.

mseamari commented 6 years ago

Hi Matthey,

yes the issue is still happening, so far i have tried it on SignaturePad version 2.1.1 and 2.3.0.

i am using Visual Studio 2017 version (15.6.5)


From: Matthew Leibowitz notifications@github.com Sent: Friday, May 18, 2018 08:32 To: xamarin/SignaturePad Cc: mseamari; Author Subject: Re: [xamarin/SignaturePad] UWP Crashes when restoring points from a property (#112)

Is this still happening? I just want to check your versions of SignaturePad and the version of the native compiler so I can test this issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/xamarin/SignaturePad/issues/112#issuecomment-390108540, or mute the threadhttps://github.com/notifications/unsubscribe-auth/APPJczuYoZ6HRnD5BXxrp5v9JnaHwr_Mks5tzmr2gaJpZM4RUITw.

mattleibow commented 6 years ago

Hmm. This is interesting. Could you try the new preview version? https://www.nuget.org/packages/Xamarin.Controls.SignaturePad.Forms/3.0.0-preview-77