Bug 18355 - Bug Search in the big file
Summary: Bug Search in the big file
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 4.2.3
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2014-03-13 11:10 UTC by Alain
Modified: 2014-03-14 07:51 UTC (History)
2 users (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 NOT_REPRODUCIBLE

Description Alain 2014-03-13 11:10:27 UTC
Hi,

I do a search in a large file (Medinect.cs) and I get the following error:


System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.OutOfMemoryException: Out of memory
  at (wrapper managed-to-native) object:__icall_wrapper_mono_gc_alloc_vector (intptr,intptr,intptr)
  at (wrapper alloc) object:AllocVector (intptr,intptr)
  at Mono.TextEditor.GapBuffer.GetTextAt (Int32 offset, Int32 count) [0x0005c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/GapBuffer.cs:96 
  at Mono.TextEditor.GapBuffer.get_Text () [0x00009] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/GapBuffer.cs:73 
  at Mono.TextEditor.TextDocument.get_Text () [0x00007] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs:193 
  at Mono.TextEditor.TextEditor.get_Text () [0x00007] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs:933 
  at Mono.TextEditor.TextViewMargin.RefreshSearchMarker () [0x00099] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs:240 
  at Mono.TextEditor.TextViewMargin.HandleSearchChanged (System.Object sender, System.EventArgs args) [0x00002] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs:331 
  at Mono.TextEditor.TextEditorData.OnSearchChanged (System.EventArgs args) [0x00014] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs:984 
  at Mono.TextEditor.TextEditorData.<get_SearchRequest>m__0 (System.Object , System.EventArgs ) [0x00007] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs:996 
  at (wrapper delegate-invoke) <Module>:invoke_void__this___object_EventArgs (object,System.EventArgs)
  at Mono.TextEditor.SearchRequest.OnChanged () [0x00018] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/SearchRequest.cs:99 
  at Mono.TextEditor.SearchRequest.set_SearchPattern (System.String value) [0x0001b] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/SearchRequest.cs:55 
  at Mono.TextEditor.TextArea.set_SearchPattern (System.String value) [0x00029] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs:2195 
  at Mono.TextEditor.TextEditor.set_SearchPattern (System.String value) [0x00008] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs:1039 
  at MonoDevelop.SourceEditor.SearchAndReplaceWidget.SetSearchPattern (System.String searchPattern) [0x00001] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchAndReplaceWidget.cs:826 
  at MonoDevelop.SourceEditor.SearchAndReplaceWidget+<SearchAndReplaceWidget>c__AnonStorey0.<>m__1 (System.Object , System.EventArgs ) [0x00001] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.2.3-branch/30c4afc3/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SearchAndReplaceWidget.cs:187 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /private/tmp/source/bockbuild-mono-3.2.7-branch/profiles/mono-mac-xamarin/build-root/mono-3.2.7/mcs/class/corlib/System.Reflection/MonoMethod.cs:230 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00069] in /private/tmp/source/bockbuild-mono-3.2.7-branch/profiles/mono-mac-xamarin/build-root/mono-3.2.7/mcs/class/corlib/System.Reflection/MonoMethod.cs:238 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source/bockbuild-mono-3.2.7-branch/profiles/mono-mac-xamarin/build-root/mono-3.2.7/mcs/class/corlib/System.Reflection/MethodBase.cs:114 
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000d5] in /private/tmp/source/bockbuild-mono-3.2.7-branch/profiles/mono-mac-xamarin/build-root/mono-3.2.7/mcs/class/corlib/System/Delegate.cs:424 
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00018] in /private/tmp/source/bockbuild-mono-3.2.7-branch/profiles/mono-mac-xamarin/build-root/mono-3.2.7/mcs/class/corlib/System/MulticastDelegate.cs:70 
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /private/tmp/source/bockbuild-mono-3.2.7-branch/profiles/mono-mac-xamarin/build-root/mono-3.2.7/mcs/class/corlib/System/Delegate.cs:398 
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0 





Version :

=== Xamarin Studio ===

Version 4.2.3 (build 60)
Installation UUID: 3363639e-cfcb-437b-ade7-72fcbb862f16
Runtime:
	Mono 3.2.7 ((no/40f92d5)
	GTK+ 2.24.23 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302070000

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.iOS ===

Version: 7.2.0.2 (Business Edition)
Hash: 58c3efa
Branch: 
Build date: 2014-10-03 18:02:26-0400

=== Xamarin.Android ===

Not Installed

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Build Information ===

Release ID: 402030060
Git revision: 30c4afc300c2a39ec5300851357ce02e49dd217e
Build date: 2014-03-05 22:09:33+0000
Xamarin addins: f8a9589b57c2bfab2ccd73c880e7ad81e3ecf044

=== Operating System ===

Mac OS X 10.9.2

Alain
Comment 1 Udham Singh 2014-03-13 13:54:39 UTC
We have checked this issue but not able to reproduce it.
Could you please provide some steps/sample project/screencast, so than we can reproduce it on our end.
Comment 2 Mike Krüger 2014-03-14 02:04:55 UTC
I can't track an leak inside the search function - that you got an out of memory error there was likely caused by another leak.

We're aware of leaking problems and try to fix them 4.2.4 should be better. But we may need to move away from gtk to be able to really solve that problem.
Comment 3 Alain 2014-03-14 05:23:14 UTC
I think the problem only happens in a large file (Medinect.cs 60000 lines). I never had the problem in small files. 

So after some time of use and research, I often Out of memory and then I'm stuck completely. I do not know recording and I lose all my work
Comment 4 Mike Krüger 2014-03-14 07:51:44 UTC
can you try to split up the file ? It should be better in 4.2.4 but it's atm only released in an early preview for windows and it might be released in april - which is a long time to wait.

Splitting up that file in serveral shoud resolve the issues in 4.2.3