GraphicTracker fails with AccessViolationException

2122
34
Jump to solution
02-27-2013 04:52 AM
DavidClarke1
New Contributor III
I am developing an application using the GraphicTracker to display moving icons.  I am using the Windows.Forms.Timer event to suspend the display updates for two seconds.  I have another couple subroutines that creates and removes GraphicTrackerSymbols to the tracker.  All this happens on the same thread as the Windows.Forms.Timer does excute on the main gui thread.  I have also verified this in debug.

Every so often the program will crash with an AccessViolationException while trying to set the GraphicTracker.SuspendUpdate property to FALSE; it ALWAYS fails on trying to set that property to "FALSE".  What I noticed was that if I do not remove any items from the GraphicTracker it does not fail.  When I am removing items here and there as needed at some point it will fail.  It may be 30 seconds or 2 minutes.  I use the exact same test data (geometry/symbols/coordinates) but it still fails at some "random" time.  The map no longer updates on the screen and the whole map is unusable.  I cannot seem to recover or continue on.  Catching the exception makes no difference as the map just will not work anymore.

Here is the timer code.  The timer itself is set to run every 2 seconds.

_gt.SuspendUpdate = False System.Threading.Thread.Sleep(300) _gt.SuspendUpdate = True


My thoughts are that there is some timing issue while using the "Remove" method on the GraphicTracker object that conflicts with the "SuspendUpdate" property.  I have tried setting the timer to be a longer or shorter interval and also changing the "Sleep" interval but nothing seems to help.
0 Kudos
34 Replies
DavidClarke1
New Contributor III
It was not too difficult overall, but was tricky to get it to work without redrawing all my objects (caused annoying flickering), so I had to put them into different layers to get them to draw independently.


Do the items that update flicker?
0 Kudos
ScottMcNeil
New Contributor
Do the items that update flicker?


No flicker on any item that doesn't move. Obviously, if it moves it is erased and redrawn.   I'm in the process of migrating from 9.3.1 to 10.1, but sticking with the engine for now.  Hope to have some time to experiment with the new runtime in the near future though.
0 Kudos
WayneGuidry
New Contributor III
I know its almost a year old, but just curious if anyone has an update on this issue or what the NIM# of this issue is so I can check it with ESRI?

I have, what I believe to be, the same issue in my application using ArcGIS 10.0 and wanted to know if it has been addressed in a later version.

Thanks
0 Kudos
DavidClarke1
New Contributor III
I believe NIM079055 is the correct number.  I believe it was only fixed in 10.2.1 (and higher).  Good luck getting the fix from support.
0 Kudos
KristenCarroll
New Contributor III
Greetings posters.  This issue has been fixed.  NIM079055 - An AccessViolationException occurs when the IGraphicTracker::Add method is used to add many Graphic Tracker Symbols based on a Picture Marker Symbol - has been addressed in ArcGIS 10.2.1. 

This download is available via download from our Customer Care Portal: https://customers.esri.com/index.cfm?event=login.show, or by calling your Customer Support Representative at 888-377-4575 X5.

If you continue to have issues with this, please call our Support Services line and have an incident created at 888-377-4575 X2.

Best Regards,

Kristen Barry
Esri Support Services
0 Kudos