"Microsoft Excel is trying to recover your information" error

1,478 views
Skip to first unread message

Andrei F

unread,
Nov 10, 2016, 1:18:34 AM11/10/16
to Excel-DNA
I'm occasionally getting the following error message when closing Excel. It's happening after all my shutdown code executed, and after RtdServer.ServerTerminate() is finished.
I wonder if there is any known case when this can be happening, or if there is any way to debug such messages?

"[Window Title]
Microsoft Excel

[Main Instruction]
Microsoft Excel is trying to recover your information...

[Content]
This might take several minutes.

[Cancel]"

Govert van Drimmelen

unread,
Nov 10, 2016, 1:26:58 AM11/10/16
to exce...@googlegroups.com
Hi Andrei,

When Excel crashes like this you'll probably see an entry in the Windows Event Log that gives a bit more information.

There have been some causes of crashing fixed since the last release, e.g. if an add-in that uses one of the COM features is unloaded, then Excel would crash when closing.

-Govert



From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of Andrei F [fandre...@gmail.com]
Sent: 10 November 2016 08:18 AM
To: Excel-DNA
Subject: [ExcelDna] "Microsoft Excel is trying to recover your information" error

--
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.

Andrei F

unread,
Nov 10, 2016, 1:42:34 AM11/10/16
to Excel-DNA
Hi Govert,
There are error message in the event log, indeed. Unfortunately, they don't say much to me:

Faulting application name: EXCEL.EXE, version: 14.0.7176.5000, time stamp: 0x57fdf479
Faulting module name: VBE7.DLL_unloaded, version: 7.0.16.40, time stamp: 0x57f8235c
Exception code: 0xc0000005
Fault offset: 0x00018390
Faulting process ID: 0x1c90
Faulting application start time: 0x01d23b1d35b3d78b
Faulting application path: C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE
Faulting module path: VBE7.DLL
Report ID: 7afc92b3-cf04-4648-aae6-ce6abade71ed
Faulting package full name:
Faulting package-relative application ID:


On Thursday, November 10, 2016 at 1:26:58 PM UTC+7, Govert van Drimmelen wrote:
Hi Andrei,

When Excel crashes like this you'll probably see an entry in the Windows Event Log that gives a bit more information.

There have been some causes of crashing fixed since the last release, e.g. if an add-in that uses one of the COM features is unloaded, then Excel would crash when closing.

-Govert


From: exce...@googlegroups.com [exce...@googlegroups.com] on behalf of Andrei F [fandre...@gmail.com]
Sent: 10 November 2016 08:18 AM
To: Excel-DNA
Subject: [ExcelDna] "Microsoft Excel is trying to recover your information" error

I'm occasionally getting the following error message when closing Excel. It's happening after all my shutdown code executed, and after RtdServer.ServerTerminate() is finished.
I wonder if there is any known case when this can be happening, or if there is any way to debug such messages?

"[Window Title]
Microsoft Excel

[Main Instruction]
Microsoft Excel is trying to recover your information...

[Content]
This might take several minutes.

[Cancel]"

--
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 exc...@googlegroups.com.

Govert van Drimmelen

unread,
Nov 10, 2016, 1:53:14 AM11/10/16
to exce...@googlegroups.com
Well - the fact that VBE7.DLL appears there might point you to a possible issue.

The exception code "0xc0000005" means Access Violation - this might happen if a pointer is invalid (e.g. some COM object was unloaded prematurely, and something referencing it tried to access it later).

* Does this only happen when your add-in is loaded?
* Does any of your code interact with the VBA object model (e.g. manipulate VBA projects somehow)?
* Does any of your code interact with the COM object model on a thread other than the main Excel thread?
* Do you have any dangerous calls like Marshal.ReleaseComObject or Marshal.FinalReleaseComObject anywhere?

-Govert



Sent: 10 November 2016 08:42 AM
To: Excel-DNA
Subject: Re: [ExcelDna] "Microsoft Excel is trying to recover your information" error

To post to this group, send email to exce...@googlegroups.com.

Andrei F

unread,
Nov 10, 2016, 2:34:36 AM11/10/16
to Excel-DNA
>* Does this only happen when your add-in is loaded?

Yes.

>* Does any of your code interact with the VBA object model (e.g. manipulate VBA projects somehow)?

No.

>
* Does any of your code interact with the COM object model on a thread other than the main Excel thread?

I think no, but it's better to re-check this.


>* Do you have any dangerous calls like Marshal.ReleaseComObject or Marshal.FinalReleaseComObject anywhere?

No.

Govert van Drimmelen

unread,
Nov 10, 2016, 2:43:48 AM11/10/16
to exce...@googlegroups.com
Then I suggest you simplify the add-in until you identify the essential code that triggers the error.

-Govert


Sent: 10 November 2016 09:34 AM
To post to this group, send email to exce...@googlegroups.com.

Andrei F

unread,
Nov 10, 2016, 2:56:24 AM11/10/16
to Excel-DNA
So, the problem was due to a single COM call made on a background thread. I wonder if it's possible to make such calls fail immediately, because when they make Excel fail much later when it's closing - this problem gets just too subtle.

Govert van Drimmelen

unread,
Nov 10, 2016, 3:03:15 AM11/10/16
to exce...@googlegroups.com
I've become very adamant that the COM object model should only be used from the main Excel thread (in a safe context, like a macro call, ribbon callback or event handler).

But I don't know of a way to enforce that yet.

-Govert


Sent: 10 November 2016 09:56 AM
To post to this group, send email to exce...@googlegroups.com.

Andrei F

unread,
Nov 10, 2016, 4:36:07 AM11/10/16
to Excel-DNA
Ok. Thanks for helping.
Reply all
Reply to author
Forward
0 new messages