Select to view content in your preferred language

GraphicsLayer AttributeLabelClass Issue

2781
3
12-31-2015 10:15 AM
EN1
by
Deactivated User

I am developing an application in C# for Windows platform. I am kind of new using esri runtime and probably I am doing it in a wrong way. In the map, user is drawing a line to indicate some tasks, everything runs perfect until we decide to use labeling along the line.

When we draw lines, it automatically labels it with the proper name, the problem is when we navigate to another view it suddenly deadlocks the app and in debug mode I realize that there is always a thread present  showing that something crashed inside the esri.ArcGISRuntime.DLL specifically pointing to RuntimeCoreNet.CoreDrawSurface.ShutDownDrawThread method.

Has anybody faced this issue before? and how to resolve it,

what could be making the dll to crash, since there is no exception thrown or probably is not crashing just expecting some other behavior.

This happens specifically when assigning value to the property AtributeLabelClass.TextExpression = "[myVariable]";

0 Kudos
3 Replies
SimonFisher
Frequent Contributor

I am seeing something similar where my Windows Store App hangs on the same location within ArcGIS runtime.  It only occurs with a certain clients geodatabase so far and returns no error, just hangs the app.  Also, its inconsistent, the map will load fine with this gdb sometimes and work well, but will eventually fail after leaving the map page and returning again.  Sometimes its on the 2nd map page visit other times it will make 10 visits fine, but it always eventually hangs.  I am not positive yet if it seems to be a particular area of the data, but it doesn't seem to be.

I see it hang in worker thread at;

Flagged>77283Worker Thread<No Name>Esri.ArcGISRuntime.DLL!RuntimeCoreNet.CoreDrawSurface.ShutdownDrawThreadNormal
[Managed to Native Transition]
Esri.ArcGISRuntime.DLL!RuntimeCoreNet.CoreDrawSurface.ShutdownDrawThread()
Esri.ArcGISRuntime.DLL!Esri.ArcGISRuntime.Controls.DrawSurfaceWinStorePhone.StopRendering()
Esri.ArcGISRuntime.DLL!Esri.ArcGISRuntime.Controls.DrawSurfaceWinStorePhone.OnUIUnloaded()
Esri.ArcGISRuntime.DLL!Esri.ArcGISRuntime.Controls.DrawSurfaceWinStorePhone.m_swapChainPanel_Unloaded(object sender = {Windows.UI.Xaml.Controls.SwapChainPanel}, Windows.UI.Xaml.RoutedEventArgs e = {Windows.UI.Xaml.RoutedEventArgs})

If I wait for a long period of time the debugger will eventually throw this message;

Additional information: The CLR has been unable to transition from COM context 0xf06db8 to COM context 0xf06e70 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

I am guessing there is something ArcGIS runtime does not like about the particular geodatabase.  Anyone have any ideas on where to go next on this issue?

0 Kudos
EN1
by
Deactivated User

Exaclty same happens, same method, ShutdownDrawThread inside the ArcGISRuntime.dll with the same trace, The application just hangs in that method, no crashes, no error message, nothing, we already tried setting the attribute [STAThread()] on the main thread method but no fix.

Someone in ESRI team have any explanation or solution for this?

0 Kudos
SimonFisher
Frequent Contributor

I just noticed this thread is posted in a generic developers area. Developers

Perhaps we should move the thread into the ArcGIS runtime SDK for .Net, and the devs there will likely be more responsive.  As starter of the thread can you move it to the ArcGIS runtime SDK for .Net area?  Or could a moderator at ESRI do this for us?

ArcGIS Runtime SDK for .NET

0 Kudos