castormalin

arcmap.exe crashes when exit button is pressed

Discussion created by castormalin on Mar 13, 2012
Latest reply on Mar 19, 2012 by castormalin
Hello,

I'm debugging a plug-in for arcmap. Arcmap crashes just after the exit button is pressed. These crashes appear on windows vista 64 sp2 or vista 32 (don't remember if sp) but not on windows xp sp3. According to the crash log produced by arcmap, it appears that I have some heap issues, so I debug with page heap activated.

Almost starting from scratch, I took the logo layer example code in which I gradually added my code. My plug-in adds a button which creates my tool. The tool and the button are two separate COM objects. The button is always created, but the tool object is created only if I push the button.
Now, I added some code in the tool part, the code is not executed, the tool object isn't even created, but arcmap crashes. Without that part of code, it does not. It doesn't seem to be dependent of that part of the code, when I comment it and add some code elsewhere (which won't be executed too), arcmap crashes the same way.

adplus tells me : corrupted heap pointer or using wrong heap
xx : Heap used in the call
xx : Heap block
xx : Block size
xx : Heap owning the block

Any idea or debugging strategy I could start with ?

Thanks.

Outcomes