Excel COM Automation crash

H

HÃ¥kan

Versions:
Excel 2003 (11.6355.6408) SP1
..NET Framework 1.1

Background:
I'm developing a COM Automation Excel Add-in application in C#.
The application basically reads and writes from/to Excel ranges.
It implements Extensibility.IDTExtensibility2 and is started automatically
when Excel is run.

Problem:
When run, Excel will crash after a while (a few seconds, minutes or
sometimes almost an hour.). It shows the message: "Microsoft Office Excel has
encountered a problem and needs to close. We are sorry for the
inconvenience."

Debug shows the following:
"Unhandled exception at 0x7c81eb33 in EXCEL.EXE: 0xC000001D: Illegal
Instruction."

The exception typically occurs when the application is under a lot of stress
with a lot of Range.get_Value and Range.set_Value calls in a short time.
However the exception also occurs under less stressing conditions if the
application is left running for several minutes-hours.

I have tried to catch and handle the exception programatically in my
application but I've failed.

I fear that it is Excel that causes the exception and that it is not passed
through my application.
I've disabled automatic calculations and AutoRecover but the exception still
occurs.

I've been trying to find a solution for quite some time now. I'd be most
grateful for any advice!

Regards!
/HÃ¥kan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top