[68285 Closed] Value cannot be null

Hi,

When trying to create a new project i get an exception in Visual Studio:

Value cannot be null.
Parameter name: key

I get this if try creating an iOS project or Android. I’ve just tried WPF and that worked ok.

As a bit of background, you provided me with a private build to test a fix for using an Android JAR (TeeChart) which also seemed to include Hydrogene. I have since uninstalled this and then re-installed from the Oxygene download (7.1.73.1515) I don’t know if this is significant.

I’m using the Visual Studio 2012 Shell.

Best regards,

Simon

it could be.normally its safe to downgrade, but this does sound odd. cany reason tou downmgraded? can you try the latest Gamma we just published today?

I uninstalled because when you provided me with a build to test (7.1.72.1496) it included Hydrogene for which i don’t have a licence and so I thought I’d better use the latest release version.

I’ll download the gamma…

Ah, no worries. You’d have been in trial mode got Hydrogene…

Hi,

Downloaded and installed the Gamma but with the same result. When I click ok to create the new solution i get the error. Visual Studio has created the folder and the .sln file but it is empty.

Hi,

Just tried installing Oxygene again with Visual Studio 2013 (7.1.73.1515) and I get the same error (I was previously using VS2012). A fresh install on a virtual machine on my mac works ok.

As I said, I can create a WPF application ok, just not an Android or iOS app.

Thanks, logged as bugs://68285: Value cannot be null

Is there any more information on this? I’ve tried completely uninstalling Oxygene and deleting the RemObjects folder from Program Files (x86). I then re-installed Oxygene and I’ve downloaded my licence file again. Whenever I try and create a new project in Visual Studio 2012 or 2013 then I get

Value cannot be null. Parameter name: key

If I try and open an existing application Visual Studio crashes and restarts. This is proving to be a bit of a pain in the backside at the moment as I want to use my main development machine.

Do you get any crash log in Windows Event Viewer for the crash? If not, do you get offered to try and debug the crash when it happens (and if so, can you say Yes, and then report back the call stack you see when it launches the debugger)?

I also apologize that this issue has not been followed up with since June; this should not have happened. I hope we can resolve this quick, now.

thanx,
marc

If I try and create a new project e.g. Android Application the folder gets created for the new project which contains the project folder (which is empty) and a solution file. Visual Studio then thows up a dialog headed ‘Microsoft Visual Studio’ containing a red warning cross and ‘Value cannot be null. Parameter name: key’. I click OK and am returned to an empty Visual Studio.

If I try and open an existing Android project,the VS window goes white and restarts after checking for a problem I don’t get any option to debug the crash. In the event log is the following .NET Runtime Error:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__0(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at Microsoft.VisualStudio.Shell.Interop.IVsUIDataSource.Invoke(System.String, System.Object, System.Object ByRef)
at Microsoft.Internal.VisualStudio.PlatformUI.DataSource.Invoke(System.String, System.Object, System.Object ByRef)
at Microsoft.VisualStudio.PlatformUI.VsCommand.Execute(System.Object)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)
at System.Windows.Controls.MenuItem.InvokeClickAfterRender(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

Followed by the follwing Application Error:

Faulting application name: devenv.exe, version: 12.0.21005.1, time stamp: 0x524fcb34
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18409, time stamp: 0x53159a86
Exception code: 0xe0434352
Fault offset: 0x0000c42d
Faulting process id: 0x75c
Faulting application start time: 0x01cfbd3a9202af1e
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 1c793a30-292f-11e4-8ddb-3cd92b792ad6

I just installed VS2012 and VS2013 and Oxygene and re-installed OXygene 7.1.75.1557 with VS2013 and it the behaviour is the same.

Edited to add Windows Error Report:

Report - Copy.txt (41.9 KB)

Hello,

We still have problems in reproducing the issue locally. Could you please try to find where exactly the issue happens using next steps:

  1. Start two VS instances.
  2. Attach one VS to another (using Debug => Attach to Process).
  3. Enable breaking on Common Language Runtime Exceptions using Debug => Exceptions => enable the checkbox.
  4. Swith to another VS instance and try to create the new android (or ios) project.
    During creating there might happen several other exceptions (e.g. FileNotFoundException or SocketException) but they do not influence the workability.
    When the Value cannot be null exception occurs please copy the callstack here.

Thanks in advance.

Hello,

Sorry for the delay but I was away on holiday last week. Stack as requested:

    System.ArgumentNullException crossed a native/managed boundary
  HResult=-2147467261
  Message=Value cannot be null.
Parameter name: key
  Source=mscorlib
  ParamName=key
  StackTrace:
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
       at RemObjects.Oxygene.CrossBox.ManagerBase.InitRegistryServers()
       at RemObjects.Oxygene.CrossBox.ManagerBase..ctor()
       at RemObjects.Oxygene.CrossBox.CooperManager..ctor()
       at RemObjects.Oxygene.CrossBox.CooperManager.GetInstance()
       at RemObjects.Oxygene.CrossBox.CooperManager.get_Instance()
       at RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectFactory.CreateProject(Project aProject)
       at RemObjects.VisualStudio.Project.ProjectFactory.PreCreateForOuter(IntPtr outerProjectIUnknown)
       at Microsoft.VisualStudio.Shell.Flavor.FlavoredProjectFactoryBase.Microsoft.VisualStudio.Shell.Flavor.IVsAggregatableProjectFactoryCorrected.PreCreateForOuter(IntPtr outerProjectIUnknown, IntPtr& projectIUnknown)
  InnerException: 

Best regards,

Simon

Hello,

Thank you for the callstack. The bug is fixed, the fix will be available in the next release (or you can use betta build).

Best regards.

bugs://68285 got closed as fixed for release Andromeda Class

Also if you need to continue right now you can try to clear the C:\Users\Viktoria\AppData\Roaming\RemObjects Software\Oxygene\CrossBoxServers.xml file. Open it, find the item that has no name for it, e.g.

<server address="192.168.0.93" port="8721" />

and remove that entry.

Best regards.

Brilliant, that works perfectly.

Thank you,

Simon