Select to view content in your preferred language

Sample Application Error

3450
8
03-10-2014 07:22 AM
Labels (1)
JoeQiu
by
Emerging Contributor
Hi,

I am new to ArcGIS. I was trying to run the sample appliction, but I got the error below on my computer. I am using Windows 7 Enterprise with Service Pack 1, 64 bit OS and 8GB RAM on VMware. I really appreciate if someone can point out the problem.
Thanks,

Sample: LocalMap
Error: Failed to create Accelerated Display. Please check the display hardware and drivers meet the minimum requirements.
Stack Trace:
   at ESRI.ArcGIS.Client.NativeMap..ctor(INativeMapOwner map, Single dpi)
   at ESRI.ArcGIS.Client.DrawingSurface.CreateRenderSurface(INativeMapOwner owner)
   at ESRI.ArcGIS.Client.Map.OnApplyTemplate()
   at System.Windows.FrameworkElement.ApplyTemplate()
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Sample: LocalMap
Error: Object reference not set to an instance of an object.
Stack Trace:
   at ESRI.ArcGIS.Client.DrawingSurface.SetSize(Int32 width, Int32 height)
   at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
0 Kudos
8 Replies
DavidLednik
Frequent Contributor
Hi,

Accelerated display in not supported in VM machine.
For that scenario using .NET Runtime SDK is a better choice.

Regards,
David
0 Kudos
BKuiper
Frequent Contributor
You can also just disable Accelerated Display on the Map object.
0 Kudos
JoeQiu
by
Emerging Contributor
Hi,

Accelerated display in not supported in VM machine.
For that scenario using .NET Runtime SDK is a better choice.

Regards,
David


Hi David,

Do you know how to using .NET Runtime SDK?

Thanks,
Joe
0 Kudos
JoeQiu
by
Emerging Contributor
You can also just disable Accelerated Display on the Map object.



I have set UseAcceleratedDisplay="False", but it still got the same problem.
Thanks
0 Kudos
BKuiper
Frequent Contributor
Are you getting the exact same exception?
0 Kudos
JoeQiu
by
Emerging Contributor
Are you getting the exact same exception?


Yes, the exact same exception
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Yes, the exact same exception

Strange. CreateRenderSurface is not supposed to be called when UseAcceleratedDisplay is false.
How to you set UseAcceleratedDisplay? May be a binding that would kick in too late might explain the issue.

Note: it's also worth trying without setting UseAcceleratedDisplay since the default value is false.
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

In the ArcGIS Runtime SDK for WPF the "Accelerated Display" is not supported on virtual machines due to the lack of graphics hardware support. The sample application explicitly uses the accelerated display option because it represents recommended best practice use of the API, but it does have the caveat of not supporting VMs and also not supporting custom XAML symbols or the KmlLayer. Unfortunately you will not be able to run the sample application on a VM.

As others have noted, in your own applications you can use the standard WPF rendering pipeline by setting Map.UseAcceleratedDisplay = False. The API also includes support for hardware acceleration of just a subset of layers in the Map via the AcceleratedDisplayLayers GroupLayer. It is worth checking that this is not used in your code.

As David commented, the new ArcGIS Runtime SDK for .NET which is currently released in BETA uses DirectX 11 and therefore can automatically make use of the WARP software rendering fall back when sufficient hardware is not detected. You can find out more about the new .NET SDK here: http://developersdev.arcgis.com/net/. Note the target release of the new .NET SDK is summer 2014.

Cheers

Mike
0 Kudos