Select to view content in your preferred language

Runtime no longer working: Failed to create service parkmap MapServer. Error while se

3879
11
11-12-2011 02:00 PM
Labels (1)
BKuiper
Frequent Contributor
I'm getting the following message while trying to start a LocalService in VS2010

Failed to create service parkmap MapServer. Error while setting up SOC. Error code: 500

In the output window it says:

The program '[5880] RuntimePoC_001.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).

This used to work before.

Rebooting and cleaning the Temp folder in AppData doesn't help.

I will trying to reinstall the Runtime.
0 Kudos
11 Replies
BKuiper
Frequent Contributor
re-installing didn't solve the issue.

What can i do to get the Runtime working again?
0 Kudos
BKuiper
Frequent Contributor
It seems to be working again for no apparent reason... ?!?
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Glad to hear it's working again but it's unfortunate that we may not be able to find out the cause of the problem. Could it be something to do with the vshost process itself? As I said in a previous post on another thread - since beta 1 we've introduced quite comprehensive logging which, as a developer, you'll be able to enable and set the verboseness.

Cheers

Mike
0 Kudos
BKuiper
Frequent Contributor
My colleague is experience the same problem today on a different machine. Hopefully it will go away... (It's a brand new installed laptop with just ArcGIS Runtime SDK).

Any idea when Beta 2 is going to be available ?!
0 Kudos
BKuiper
Frequent Contributor
My laptop is now showing the same problem again. Is there ANYWAY i can debug this and send you more information so we can fix this.

We both have a brand new laptop (dell latitude Intel Core I7, with 8 cores and SSD disk).

Could it be a race condition??
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

I you are able to post/send a reproducer app (with a sample of your data) I can attempt to reproduce the issue you're seeing - both on a Beta 1 local server and against a daily build. We have some similarly specc'd machines here.

If you're not able to upload the app/data to the forum (file types/sizes are restricted) you can email me on mbranscomb@esri.com.

Unfortunately I can't give a specific date when Beta 2 of the ArcGIS Runtime SDK for WPF will be available - but we hope to make it available within the next 4-6 weeks.

Cheers

Mike
0 Kudos
BKuiper
Frequent Contributor
Hi Mike,

Thanks again for taking the time to help us.

I have attached an example program. You only have to add your own license and point to one of your own GP Packages.

It is a very basic program, but this already fails.

{"Failed to create service model GPServer. Error while setting up SOC. Error code: 500"}


Here are the specifications of one of the two machines
DELL Latitude
Intel(r) Core(TM) i7-2720QM CPU @ 2.20GHZ 2.19GHZ
8gig of RAM
256gig of SSD HDD
64bit

NVIDIA NVS 4200M

The other one should have the similar specs, but i will confirm that later.

Let me know if you need more information.
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Thanks for putting together a repro. Unless I have misunderstood the point of the repro app, I believe the cause of your issue is that you're effectively declaring two InitializeCompleted event handlers - one as a callback in the overloaded InitializeAsync method and one via a lambda expression, i.e. any code within *both* #1 and #2 below will be executed when the LocalServer has finished initializing:

#1.
LocalServer.InitializeAsync(() =>
{ ... });

#2.
LocalServer.InitializeCompleted += (sender, e) =>
{ ... };

BUT, it's also worth noting that by declaring an event handler via a lambda expression *after* the async call for which it's intended to handle the response, you run the risk of that code never executing (i.e. #2 above might be called because the event has been raised before the handler was registered).

Better would be to write the code something like this:

LocalServer.InitializeAsync(() =>
{
    if (LocalServer.LicenseStatus != LicenseStatus.Valid)
    {
        MessageBox.Show("This ArcGIS Runtime license is not valid");
    }

    LocalGeoprocessingService lgs = new LocalGeoprocessingService(@"C:\...\GeoprocessingTool.GPK", GPServiceType.SubmitJob);
    lgs.StartAsync((d) =>
    {
        if (d.Error != null)
        {
            MessageBox.Show(string.Format("{0}", d.Error.Message));
        }
    });
});


We are planning to write conceptual documentation on the subject of the ArcGIS Runtime and asynchronous programming patterns before it's release.

I've been testing your repro app with a Beta 1 Runtime/LocalServer on my laptop which has very similarly specs (Intel i7-2820QM @ 2.30GHz, 8GB RAM, 64-bit, SSD) but unfortunately have not been able to reproduce the issue.


Cheers

Mike
0 Kudos
BKuiper
Frequent Contributor
Hi Mike,

Thanks for responding so quickly. You are right. this code doesn't deserve the price for best written code. 🙂

but it was a quick hack to make you a proof of concept.

The updated code still fails one our new laptop.

We now have 3 new DELL Latitude laptops on which this code fails. Our laptop comes with some programs pre-installed but not that many, so it is hard to determine if any of the other installed software packages are causing this problem. I guess it has something to do with getting a port or so for the SOC? I don't know the internals of the ArcGISRuntime. Does it setup a separate TCP host for the SOC ?

Is there a possibility that you can send me an executable of the ArcGISRuntime that will generate an output log file with more information then just this specific error. I can then send this back to you.

Or do you have something else in mind to debug this?

My emailaddress is ****************

Thanks!
0 Kudos