Bug 9292 - Crash when adding file to a Portable Library Project Library
Summary: Crash when adding file to a Portable Library Project Library
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2013-01-04 21:24 UTC by Miguel de Icaza [MSFT]
Modified: 2015-08-24 14: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 NOT_REPRODUCIBLE

Description Miguel de Icaza [MSFT] 2013-01-04 21:24:59 UTC
Tried adding a new file to a Portable Library Project, and got this:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at MonoDevelop.Core.Assemblies.TargetFramework.ProfileMatchesPattern (System.String profile, System.String pattern) [0x0002b] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs:156 
  at MonoDevelop.Core.Assemblies.TargetFramework.IsCompatibleWithFramework (MonoDevelop.Core.Assemblies.TargetFrameworkMoniker fxId) [0x00034] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs:168 
  at MonoDevelop.Core.Assemblies.AssemblyContext+<GetPackages>c__Iterator24.MoveNext () [0x000b0] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs:143 
  at MonoDevelop.Core.Assemblies.AssemblyContext+<GetAssemblies>c__Iterator27.MoveNext () [0x00208] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs:196 
  at MonoDevelop.Core.Assemblies.AssemblyContext.GetAssemblyFullName (System.String assemblyName, MonoDevelop.Core.Assemblies.TargetFramework fx) [0x00067] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs:459 
  at MonoDevelop.Core.Assemblies.ComposedAssemblyContext.GetAssemblyFullName (System.String assemblyName, MonoDevelop.Core.Assemblies.TargetFramework fx) [0x00019] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/ComposedAssemblyContext.cs:228 
  at MonoDevelop.Core.Assemblies.ComposedAssemblyContext.GetAssemblyFullName (System.String assemblyName, MonoDevelop.Core.Assemblies.TargetFramework fx) [0x00019] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/ComposedAssemblyContext.cs:228 
  at MonoDevelop.Ide.Templates.SingleFileDescriptionTemplate.SupportsProject (MonoDevelop.Projects.Project project, System.String projectPath) [0x00026] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs:151 
  at MonoDevelop.Ide.Templates.FileTemplate.IsValidForProject (MonoDevelop.Projects.Project project, System.String projectPath) [0x0006a] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/FileTemplate.cs:404 
  at MonoDevelop.Ide.Templates.FileTemplate.GetFileTemplates (MonoDevelop.Projects.Project project, System.String projectPath) [0x0001e] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/FileTemplate.cs:281 
  at MonoDevelop.Ide.Projects.NewFileDialog.InitializeTemplates () [0x00029] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs:268 
  at MonoDevelop.Ide.Projects.NewFileDialog.InitializeDialog (Boolean update) [0x00032] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs:154 
  at MonoDevelop.Ide.Projects.NewFileDialog.InitializeComponents () [0x0040e] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs:655 
  at MonoDevelop.Ide.Projects.NewFileDialog..ctor (MonoDevelop.Projects.Project parentProject, System.String basePath) [0x00067] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs:83 
  at MonoDevelop.Ide.ProjectOperations.CreateProjectFile (MonoDevelop.Projects.Project parentProject, System.String basePath, System.String selectedTemplateId) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:720 
  at MonoDevelop.Ide.ProjectOperations.CreateProjectFile (MonoDevelop.Projects.Project parentProject, System.String basePath) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs:715 
  at MonoDevelop.Ide.Gui.Pads.ProjectPad.FolderCommandHandler.AddNewFileToProject () [0x0001c] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FolderNodeBuilder.cs:401 
  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) [0x0006a] in /private/tmp/source/bockbuild/profiles/mono-mac-release/build-root/mono-2.11/_build/mono-2.11.git/mcs/class/corlib/System.Reflection/MonoMethod.cs:223 
  --- 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) [0x0007f] in /private/tmp/source/bockbuild/profiles/mono-mac-release/build-root/mono-2.11/_build/mono-2.11.git/mcs/class/corlib/System.Reflection/MonoMethod.cs:231 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source/bockbuild/profiles/mono-mac-release/build-root/mono-2.11/_build/mono-2.11.git/mcs/class/corlib/System.Reflection/MethodBase.cs:103 
  at MonoDevelop.Components.Commands.DefaultCommandHandler.Run (System.Object target, MonoDevelop.Components.Commands.Command cmd) [0x00018] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:2017 
  at MonoDevelop.Components.Commands.CustomCommandTargetAttribute.Run (System.Object target, MonoDevelop.Components.Commands.Command cmd) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CustomCommandTargetAttribute.cs:101 
  at MonoDevelop.Ide.Gui.Components.NodeCommandHandler+TransactedNodeHandlerAttribute.Run (System.Object target, MonoDevelop.Components.Commands.Command cmd) [0x00026] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/NodeCommandHandler.cs:274 
  at MonoDevelop.Components.Commands.CustomCommandTargetAttribute.MonoDevelop.Components.Commands.ICommandTargetHandler.Run (System.Object target, MonoDevelop.Components.Commands.Command cmd) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CustomCommandTargetAttribute.cs:58 
  at MonoDevelop.Components.Commands.CommandHandlerInfo.Run (System.Object cmdTarget, MonoDevelop.Components.Commands.Command cmd) [0x00017] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1905 
  at MonoDevelop.Components.Commands.CommandManager+<DispatchCommand>c__AnonStorey70.<>m__BB () [0x0003d] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1045 
  at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x0029e] in /Users/builder/data/lanes/monodevelop-lion-master/747fbbda/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:1062 

To repro, checkout xamarin/CocosSharp, go to revision 93fda6b201c128850bae2cf0a5fa0d09038974c9 and then try to add a new file.
Comment 1 Lluis Sanchez 2015-08-24 14:10:22 UTC
Can't repro with current stable so I guess it was fixed.