Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-348

System.IndexOutOfRangeException when StackFrameLevel is greater then StackFrames length

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.11
    • 1.2.12
    • Other
    • Windows 7, .Net Framework 4, MS Visual C# 2010 Express, hardware and operating system platform x64, application platform x86

    Description

      In file src\Layout\Pattern\StackTracePatternConverter.cs (lines 108-114) is:

      108: if (stackFrameIndex > stackframes.Length)
      109:

      { 110: stackFrameIndex--; 111: continue; 112: }

      113:
      114: StackFrame stackFrame = stackframes[stackFrameIndex];

      Exception is trown in line 114. To solve that problem please change line 108 to:
      108: if (stackFrameIndex >= stackframes.Length)

      Attachments

        1. StackTracePatternConverter.cs.patch
          0.4 kB
          Daniel Pająk

        Activity

          People

            nachbarslumpi Dominik Psenner
            pajak.daniel@gmail.com Daniel Pająk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 6h
                6h
                Remaining:
                Remaining Estimate - 6h
                6h
                Logged:
                Time Spent - Not Specified
                Not Specified