Excel 32 bit crashes with large excel

Add-in Express™ Support Service
That's what is more important than anything else

Excel 32 bit crashes with large excel
 
Ranjitha Nagendra




Posts: 40
Joined: 2015-10-26
One of our client is using large excel sheets with many formulas. The size of each excel is about 35MB. They are using 32 bit Excel. With our addin enabled, by just opening the excel files, the Excel application crashes on opening 3rd or 4th workbook. This issue is not seen in 64 bit excel and also not seen with our addin disabled. I did explain to them and gave this link : https://support.microsoft.com/en-us/help/3066990/memory-usage-in-the-32-bit-edition-of-excel-2013-and-2016 and asked them to open their excel workbooks in difference Excel instances as explained here : https://exceloffthegrid.com/how-to-open-multiple-instances-of-excel/ But they dont seem to be happy with this. They are asking : Why would DG 32bit Excel plug-in utilise a large proportion of the lower 2GB address space (0x00000000 through 0x7FFFFFFF). What is the working set size for the DG Excel plug-in? (DG Excel addin is the name of our addin)

Any suggestions/answers would be much appreciated.

Thanks in advance,
Ranjitha
Ranjitha
Posted 04 Sep, 2018 06:04:39 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Ranjitha,

The considerations above are somewhat wrong because of https://support.microsoft.com/en-us/help/3160741/large-address-aware-capability-change-for-excel. Note that your add-in may cause the crash if it expects only 32bit addresses. Below is a citation from https://www.add-in-express.com/creating-addins-blog/2017/12/19/large-address-aware-outlook2016/:

This can affect you if your code relies on pointers restricted to 2Gb. An example of a pointer and a way to obtain it would be the IntPtr value returned by the GetProcessAddress() Window API call. Naturally, other Windows API calls may produce similar values. What?Â?Ð?és common in such calls is that they produce addresses.

Extending the address range available in your program creates a problem only if you deal with a representation of the address, not with the pointer itself.

Potentially dangerous are operations that cast IntPtr to and from In32 (int in C# and Integer in VB.NET). We suggest to always cast to and from Int64! This is always ?Â?Ð?ã I strongly believe so ?Â?Ð?ã the case in the code of Add-in Express.


The issue may not be caused by your add-in, of course. I assume you have some logging in your add-in. When excel crashes, do you have something in your add-in's log? In the system's Application log?


Andrei Smolin
Add-in Express Team Leader
Posted 04 Sep, 2018 06:15:05 Top
Ranjitha Nagendra




Posts: 40
Joined: 2015-10-26
Hi Andrei,

Thanks for the quick reply. I don't see anything useful in our addin 's log. Workbook_Open event is not fired on opening the last workbook just before crashing. On opening 3rd or 4th workbook, the application crashes without even firing the Workbook_Open event, so I am not able to get any logs useful from our addin. The application crash log from EventViewer is as below:

Faulting application name: EXCEL.EXE, version: 16.0.4717.1000, time stamp: 0x5b1fd8a8

Faulting module name: ucrtbase.dll, version: 10.0.15063.1182, time stamp: 0x73290ff4

Exception code: 0xc0000409

Fault offset: 0x000a3a62

Faulting process id: 0x35b8

Faulting application start time: 0x01d41f7070e776a9

Faulting application path: C:\Program Files (x86)\Microsoft Office\Office16\EXCEL.EXE

Faulting module path: C:\windows\System32\ucrtbase.dll

Report Id: fe725287-9597-402c-b68c-126146a57db4

Faulting package full name:

Faulting package-relative application ID:

Will this be of any help?

Regards
Ranjitha
Posted 04 Sep, 2018 07:19:42 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Ranjitha,

I suppose the issue relates to the Excel build that you use. Try to update it.

Also check if the following link applies to youor case: https://social.msdn.microsoft.com/Forums/Lync/en-US/86075e88-0371-40aa-9c2a-8f2afb72877f/creating-a-commandbar-control-on-a-context-menu-crashes-excel-2016?forum=exceldev.


Andrei Smolin
Add-in Express Team Leader
Posted 04 Sep, 2018 09:46:39 Top
Ranjitha Nagendra




Posts: 40
Joined: 2015-10-26
Hi Andrei,

Thanks so much for your reply. Yes, we do create buttons on context menu, and looks like that is the culprit !! We removed context menu buttons creation and we see excel is not crashing anymore.

Many Thanks,
Ranjitha
Ranjitha
Posted 05 Sep, 2018 05:01:30 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Great! Just great!


Andrei Smolin
Add-in Express Team Leader
Posted 05 Sep, 2018 05:03:42 Top