Bug 5029 - Find Implementors crashed monodevelop
Summary: Find Implementors crashed monodevelop
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-05-11 07:43 UTC by Alan McGovern
Modified: 2013-07-23 04:10 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 FIXED

Description Alan McGovern 2012-05-11 07:43:50 UTC
I just ran a 'Find Implementors' command and got this crasher:


System.AggregateException: One or more errors occured ---> System.AggregateException:  ---> System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.Projects.Text.TextEncoding.GetEncoding (System.String id) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs:127 
  at MonoDevelop.Projects.Text.TextEncoding.get_ConversionEncodings () [0x000ca] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs:107 
  at MonoDevelop.Projects.Text.TextFile.Read (FilePath fileName, System.String encoding) [0x0011c] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:130 
  at MonoDevelop.Projects.Text.TextFile.Read (FilePath fileName) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:60 
  at MonoDevelop.Projects.Text.TextFile.ReadFile (FilePath fileName) [0x00006] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:66 
  at MonoDevelop.Ide.TextFileProvider.GetTextEditorData (FilePath filePath, System.Boolean& isOpen) [0x00059] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:2030 
  at MonoDevelop.Ide.TextFileProvider.GetTextEditorData (FilePath filePath) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:2018 
  at MonoDevelop.Refactoring.FindDerivedClassesHandler+<FindDerivedClasses>c__AnonStorey20+<FindDerivedClasses>c__AnonStorey21.<>m__2C (MonoDevelop.Projects.Project p) [0x00076] in /Users/alanmcgovern/Projects/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedClassesHandler.cs:78 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey36`1[MonoDevelop.Projects.Project].<>m__3A (MonoDevelop.Projects.Project e, System.Threading.Tasks.ParallelLoopState s, System.Object l) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:425 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey35`2[MonoDevelop.Projects.Project,System.Object].<>m__38 () [0x000db] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:387 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:67 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00028] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Task.cs:477 
  at System.Threading.Tasks.Task.ThreadStart () [0x0006e] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Task.cs:388 
  --- End of inner exception stack trace ---
 --> (Inner exception 0) System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.Projects.Text.TextEncoding.GetEncoding (System.String id) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs:127 
  at MonoDevelop.Projects.Text.TextEncoding.get_ConversionEncodings () [0x000ca] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs:107 
  at MonoDevelop.Projects.Text.TextFile.Read (FilePath fileName, System.String encoding) [0x0011c] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:130 
  at MonoDevelop.Projects.Text.TextFile.Read (FilePath fileName) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:60 
  at MonoDevelop.Projects.Text.TextFile.ReadFile (FilePath fileName) [0x00006] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:66 
  at MonoDevelop.Ide.TextFileProvider.GetTextEditorData (FilePath filePath, System.Boolean& isOpen) [0x00059] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:2030 
  at MonoDevelop.Ide.TextFileProvider.GetTextEditorData (FilePath filePath) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:2018 
  at MonoDevelop.Refactoring.FindDerivedClassesHandler+<FindDerivedClasses>c__AnonStorey20+<FindDerivedClasses>c__AnonStorey21.<>m__2C (MonoDevelop.Projects.Project p) [0x00076] in /Users/alanmcgovern/Projects/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedClassesHandler.cs:78 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey36`1[MonoDevelop.Projects.Project].<>m__3A (MonoDevelop.Projects.Project e, System.Threading.Tasks.ParallelLoopState s, System.Object l) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:425 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey35`2[MonoDevelop.Projects.Project,System.Object].<>m__38 () [0x000db] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:387 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:67 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00028] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Task.cs:477 
  at System.Threading.Tasks.Task.ThreadStart () [0x0006e] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Task.cs:388 

  --- End of inner exception stack trace ---
  at System.Threading.Tasks.Parallel.HandleExceptions (IEnumerable`1 tasks, System.Threading.Tasks.ExternalInfos infos) [0x00068] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:85 
  at System.Threading.Tasks.Parallel.ForEach[Project,Object] (System.Func`2 enumerable, System.Threading.Tasks.ParallelOptions options, System.Func`1 init, System.Func`4 action, System.Action`1 destruct) [0x00121] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:409 
  at System.Threading.Tasks.Parallel.ForEach[Project,Object] (System.Collections.Concurrent.Partitioner`1 source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Func`1 localInit, System.Func`4 body, System.Action`1 localFinally) [0x00022] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:654 
  at System.Threading.Tasks.Parallel.ForEach[Project] (IEnumerable`1 source, System.Action`1 body) [0x00034] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:422 
  at MonoDevelop.Refactoring.FindDerivedClassesHandler+<FindDerivedClasses>c__AnonStorey20.<>m__2B (System.Object ) [0x0003c] in /Users/alanmcgovern/Projects/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedClassesHandler.cs:65 
 --> (Inner exception 0) System.AggregateException:  ---> System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.Projects.Text.TextEncoding.GetEncoding (System.String id) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs:127 
  at MonoDevelop.Projects.Text.TextEncoding.get_ConversionEncodings () [0x000ca] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs:107 
  at MonoDevelop.Projects.Text.TextFile.Read (FilePath fileName, System.String encoding) [0x0011c] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:130 
  at MonoDevelop.Projects.Text.TextFile.Read (FilePath fileName) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:60 
  at MonoDevelop.Projects.Text.TextFile.ReadFile (FilePath fileName) [0x00006] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:66 
  at MonoDevelop.Ide.TextFileProvider.GetTextEditorData (FilePath filePath, System.Boolean& isOpen) [0x00059] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:2030 
  at MonoDevelop.Ide.TextFileProvider.GetTextEditorData (FilePath filePath) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:2018 
  at MonoDevelop.Refactoring.FindDerivedClassesHandler+<FindDerivedClasses>c__AnonStorey20+<FindDerivedClasses>c__AnonStorey21.<>m__2C (MonoDevelop.Projects.Project p) [0x00076] in /Users/alanmcgovern/Projects/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedClassesHandler.cs:78 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey36`1[MonoDevelop.Projects.Project].<>m__3A (MonoDevelop.Projects.Project e, System.Threading.Tasks.ParallelLoopState s, System.Object l) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:425 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey35`2[MonoDevelop.Projects.Project,System.Object].<>m__38 () [0x000db] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:387 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:67 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00028] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Task.cs:477 
  at System.Threading.Tasks.Task.ThreadStart () [0x0006e] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Task.cs:388 
  --- End of inner exception stack trace ---
 --> (Inner exception 0) System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.Projects.Text.TextEncoding.GetEncoding (System.String id) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs:127 
  at MonoDevelop.Projects.Text.TextEncoding.get_ConversionEncodings () [0x000ca] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextEncoding.cs:107 
  at MonoDevelop.Projects.Text.TextFile.Read (FilePath fileName, System.String encoding) [0x0011c] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:130 
  at MonoDevelop.Projects.Text.TextFile.Read (FilePath fileName) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:60 
  at MonoDevelop.Projects.Text.TextFile.ReadFile (FilePath fileName) [0x00006] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs:66 
  at MonoDevelop.Ide.TextFileProvider.GetTextEditorData (FilePath filePath, System.Boolean& isOpen) [0x00059] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:2030 
  at MonoDevelop.Ide.TextFileProvider.GetTextEditorData (FilePath filePath) [0x00000] in /Users/alanmcgovern/Projects/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:2018 
  at MonoDevelop.Refactoring.FindDerivedClassesHandler+<FindDerivedClasses>c__AnonStorey20+<FindDerivedClasses>c__AnonStorey21.<>m__2C (MonoDevelop.Projects.Project p) [0x00076] in /Users/alanmcgovern/Projects/monodevelop/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedClassesHandler.cs:78 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey36`1[MonoDevelop.Projects.Project].<>m__3A (MonoDevelop.Projects.Project e, System.Threading.Tasks.ParallelLoopState s, System.Object l) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:425 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey35`2[MonoDevelop.Projects.Project,System.Object].<>m__38 () [0x000db] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Parallel.cs:387 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:67 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00028] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Task.cs:477 
  at System.Threading.Tasks.Task.ThreadStart () [0x0006e] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.Threading.Tasks/Task.cs:388
Comment 1 Mike Krüger 2012-05-11 07:51:11 UTC
Fixed. This encoding class should be replaced btw.
Comment 2 Mikayla Hutchinson [MSFT] 2012-05-11 14:18:20 UTC
Things like this shouldn't be able to crash MD. Anywhere we're using ThreadPool.QueueUserWorkItem, we should catch exceptions.
Comment 3 Mikayla Hutchinson [MSFT] 2012-05-11 14:20:19 UTC
Also, it should probably be cancellable.
Comment 5 Mike Krüger 2013-07-23 04:10:42 UTC
The TextFile class is no longer in use there.