PortableExecutableReaderExtensions.GetDebugInformation System.NullReferenceException

jmankin

Posted on
Aug 28 2024

Hi,

I am using a .Net 6.0 web app in debug mode on my localhost. We are using Mindscape.Raygun4Net.AspNetCore 11.1.0. This also occurred on the previous version we had installed 11.0.3. Prior to that, we were using 10.1.1, and I do not get the exception with that package

Here is the stack trace:

>   Mindscape.Raygun4Net.NetCore.Common.dll!Mindscape.Raygun4Net.Diagnostics.PortableExecutableReaderExtensions.GetDebugInformation(System.Reflection.PortableExecutable.PEReader peReader) Line 39 C#
    Mindscape.Raygun4Net.NetCore.Common.dll!Mindscape.Raygun4Net.Diagnostics.PortableExecutableReaderExtensions.TryGetDebugInformation(System.Reflection.PortableExecutable.PEReader peReader, out Mindscape.Raygun4Net.Diagnostics.PEDebugInformation debugInformation) Line 27    C#
    Mindscape.Raygun4Net.NetCore.Common.dll!Mindscape.Raygun4Net.RaygunErrorMessageBuilder.TryGetDebugInformation(string moduleName) Line 216   C#
    Mindscape.Raygun4Net.NetCore.Common.dll!Mindscape.Raygun4Net.RaygunErrorMessageBuilder.BuildStackTrace(System.Diagnostics.StackTrace stackTrace) Line 80    C#
    Mindscape.Raygun4Net.NetCore.Common.dll!Mindscape.Raygun4Net.RaygunErrorMessageBuilder.Build(System.Exception exception) Line 155   C#
    Mindscape.Raygun4Net.NetCore.Common.dll!Mindscape.Raygun4Net.RaygunMessageBuilder.SetExceptionDetails(System.Exception exception) Line 55   C#
    Mindscape.Raygun4Net.NetCore.Common.dll!Mindscape.Raygun4Net.RaygunClientBase.BuildMessage(System.Exception exception, System.Collections.Generic.IList<string> tags, System.Collections.IDictionary userCustomData, Mindscape.Raygun4Net.RaygunIdentifierMessage userInfo, System.Action<Mindscape.Raygun4Net.RaygunMessage> customiseMessage) Line 313    C#
    Mindscape.Raygun4Net.AspNetCore.dll!Mindscape.Raygun4Net.AspNetCore.RaygunClient.SendInBackground(System.Exception exception, System.Collections.Generic.IList<string> tags, Microsoft.AspNetCore.Http.HttpContext context) Line 95 C#
    Mindscape.Raygun4Net.AspNetCore.dll!Mindscape.Raygun4Net.AspNetCore.RaygunMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext) Line 57  C#
    Microsoft.AspNetCore.CookiePolicy.dll!Microsoft.AspNetCore.CookiePolicy.CookiePolicyMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext context)    Unknown
    Microsoft.AspNetCore.Routing.dll!Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext httpContext)   Unknown
    Microsoft.AspNetCore.StaticFiles.dll!Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext context)    Unknown
    Microsoft.AspNetCore.HttpsPolicy.dll!Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext context)  Unknown
    Microsoft.AspNetCore.Diagnostics.dll!Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext context)    Unknown
    Microsoft.AspNetCore.HostFiltering.dll!Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware.Invoke(Microsoft.AspNetCore.Http.HttpContext context) Unknown
    Microsoft.WebTools.BrowserLink.Net.dll!Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.InvokeAsync(Microsoft.AspNetCore.Http.HttpContext context)  Unknown
    [Resuming Async Method] 
    System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)   Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.AsyncStateMachineBox<Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.<InvokeAsync>d__6>.MoveNext(System.Threading.Thread threadPoolThread)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__12_0(System.Action innerContinuation, System.Threading.Tasks.Task innerTask)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining)   Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.RunContinuations(object continuationObject)  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishContinuations()    Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)  Unknown
    Microsoft.WebTools.BrowserLink.Net.dll!Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.GetScriptTag(string requestId, bool isHttps, string hostUrl)    Unknown
    [Resuming Async Method] 
    System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)   Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string>.AsyncStateMachineBox<Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.<GetScriptTag>d__7>.MoveNext(System.Threading.Thread threadPoolThread)  Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__12_0(System.Action innerContinuation, System.Threading.Tasks.Task innerTask)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining)   Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.RunContinuations(object continuationObject)  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishContinuations()    Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)  Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.__Canon>.SetExistingTaskResult(System.Threading.Tasks.Task<System.__Canon> task, System.__Canon result)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.SetResult(System.Net.Http.HttpResponseMessage result)    Unknown
    [Completed] System.Net.Http.dll!System.Net.Http.HttpClient.SendAsync.__Core|83_0(System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationTokenSource cts, bool disposeCts, System.Threading.CancellationTokenSource pendingRequestsCts, System.Threading.CancellationToken originalCancellationToken)   Unknown
    System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)   Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.AsyncStateMachineBox<System.Net.Http.HttpClient.<<SendAsync>g__Core|83_0>d>.MoveNext(System.Threading.Thread threadPoolThread)   Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__12_0(System.Action innerContinuation, System.Threading.Tasks.Task innerTask)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining)   Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.RunContinuations(object continuationObject)  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishContinuations()    Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)  Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.__Canon>.SetExistingTaskResult(System.Threading.Tasks.Task<System.__Canon> task, System.__Canon result)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.SetResult(System.Net.Http.HttpResponseMessage result)   Unknown
    [Completed] System.Net.Http.dll!System.Net.Http.RedirectHandler.SendAsync(System.Net.Http.HttpRequestMessage request, bool async, System.Threading.CancellationToken cancellationToken) Unknown
    System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)   Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.AsyncStateMachineBox<System.Net.Http.RedirectHandler.<SendAsync>d__4>.MoveNext(System.Threading.Thread threadPoolThread) Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__12_0(System.Action innerContinuation, System.Threading.Tasks.Task innerTask)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining)   Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.RunContinuations(object continuationObject)  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishContinuations()    Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)  Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.__Canon>.SetExistingTaskResult(System.Threading.Tasks.Task<System.__Canon> task, System.__Canon result)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.SetResult(System.Net.Http.HttpResponseMessage result)   Unknown
    [Completed] System.Net.Http.dll!System.Net.Http.DiagnosticsHandler.SendAsyncCore(System.Net.Http.HttpRequestMessage request, bool async, System.Threading.CancellationToken cancellationToken)  Unknown
    System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)   Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.AsyncStateMachineBox<System.Net.Http.DiagnosticsHandler.<SendAsyncCore>d__8>.MoveNext(System.Threading.Thread threadPoolThread)  Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__12_0(System.Action innerContinuation, System.Threading.Tasks.Task innerTask)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining)   Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.RunContinuations(object continuationObject)  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishContinuations()    Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)  Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.__Canon>.SetExistingTaskResult(System.Threading.Tasks.Task<System.__Canon> task, System.__Canon result)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.SetResult(System.Net.Http.HttpResponseMessage result)   Unknown
    [Completed] System.Net.Http.dll!System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(System.Net.Http.HttpRequestMessage request, bool async, bool doRequestAuth, System.Threading.CancellationToken cancellationToken)  Unknown
    System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)   Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.AsyncStateMachineBox<System.Net.Http.HttpConnectionPool.<SendWithVersionDetectionAndRetryAsync>d__84>.MoveNext(System.Threading.Thread threadPoolThread) Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__12_0(System.Action innerContinuation, System.Threading.Tasks.Task innerTask)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining)   Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.RunContinuations(object continuationObject)  Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task.FinishContinuations()    Unknown
    System.Private.CoreLib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result)  Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.__Canon>.SetExistingTaskResult(System.Threading.Tasks.Task<System.__Canon> task, System.__Canon result)    Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.SetResult(System.Net.Http.HttpResponseMessage result)    Unknown
    [Completed] System.Net.Http.dll!System.Net.Http.HttpConnection.SendAsyncCore(System.Net.Http.HttpRequestMessage request, bool async, System.Threading.CancellationToken cancellationToken)  Unknown
    System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)   Unknown
    System.Private.CoreLib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<System.Net.Http.HttpResponseMessage>.AsyncStateMachineBox<System.Net.Http.HttpConnection.<SendAsyncCore>d__64>.MoveNext(System.Threading.Thread threadPoolThread) Unknown
    System.Private.CoreLib.dll!System.Threading.ThreadPool..cctor.AnonymousMethod__87_0(object state)   Unknown
    System.Net.Sockets.dll!System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.InvokeContinuation(System.Action<object> continuation, object state, bool forceAsync, bool requiresExecutionContextFlow) Unknown
    System.Net.Sockets.dll!System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs _)   Unknown
    System.Net.Sockets.dll!System.Net.Sockets.SocketAsyncEventArgs.OnCompletedInternal()    Unknown
    System.Net.Sockets.dll!System.Net.Sockets.SocketAsyncEventArgs..cctor.AnonymousMethod__179_0(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped)    Unknown
    System.Private.CoreLib.dll!System.Threading.ThreadPoolBoundHandleOverlapped.CompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped)  Unknown
    System.Private.CoreLib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pNativeOverlapped)  Unknown
    [Async Call Stack]  
    [Async] Microsoft.AspNetCore.Watch.BrowserRefresh.dll!Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware.InvokeAsync(Microsoft.AspNetCore.Http.HttpContext context) Unknown
    [Async] Microsoft.AspNetCore.Server.Kestrel.Core.dll!Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests<Microsoft.AspNetCore.Hosting.HostingApplication.Context>(Microsoft.AspNetCore.Hosting.Server.IHttpApplication<Microsoft.AspNetCore.Hosting.HostingApplication.Context> application)    Unknown
    [Async] Microsoft.AspNetCore.Server.Kestrel.Core.dll!Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequestsAsync<Microsoft.AspNetCore.Hosting.HostingApplication.Context>(Microsoft.AspNetCore.Hosting.Server.IHttpApplication<Microsoft.AspNetCore.Hosting.HostingApplication.Context> application)   Unknown

PHaydon

Raygun

Posted on
Aug 28 2024

Hello

I'll look into this for you, do you have any info you can provide on regards to your setup? asp.net core site on .NET 6? Do you produce pdb files or remove them or something? Any info that could help me reproduce this would be helpful!

Thank you.


jmankin

Posted on
Aug 28 2024

Hi,

Thanks for looking into this. Yes, it is asp.net core site on .NET 6. It does produce pdb files.

Not sure what else would be helpful. Here is a partial copy of our program.cs:

    internal class Program
{
    private static void Main(string[] args)
    {
        var builder = WebApplication.CreateBuilder(args);

        // Add services to the container.
        builder.Services.AddControllersWithViews();
        builder.Services.AddMvc();

        // Setup Raygun
        builder.Services.AddRaygun(builder.Configuration);

        // Setup for SAML
        builder.Services.AddHttpClient();

        // NLog: Setup NLog for Dependency injection
        var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
        builder.Logging.ClearProviders();
        builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
        builder.Host.UseNLog();

        // add authorization and authenticatio
// ...

            // Add Db Context
// ...

            // Other app services
            // ...

            var app = builder.Build();

            // Configure the HTTP request pipeline.
            if (!app.Environment.IsDevelopment())
            {
                app.UseExceptionHandler("/Home/Error");

                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseStaticFiles();

            app.UseRouting();
            app.UseCookiePolicy();
            app.UseRaygun();
            app.UseAuthentication();
            app.UseAuthorization();
            app.MapRazorPages();
            app.MapDefaultControllerRoute();

            app.MapControllerRoute(
                name: "default",
                pattern: "{controller=Home}/{action=Index}/{id?}");

            app.Run();
        }
        catch (Exception exception)
        {
            // NLog: catch setup errors
            logger.Error(exception, "Stopped program because of exception");
            throw new Exception(exception.Message);
        }
        finally
        {
            LogManager.Shutdown();
        }
    }
}

PHaydon

Raygun

Posted on
Aug 28 2024

Hey, thank you, I will try to reproduce the issue and get it resolved.

Phill


PHaydon

Raygun

Posted on
Sep 03 2024

Hello,

I've been unsuccessful in trying to reproduce this, the line where this is being thrown is already in a try/catch so it should discard any exception if it is happening in the event the PDB file is locked, not found, etc.

I tried various combinations of debug symbols / types, deleting the PDB file, etc...

When the exception is thrown how are you capturing it? Are you debugging in your IDE with 'break on all exceptions' enabled?

Thanks, Phill


jmankin

Posted on
Sep 03 2024

Hi Phill,

I attached my Exception Settings.

The "GetDebugInformation" method that is erroring is not wrapped in a try...catch for me:

private static PEDebugInformation GetDebugInformation(this PEReader peReader)
{
    PEDebugInformation debugInfo = new PEDebugInformation
    {
        Timestamp = $"{peReader.PEHeaders.CoffHeader.TimeDateStamp:X8}"
    };
    ImmutableArray<DebugDirectoryEntry>.Enumerator enumerator = peReader.ReadDebugDirectory().GetEnumerator();
    while (enumerator.MoveNext())
    {
        DebugDirectoryEntry entry = enumerator.Current;
        if (entry.Type == DebugDirectoryEntryType.CodeView)
        {
            CodeViewDebugDirectoryData codeViewData = peReader.ReadCodeViewDebugDirectoryData(entry);
            debugInfo.File = codeViewData.Path;
            debugInfo.Signature = codeViewData.Guid.ToString();
        }
        if (entry.Type == DebugDirectoryEntryType.PdbChecksum)
        {
            PdbChecksumDebugDirectoryData checksumEntry = peReader.ReadPdbChecksumDebugDirectoryData(entry);
            string checksumHex = BitConverter.ToString(checksumEntry.Checksum.ToArray()).Replace("-", "").ToUpperInvariant();
            debugInfo.Checksum = checksumEntry.AlgorithmName + ":" + checksumHex;
        }
    }
    return debugInfo;
}

PHaydon

Raygun

Posted on
Sep 03 2024

Hello,

That's the private method, the public one which the client calls is TryGetDebugInformation, which calls GetDebugInformation.

https://github.com/MindscapeHQ/raygun4net/blob/master/Mindscape.Raygun4Net.NetCore.Common/Diagnostics/PortableExecutableReaderExtensions.cs#L29

  public static bool TryGetDebugInformation(this PEReader peReader, out PEDebugInformation? debugInformation)
  {
    try
    {
      debugInformation = GetDebugInformation(peReader);
      return true;
    }
    catch (Exception ex)
    {
      Debug.WriteLine($"Error reading PE Debug Data: {ex}");
    }

    debugInformation = null;
    return false;
  }

In your exception settings, if you expand the Common Language Runtime, I believe System.NullReferenceException is ticked by default, so even if we have a try/catch, it would still break on that exception if it occurred. This assumes the error you're seeing happens while debugging your app?

Is it possible to create a small proof of concept app to reproduce the issue?

Thank you. Phill


jmankin

Posted on
Sep 10 2024

Hi Phil,

Sorry for the delay. Yes, the error happens when debugging the app! And System.NullReferenceException is checked. The error only occurs locally, not in test/prod; so, that would explain it.

Nonetheless, I'm attaching a project that reproduces the issue.


Jasen

Raygun

Posted on
Sep 11 2024

Hi,

Thanks for the sample application.

I've managed to reproduce the exception you are seeing and will be releasing an update for the raygun4net provider soon to prevent it from occurring.

Thanks, Jasen


Jasen

Raygun

Posted on
Sep 12 2024

Hi,

We have now released version 11.1.1 of Raygun4Net which includes a fix for the exception you were seeing.

https://www.nuget.org/packages/Mindscape.Raygun4Net.AspNetCore/11.1.1

Kind regards,

Jasen


jmankin

Posted on
Sep 12 2024

Hi Jasen,

Awesome! Thanks so much.

Take care,

Jen


Reply