-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
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:
- Create a test Xamarin Forms project containing a UWP project
- Install the SocketLite Nuget package in the Portable and UWP Projects
- Add code to the portable implementation to start a TcpSocketListener.
- Switch to release mode ('Compile with .NET Native tool chain' setting is on by default) and start the app => exception is thrown on
CreateObservableListener - Uncheck 'Compile with .NET Native tool chain' setting and redeploy the app => no exception
Versions used:
- SocketLite: 5.0.1
- Microsoft.NetCore.UniversalWindowsPlatform: 6.1.7
- System.Reactive...: 4.0.0
- Xamarin.Forms: 3.1.0.637273
- Portable projects using Net Standard 2.0
