Excel restarting when turned off

348 views
Skip to first unread message

Julien Valéry

unread,
May 30, 2018, 3:39:21 PM5/30/18
to Excel-DNA
Hello all and sir Govert,

We are facing a strange issue in our addin.

It seems it is only happening when we create more than one sheet which have been filled with content by calls to excel api using excel dna or some vsto...

Each time we close Excel, it display a warning message and restart it.

Event viewer gives us the following descriptions

our exception it the following:
Faulting application name: EXCEL.EXE, version: 16.0.9226.2156, time stamp: 0x5af64083
Faulting module name: ntdll.dll, version: 10.0.16299.248, time stamp: 0xeffc9126
Exception code: 0xc0000409

Any ideas how to work out what’s wrong.

It is happening in debug or release installed version of rhe addin.

I put a break point in Disconnect hook which is called, had a look at threads etc...

Govert van Drimmelen

unread,
May 30, 2018, 4:00:41 PM5/30/18
to exce...@googlegroups.com
This is not so helpful ( https://msdn.microsoft.com/en-us/library/cc704588.aspx )

0xC0000409
STATUS_STACK_BUFFER_OVERRUN
The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application.

* Is this on 64-bit Excel?

* Can you check the Windows event log and post any related Application Error that you see there?

* Do you have a way to reproduce this with a small VTO add-in?

It sounds just like this issue, which seems to be a bug in the internal COM clean up at shutdown:
https://github.com/Excel-DNA/Samples/issues/8

-Govert


________________________________________
From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of Julien Valéry [dar...@gmail.com]
Sent: 30 May 2018 09:39 PM
To: Excel-DNA
Subject: [ExcelDna] Excel restarting when turned off
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.

Julien Valéry

unread,
May 30, 2018, 4:14:13 PM5/30/18
to Excel-DNA
i was thinking to put some magic lines in Disconnect handler to force garbage collector, this thread can help me, I will give a try tomorrow morning and see if it makes any differences.
Yes it is a 64bit versions.
I would put more informations about the Error event listed in viewer.
As you can imagine it is going to be tricky to reproduce it elsewhere than in this addin.
But I will keep you informed.
Thanks for your prompt reply, always very helpful.

Julien Valéry

unread,
Jul 11, 2018, 5:16:54 PM7/11/18
to Excel-DNA
Reply all
Reply to author
Forward
0 new messages