Open kelly987654 opened 6 years ago
Have you tried with the updated version 5.1.1?
More info I found in the build output from building with 5.0.1:
C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'iphlpapi.dll!GetAdaptersInfo' for method 'System.Int32 SocketLite.Helper.AdapterInfo.GetAdaptersInfo(System.IntPtr, System.Int64)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
I tried updating SocketLite to 5.1.1 along with the required System.Reactive update to 4.1.0, and the build of the UWP app seems to hang indefinitely. I tried with SocketLite 5.1.1 and System.Reactive 4.0.0 and then I still got the same exception behavior as in 5.0.1.
I think System.Reactive 4.1.0 has some significant issues, would it be possible to also revert back to 4.0.0?
Thanks for your help!
If you use v5.0.1 then you will be using System.Reactive 4.0.0. There are not other differences between 5.1.1 and 5.0.1 than the move to System.Reative 4.1.0.
Let me know if this helps?
Also, I'll do some more research on System.Reactive 4.1.0.
Using 5.0.1 avoids the System.Reactive issue, but still has the issue with the exception being thrown at runtime when compiled with NET Native toolchain.
Thanks!
I was able to reproduce the issue in the SocketLite UWP test app run in Release mode with the following modification to MainPage.xaml.cs:
public MainPage()
{
this.InitializeComponent();
Start();
}
public async void Start()
{
var test = new TcpSocketListener();
var temp = await test.CreateObservableListener(8004);
temp.Subscribe(x => { });
}
(Using the 5.0.1 release commit due to the System.Reactive issue)
Issue: I'm attempting to use the SocketLite libraries for a Xamarin Forms UWP application. Everything works fine in the Debug/Release builds of the application with the 'Compile with .NET Native tool chain' setting turned off, but when the setting is turned on, an exception is thrown by the TcpSocketListener on the call to
CreateObservableListener
..NET Native tool chain setting (UWP Project -> Properties -> Build)
Exceptions (unfortunately I don't have a more helpful exception message): Unhandled exception at 0x75D364A1 (combase.dll) in XF.TestApp.UWP.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x15065888, 0x00000001).
Unhandled exception at 0x75C7A2B9 (combase.dll) in XF.TestApp.UWP.exe: Stack cookie instrumentation code detected a stack-based buffer overrun.
Steps to reproduce:
CreateObservableListener
Versions used: