benaadams / Ben.Demystifier

High performance understanding for stack traces (Make error logs more productive)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GetMethod sometimes returns null, causes an exception to be thrown

mitchcapper opened this issue · comments

GetMethod can return null (at least with release builds under UWP in certain cases). There is an Assert that catches this but in release builds this still can cause a crash.

if (!ShowInStackTrace(method) && i < stackFrames.Length - 1)

is the issue, as ShowInStackTrace requires it not to be null. The rest of the code is setup to handle null methods properly (it seems).

I believe the library should avoid throwing exceptions ever, as it is normally used for exception handling.

Will submit a PR.