Log4net
  1. Log4net
  2. LOG4NET-348

System.IndexOutOfRangeException when StackFrameLevel is greater then StackFrames length

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.11
    • Fix Version/s: 1.2.12
    • Component/s: Other
    • Environment:
      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)

        Activity

        Daniel Pająk created issue -
        Hide
        Daniel Pająk added a comment -

        Patch to file src\Layout\Pattern\StackTracePatternConverter.cs

        Show
        Daniel Pająk added a comment - Patch to file src\Layout\Pattern\StackTracePatternConverter.cs
        Daniel Pająk made changes -
        Field Original Value New Value
        Attachment StackTracePatternConverter.cs.patch [ 12537627 ]
        Dominik Psenner made changes -
        Assignee Dominik Psenner [ nachbarslumpi ]
        Dominik Psenner made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Dominik Psenner added a comment -

        Commited as revision 1364911. Many thanks for the fix!

        Show
        Dominik Psenner added a comment - Commited as revision 1364911. Many thanks for the fix!
        Dominik Psenner made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 1.2.12 [ 12318546 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Dominik Psenner
            Reporter:
            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

                Development