Moving vertext of callout make my application crash

535
4
05-31-2010 07:58 PM
feizhao
New Contributor
There is a simple callout in my map. I use the below C# codes to select the callout element and move it. It's no problem to move the text. But when I move the vertex, the application crash. The exception is "AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory has been corrupted. "

Both moving text and vertex work well in arcmap.

My environments: windows xp sp2, .net framework2.0, arcgis engine9.3 sp1, arcgis desktop 9.3 sp1.

the attachments are my application with code.

ICommand command = new ControlsSelectToolClass();
command.OnCreate(this.axMapControl1.Object);
if (command.Enabled == true)
{
      axMapControl1.CurrentTool = (ITool)command;
}


Thanks.

flying
0 Kudos
4 Replies
feizhao
New Contributor
Is there anybody face the same problem? Is there any error in my codes?


flying
0 Kudos
grahamwood
New Contributor III
Good news and bad.  I know this problem well, and have ESRI admitting its a bug ( no bug number yet).  They are working on fixing it.  But at this time there is no way to correct the problem.  The only way this will work is if you place esri toolbar on your application and use the pointer off there tool bar.  You can not reference the pointer tool in code and move the vertext.  I hate this solution too, hope they fix this soon.


PS. the toc control when dragging layers down in the toc control also move down 2 positions also a confirmed bug.
0 Kudos
feizhao
New Contributor
Thanks for your reply. I can only hope that the bug can be fixed in arcgis 10.

Good news and bad.  I know this problem well, and have ESRI admitting its a bug ( no bug number yet).  They are working on fixing it.  But at this time there is no way to correct the problem.  The only way this will work is if you place esri toolbar on your application and use the pointer off there tool bar.  You can not reference the pointer tool in code and move the vertext.  I hate this solution too, hope they fix this soon.


PS. the toc control when dragging layers down in the toc control also move down 2 positions also a confirmed bug.
0 Kudos
grahamwood
New Contributor III
They now tell me they will have it fix in arcmap 10 sp1
0 Kudos