Question: FV intermittently crashes when updating icon location on map

I'm getting an error which causes Falconview to close. I have a plugin which draws an icon on the map and uses .NET's timer tick control to update the location of the icon on the map. Falconview doesnt always crash at the same time. I've timed it at 2 minutes, 3 minutes, 7 minutes. The Error messages which pops up is :

"Falconview Application file has encountered a progblem and needs to close. We are sorry for the inconvenience. If you were working in the middle of something, the information you were working on might be lost."

I checked the falconview error log and it only shows:

"02/20/08 10:02:22 0bb4 * Starting FalconView version 4.0.1.1076. Windows NT version 5.1 build 2600 Service Pack 2."

The output to my log file doesnt even stop at the same place everytime, so I cant tell exactly where in my plugin code that the error is occuring.

*Update*:

I also get the following error:

: Microsoft visual C++ Debug Library

Debug assertion failed!

program : C:\pfps\falcon\fvw.exe

file: c:\program files\microsoft visual studio 8\vc\include\xtree

expression: map/set iterator not incrementable

for more infor............doc on asserts.

Environment

FalconView Version: FalconView 4.0.1
Interface:
Language: C# VS 2005

-- Main.JohnS - 20 Feb 2008

Answer

Are you using ILayer3 or ILayer. because of the delay, it sounds like something is happening durring garbage collection which is called after your code runs. Look at FVDev.ManagedCodeExample and see if this is the same issue.

That seems to have fixed the problem. I changed from drawing shapes and text by updating the ILayer object and having nothing in the OnDraw method to using the Graphics object and executing the drawing from the OnDraw method. Thanks for your help!