Bug 1479 - Find-in-Files fails with an Exception
Summary: Find-in-Files fails with an Exception
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.8
Hardware: PC Mac OS
: --- blocker
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-10-13 12:43 UTC by Miguel de Icaza [MSFT]
Modified: 2011-10-18 06:47 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Miguel de Icaza [MSFT] 2011-10-13 12:43:35 UTC
In "Connors" sample, when doing this search:

http://tirania.org/s/fe27393c.png

The search results in this exception:


http://tirania.org/s/e4d9f8a6.png

ERROR [2011-10-13 12:40:31Z]: Error while search
System.ArgumentException: Arg_InsufficientSpace
Parameter name: chars
  at System.Text.UTF8Encoding.InternalGetChars (System.Byte* bytes, Int32 byteCount, System.Char* chars, Int32 charCount, System.UInt32& leftOverBits, System.UInt32& leftOverCount, System.Object provider, System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]& bufferArg, Boolean flush) [0x003a7] in /private/tmp/monobuild/build/BUILD/mono-2.10.5/mcs/class/corlib/System.Text/UTF8Encoding.cs:822 
  at System.Text.UTF8Encoding.InternalGetChars (System.Byte[] bytes, Int32 byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex, System.UInt32& leftOverBits, System.UInt32& leftOverCount, System.Object provider, System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]& bufferArg, Boolean flush) [0x0010b] in /private/tmp/monobuild/build/BUILD/mono-2.10.5/mcs/class/corlib/System.Text/UTF8Encoding.cs:678 
  at System.Text.UTF8Encoding+UTF8Decoder.GetChars (System.Byte[] bytes, Int32 byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex) [0x00004] in /private/tmp/monobuild/build/BUILD/mono-2.10.5/mcs/class/corlib/System.Text/UTF8Encoding.cs:950 
  at System.IO.StreamReader.ReadBuffer () [0x000bf] in /private/tmp/monobuild/build/BUILD/mono-2.10.5/mcs/class/corlib/System.IO/StreamReader.cs:396 
  at System.IO.StreamReader.Read (System.Char[] buffer, Int32 index, Int32 count) [0x00077] in /private/tmp/monobuild/build/BUILD/mono-2.10.5/mcs/class/corlib/System.IO/StreamReader.cs:453 
  at System.IO.StreamReader.ReadToEnd () [0x00040] in /private/tmp/monobuild/build/BUILD/mono-2.10.5/mcs/class/corlib/System.IO/StreamReader.cs:557 
  at MonoDevelop.Ide.FindInFiles.FileProvider.BeginReplace () [0x00015] in /private/tmp/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs:109 
  at MonoDevelop.Ide.FindInFiles.FindReplace+<FindAll>c__IteratorA.MoveNext () [0x0016e] in /private/tmp/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindReplace.cs:94 
  at MonoDevelop.Ide.FindInFiles.FindInFilesDialog.SearchReplace (System.String replacePattern) [0x001d0] in /private/tmp/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs:567 
 
A copy of the Connors solution is in:

files.xamarin.com:~miguel/Connors.zip
Comment 1 Mike Krüger 2011-10-18 06:47:43 UTC
fixed.