Gitextensions: [NBug] 0 <= offset < 9631. Parameter name: offset.

Created on 17 Feb 2020  路  3Comments  路  Source: gitextensions/gitextensions

Current behaviour

I simply navigate and search between files in a previous commit (File tree). A new search "Find next" give me this error.

Expected behaviour

Search the text (highlight text and jump to the location)

Steps to reproduce


I don't know how to reproduce now. Previous searches work fine.

Error Details

System.ArgumentOutOfRangeException: 0 <= offset < 9631
Parameter name: offset
Actual value was 75480.
   at ICSharpCode.TextEditor.Document.GapTextBufferStrategy.GetCharAt(Int32 offset)
   at GitUI.TextEditorSearcher.FindNextIn(Int32 offset1, Int32 offset2, Boolean searchBackward)
   at GitUI.TextEditorSearcher.FindNext(Int32 beginAtOffset, Boolean searchBackward, Boolean& loopedAround)
   at GitUI.FindAndReplaceForm.<FindNextAsync>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitUI.FindAndReplaceForm.<btnFindNext_Click>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

Additional information

I simply navigate and search between files in a previous commit (File tree). A new search "Find next" give me this error.

Environment

  • Git Extensions 3.3.1.7897
  • Build 5a97671645532bcedc443bac7b727f40db47cb5c
  • Git 2.19.1.windows.1 (recommended: 2.23.0 or later)
  • Microsoft Windows NT 10.0.17763.0
  • .NET Framework 4.8.4075.0
  • DPI 96dpi (no scaling)
bug reproducible

Most helpful comment

I also ran into this bug today. It specifically happens on Find (selection only) operations.
Steps to reproduce:

  1. Select at least two lines from the file diff view.
  2. Open the find window (should now say selection only).
  3. Search for some text that is not in the selection that was made in step 1. The application will then crash.

Note: The application only crashes when doing a find next/previous. Find all and highlight does not cause a crash.

All 3 comments

I also ran into this bug today. It specifically happens on Find (selection only) operations.
Steps to reproduce:

  1. Select at least two lines from the file diff view.
  2. Open the find window (should now say selection only).
  3. Search for some text that is not in the selection that was made in step 1. The application will then crash.

Note: The application only crashes when doing a find next/previous. Find all and highlight does not cause a crash.

Reproduced

Was this page helpful?
0 / 5 - 0 ratings

Related issues

otbutz picture otbutz  路  3Comments

Kryptos-FR picture Kryptos-FR  路  3Comments

jakebathman picture jakebathman  路  5Comments

andrey-helldar picture andrey-helldar  路  4Comments

takinosaji picture takinosaji  路  3Comments