Crash from Raygun4UWP 1.1.0 SDK
Daniele
Posted on
Jul 30 2024
I embedded Raygun4UWP 1.1.0 into and UWP application (TargetPlatformVersion: 10.0.19041.0) , among crash reports I have this case:
System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at offset 33 in file:line:column <filename unknown>:0:0
__Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Void*) + 0xbe at offset 190 in file:line:column <filename unknown>:0:0 :15732480
__Interop.ForwardComStubs.Stub_3[TThis, TResult](__ComObject, Int32) + 0x37 at offset 55 in file:line:column <filename unknown>:0:0 :16707566
Raygun4UWP.HttpService.UpdateIsInternetAvailable() in E:\GitHub\raygun4uwp\Raygun4UWP\Common\HttpService.cs:69
Raygun4UWP.HttpService.Initialize() in E:\GitHub\raygun4uwp\Raygun4UWP\Common\HttpService.cs:37
Raygun4UWP.RaygunClient.<SendStoredCrashReportsAsync>d__44.MoveNext() in E:\GitHub\raygun4uwp\Raygun4UWP\RaygunClient.cs:350
Throw at offset 33 in file:line:column <filename unknown>:0:0
System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__7_0(Object) + 0x1e at offset 30 in file:line:column <filename unknown>:0:0
Invoke at offset 40 in file:line:column <filename unknown>:0:0
System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() + 0x33 at offset 51 in file:line:column <filename unknown>:0:0
System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at offset 33 in file:line:column <filename unknown>:0:0
__Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xb8 at offset 184 in file:line:column <filename unknown>:0:0 :15732480
__Interop.ForwardComStubs.Stub_11[TThis](__ComObject, Int32) + 0x24 at offset 36 in file:line:column <filename unknown>:0:0 :16707566
Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1()
Throw at offset 33 in file:line:column <filename unknown>:0:0
static $9_Microsoft::AppCenter::Utils::ApplicationLifecycleHelper.<.ctor>b__17_1$catch$0()
Invoke at offset 46 in file:line:column <filename unknown>:0:0
__Interop.Intrinsics.HasThisCall__27[TArg0](Object, IntPtr, Object, TArg0) + 0x36 at offset 54 in file:line:column <filename unknown>:0:0
__Interop.ReverseComStubs.Stub_7<System.__Canon>() in Stub_7:16707566
It seems that app is crashing for some unhandled exception in Raygun SDK, can you have a look at it?
Thanks in advace. Daniele.
Deleted User
Raygun
Posted on
Jul 31 2024
Hi Daniele,
Thanks for reaching out! Can you provide any further set up information to help us replicate this issue please? Is this happening while your application does not have Internet access?
Thanks,
Dr Panos Patros, CPEng, VP of Engineering, Raygun
Daniele
Posted on
Aug 02 2024
Hi Panos, I can't say if the Internet access is available or not. This crash never happened to me, I found it among other crash in the Raygun dashboard.
I can add the the localized exception message is "Επιχειρήθηκε η εκκίνηση μιας περιόδου λειτουργίας σε ένα διακομιστή δικτύου, υπάρχει ήδη υπερβολικός αριθμός περιόδων λειτουργίας σε αυτόν το διακομιστή.", I translated it with google translate: "An attempt was made to start a session on a network server, there are already too many sessions on this server".
Hope this helps, Daniele.
Miguel Beltran
Posted on
Aug 02 2024
Hi Daniele,
As I understand, you did not get this error on your machine, but rather got this reported from another user machine.
I translated it with google translate: "An attempt was made to start a session on a network server, there are already too many sessions on this server".
Thanks, that helps understand the issue.
Seems the exact localized Windows error should be "An attempt was made to establish a session to a network server, but there are already too many sessions established to that server", searching online for it gives some hints.
My understanding is that the call to the Windows.Networking.Connectivity
NetworkInformation.GetConnectionProfiles()
method failed, and that's because there are too many network connections opened on that device.
Is there any other information regarding the machine you could provide? e.g. Windows build version, machine information, etc.
So far, my only advice would be to review the application code for any possible networking objects that are not properly disposed or garbage-collected, as that may lead to this error.
We will discuss internally if there are any possible improvements we can do to avoid this issue.
For the record, I have tested the package in different Windows and Target configurations to see if I could reproduce the issue but I couldn't make it happen:
The machines I have tested this were:
- OS: Windows 11 machine OS build 22000.2538
- OS: Windows 10 on VM OS build 19045.4651
Targets tested:
- Windows 10, version 1903 (10.0; Build 18362)
- Windows 10, version 2004 (10.0; Build 19041) same as you reported
- Windows 11, version 21H2 (11.0; Build: 22000)
Daniele
Posted on
Aug 02 2024
Hi Miguel, I can give you some more answers as this information is included in the Raygun crash event:
- "OSName": "WINDOWS"
- "OSVersion": "10.0.22631.3880"
- "WindowBoundsWidth": 0
- "WindowBoundsHeight": 0,
- "Architecture": "X64",
- "DeviceManufacturer": "Dell Inc.",
- "DeviceName": "Latitude 3510",
- "UtcOffset": 3,
- "Locale": "Ελληνικά"
So far, my only advice would be to review the application code for any possible networking objects that are not properly disposed or garbage-collected, as that may lead to this error.
I think this doesn't depends on application code, but on some UWP platform state. What I can say is that when my application code uses NetworkInformation.GetConnectionProfiles()
is always inside a try/catch
block.
Below the raw data of the crash event, I have removed sensitive information:
{
"MachineName": "removed",
"Version": "removed",
"Error": {
"Data": {
"RestrictedDescription": null,
"RestrictedErrorReference": "RestrictedErrorObject-{B6325BFB-1A4A-5BF0-2AA8-F80FDCDDE864}",
"RestrictedCapabilitySid": null,
"__RestrictedErrorObject": {}
},
"ClassName": "System.Exception",
"Message": "Επιχειρήθηκε η εκκίνηση μιας περιόδου λειτουργίας σε ένα διακομιστή δικτύου, υπάρχει ήδη υπερβολικός αριθμός περιόδων λειτουργίας σε αυτόν το διακομιστή.\r\n",
"StackTrace": [
{
"ClassName": "System.Runtime.InteropServices.McgMarshal",
"FileName": "file:line:column <filename unknown>:0:0\r\n",
"MethodName": "ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at offset 33",
"Raw": "System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at offset 33 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736649162609,
"ImageBase": 140736639729664
},
{
"FileName": "file:line:column <filename unknown>:0:0\r\n",
"ClassName": "__Interop.ComCallHelpers",
"MethodName": "Call(__ComObject, RuntimeTypeHandle, Int32, Void*) + 0xbe at offset 190",
"LineNumber": 15732480,
"RVA": 190,
"Raw": "__Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Void*) + 0xbe at offset 190 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736320183550,
"ImageBase": 140736265388032
},
{
"FileName": "file:line:column <filename unknown>:0:0\r\n",
"ClassName": "__Interop.ForwardComStubs",
"MethodName": "Stub_3[TThis, TResult](__ComObject, Int32) + 0x37 at offset 55",
"LineNumber": 16707566,
"RVA": 55,
"Raw": "__Interop.ForwardComStubs.Stub_3[TThis, TResult](__ComObject, Int32) + 0x37 at offset 55 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736320183255,
"ImageBase": 140736265388032
},
{
"FileName": "E:\\GitHub\\raygun4uwp\\Raygun4UWP\\Common\\HttpService.cs",
"ClassName": "Raygun4UWP.HttpService",
"MethodName": "UpdateIsInternetAvailable()",
"LineNumber": 69,
"RVA": 74,
"Raw": "UpdateIsInternetAvailable at offset 74 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736323167770,
"ImageBase": 140736265388032
},
{
"FileName": "E:\\GitHub\\raygun4uwp\\Raygun4UWP\\Common\\HttpService.cs",
"ClassName": "Raygun4UWP.HttpService",
"MethodName": "Initialize()",
"LineNumber": 37,
"RVA": 284,
"Raw": "Initialize at offset 284 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736323167676,
"ImageBase": 140736265388032
},
{
"FileName": "E:\\GitHub\\raygun4uwp\\Raygun4UWP\\RaygunClient.cs",
"ClassName": "Raygun4UWP.RaygunClient.<SendStoredCrashReportsAsync>d__44",
"MethodName": "MoveNext()",
"LineNumber": 350,
"RVA": 302,
"Raw": "MoveNext at offset 302 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736323158078,
"ImageBase": 140736265388032
},
{
"Raw": "Throw at offset 33 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736648043201,
"ImageBase": 140736639729664
},
{
"ClassName": "System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c",
"FileName": "file:line:column <filename unknown>:0:0\r\n",
"MethodName": "<ThrowAsync>b__7_0(Object) + 0x1e at offset 30",
"Raw": "System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__7_0(Object) + 0x1e at offset 30 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736648808014,
"ImageBase": 140736639729664
},
{
"Raw": "Invoke at offset 40 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736646648984,
"ImageBase": 140736639729664
},
{
"ClassName": "System.Threading.WinRTSynchronizationContext.Invoker",
"FileName": "file:line:column <filename unknown>:0:0\r\n",
"MethodName": "InvokeCore() + 0x33 at offset 51",
"Raw": "System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() + 0x33 at offset 51 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736648680051,
"ImageBase": 140736639729664
},
{
"ClassName": "System.Runtime.InteropServices.McgMarshal",
"FileName": "file:line:column <filename unknown>:0:0\r\n",
"MethodName": "ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at offset 33",
"Raw": "System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at offset 33 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736649162609,
"ImageBase": 140736639729664
},
{
"FileName": "file:line:column <filename unknown>:0:0\r\n",
"ClassName": "__Interop.ComCallHelpers",
"MethodName": "Call(__ComObject, RuntimeTypeHandle, Int32) + 0xb8 at offset 184",
"LineNumber": 15732480,
"RVA": 184,
"Raw": "__Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xb8 at offset 184 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736320182136,
"ImageBase": 140736265388032
},
{
"FileName": "file:line:column <filename unknown>:0:0\r\n",
"ClassName": "__Interop.ForwardComStubs",
"MethodName": "Stub_11[TThis](__ComObject, Int32) + 0x24 at offset 36",
"LineNumber": 16707566,
"RVA": 36,
"Raw": "__Interop.ForwardComStubs.Stub_11[TThis](__ComObject, Int32) + 0x24 at offset 36 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736320181940,
"ImageBase": 140736265388032
},
{
"ClassName": "Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<",
"MethodName": "ctor>b__17_1()",
"RVA": 61,
"Raw": "<.ctor>b__17_1 at offset 61 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736320493693,
"ImageBase": 140736265388032
},
{
"Raw": "Throw at offset 33 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736648043201,
"ImageBase": 140736639729664
},
{
"ClassName": "static $9_Microsoft::AppCenter::Utils::ApplicationLifecycleHelper.<",
"MethodName": "ctor>b__17_1$catch$0()",
"RVA": 48,
"Raw": "<.ctor>b__17_1 at offset 117 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736320493749,
"ImageBase": 140736265388032
},
{
"Raw": "Invoke at offset 46 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736646952526,
"ImageBase": 140736639729664
},
{
"FileName": "file:line:column <filename unknown>:0:0\r\n",
"ClassName": "__Interop.Intrinsics",
"MethodName": "HasThisCall__27[TArg0](Object, IntPtr, Object, TArg0) + 0x36 at offset 54",
"RVA": 54,
"Raw": "__Interop.Intrinsics.HasThisCall__27[TArg0](Object, IntPtr, Object, TArg0) + 0x36 at offset 54 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736323915062,
"ImageBase": 140736265388032
},
{
"FileName": "Stub_7",
"ClassName": "__Interop.ReverseComStubs",
"MethodName": "Stub_7<System.__Canon>()",
"LineNumber": 16707566,
"RVA": 112,
"Raw": "Speedy!<BaseAddress>+0x37d0c90 at offset 112 in file:line:column <filename unknown>:0:0\r\n",
"IP": 140736323914896,
"ImageBase": 140736265388032
}
],
"Images": [
{
"BaseAddress": 140736639729664,
"DebugInfo": [
{
"PdbFileName": "f:\\binaries.amd64ret\\ProjectN\\TestILC\\ExternalFiles\\SharedAssemblyPath\\ret\\Native\\SharedLibrary.pdb",
"Guid": "13c8dcdb-8cde-4ce1-bb43-877b7f8a4034"
}
]
}
]
},
"Environment": {
"OSName": "WINDOWS",
"OSVersion": "10.0.22631.3880",
"WindowBoundsWidth": 0,
"WindowBoundsHeight": 0,
"Architecture": "X64",
"DeviceManufacturer": "Dell Inc.",
"DeviceName": "Latitude 3510",
"UtcOffset": 3,
"Locale": "Ελληνικά"
},
"Client": {
"Name": "Raygun4UWP",
"Version": "1.1.0.0",
"ClientUrl": "https://github.com/MindscapeHQ/raygun4uwp"
},
"User": {
"Identifier": "80434891-f81a-41cd-9832-7aafc10d1177",
"IsAnonymous": true
},
"OccurredOn": "2024-07-29T07:27:18.1122527Z"
}
Miguel Beltran
Posted on
Aug 02 2024
Thanks for the details!
The OS version 10.0.22631.3880 corresponds to a modern Windows 11.
What I can say is that when my application code uses NetworkInformation.GetConnectionProfiles() is always inside a try/catch block.
Indeed, we are considering doing that change as well in the Raygun provider as well and properly handle errors from GetConnectionProfiles()
internally.
May I ask, is this a one time error, or is this issue happening frequently?
Daniele
Posted on
Aug 02 2024
It happened only 10 times to the same user in the same day (2024/07/29) between 09:24 and 09:27. I suppose it is more like a "temporary error" connected to some device/UWP/network state.
I do not consider this a real problem, but avoiding this crash case helps us to be more efficient and concentrate on real application crashes, and the final user does not experience an application crash for a temporary platform state.
I'm glad that you are considering to add the try/catch
block.
Deleted User
Raygun
Posted on
Aug 09 2024
Hi there Daniele,
We believe we have a solution for this and we are planning to make a pre-release early next week for you to try out. Thanks for your patience on this matter!
Deleted User
Raygun
Posted on
Aug 11 2024
Hello Daniel,
We have a release candidate out. Can you doublecheck it is resolving the problem for you please?
https://www.nuget.org/packages/Raygun4UWP/1.1.1-rc.1
Daniele
Posted on
Aug 12 2024
Hello Panos, the issue in not reproducible on our side. It happened in production just few times. I will update Raygun4UWP as soon as you release an official version.
Deleted User
Raygun
Posted on
Aug 12 2024
Hi Daniele,
The full v1.1.1 release is out! Hopefully, this solves the problems in production: https://www.nuget.org/packages/Raygun4UWP/1.1.1
Let us know for further feedback.
Thanks,
Panos
Daniele
Posted on
Aug 13 2024
Hi Panos, I'm going to update asap, thanks for your promptness.
Daniele.