Select to view content in your preferred language

NullReferenceException initializing LocalGeometryService

3275
1
03-17-2014 06:47 AM
Labels (1)
DavidMorrison1
Deactivated User
We are having issues deploying to a test machine. Our application uses the 10.2 SDK WPF components and everything works fine on the development system.

However, if we add the "ArcGISRuntime10.2" folder from the deployment builder and execute the application we get a crash Inside the ArcGIS toolkit code as follows:

System.NullReferenceException: Object reference not set to an instance of an object.
   at ESRI.ArcGIS.Client.Local.LocalServer.InitializeDone(Exception error)
   at ESRI.ArcGIS.Client.Local.LocalServer.InitializeInternal()
   at ESRI.ArcGIS.Client.Local.LocalServer.InitializeAsync(Action callback)
   at ESRI.ArcGIS.Client.Local.LocalService.StartServiceInternal(QueryParameters serviceSpecificParams)
   at ESRI.ArcGIS.Client.Local.LocalGeometryService.StartGeometryServiceInternal()
   at ESRI.ArcGIS.Client.Local.LocalGeometryService.StartAsyncImpl()
   at ESRI.ArcGIS.Client.Local.LocalService.StartAsync()
   at ESRI.ArcGIS.Client.Local.LocalGeometryService.StartAsync()
   at ESRI.ArcGIS.Client.Local.LocalGeometryService.GetServiceAsyncInternal(Action`1 callback)
   at ESRI.ArcGIS.Client.Local.LocalGeometryService.GetServiceAsync(Action`1 callback)

Can anyone provide any assistance, we have tried countless things to attempt to fix this, but there is no logs, no intelligent output that would give us clues as to why the ArcGIS components are failing. We have tried 23-bit, 64-bit. No change and same exception. We have tried Basic/Standard licenses, no difference.

This occurs when we do:

LocalGeometryService.GetServiceAsync(lgs =>
{
    geometryService = new GeometryService() { Url = lgs.UrlGeometryService };
});
0 Kudos
1 Reply
DavidMorrison1
Deactivated User
Some more details to this problem, it occurs with 10.1.1 as well as 10.2. Also the Output in Visual Studio's console shows either of the following 2 errors:

If I try and run LocalServer.Initialize()

ArcGISRuntime: ArcGIS Runtime starting
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in ESRI.ArcGIS.Client.Local.dll

Or if I just let it try and initialize the local geometry service with the code in the first post:

ArcGISRuntime: ArcGIS Runtime starting
ArcGISRuntime: ArcGIS Runtime startup failure: The system cannot find the file specified

I have created the Deployment using Deployment Builder 10.1.1 (or Deployment Builder 10.2), and put the ArcGISRuntime10.1.1 (or ArcGISRuntime10.2) folder in the OUTPUT directory of the application.

On the development machine, if I put this deployment folder in there, I get the error as well (if I remove it on the deployment machine it uses the development environment of the SDK and works fine, but on the deployment computer, it gives the same exact error).

I would appreciate any ideas at this point, as for some reason this super obvious issue that occurs even on a sample application has not been documented anywhere that we can find online. Literally the string "ArcGIS Runtime startup failure" does not appear on the net other than for a licensing issue (which ours isnt).
0 Kudos