Excel Crashes At Startup

54 views
Skip to first unread message

steven price

unread,
Jun 26, 2024, 10:10:03 AMJun 26
to Excel-DNA

Hi

We have updated our ExcelDNA addin project to the latest version in GitHub and all seems to have gone well and we can build the project fine but when we try and debug the project Excel starts then crashes. We are using Excel Office365 64 bit and our project debug parameters are 

Start External Program = C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE

Command line arguments = /x "MojitoAddin64.xll" 

We see all the files OK in the debug folder and have also trued adding manually to Excel but it causes the same crash , we have also tried with the packed and unpacked xll files 

In the VS 2022 output Windows we see the info below

We are using .NET Framework 4.8

Any help appreciated 

Steve


VS 2022 output

'EXCEL.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: Domain 2): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: Excel-DNA: C:\Users\spric\source\repos\Mojito2\Mojito\MojitoAddin\bin\Debug\MojitoAddin64.xll): Loaded 'ExcelDna.ManagedHost'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: Domain 3): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: Domain 2): Unloaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
'EXCEL.EXE' (CLR v4.0.30319: Excel-DNA: C:\Users\spric\source\repos\Mojito2\Mojito\MojitoAddin\bin\Debug\MojitoAddin64.xll): Unloaded 'ExcelDna.ManagedHost'
'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\Users\spric\source\repos\Mojito2\Mojito\MojitoAddin\bin\Debug\MojitoAddin64.xll)): Loaded 'ExcelDna.ManagedHost'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\Users\spric\source\repos\Mojito2\Mojito\MojitoAddin\bin\Debug\MojitoAddin64.xll)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\Users\spric\source\repos\Mojito2\Mojito\MojitoAddin\bin\Debug\MojitoAddin64.xll)): Loaded 'ExcelDna.Loader'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\Users\spric\source\repos\Mojito2\Mojito\MojitoAddin\bin\Debug\MojitoAddin64.xll)): Loaded 'ExcelDna.Integration'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\Users\spric\source\repos\Mojito2\Mojito\MojitoAddin\bin\Debug\MojitoAddin64.xll)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\Users\spric\source\repos\Mojito2\Mojito\MojitoAddin\bin\Debug\MojitoAddin64.xll)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'EXCEL.EXE' (CLR v4.0.30319: FullTrustSandbox(Excel-DNA: C:\Users\spric\source\repos\Mojito2\Mojito\MojitoAddin\bin\Debug\MojitoAddin64.xll)): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The program '[22684] EXCEL.EXE' has exited with code 255 (0xff).


Govert van Drimmelen

unread,
Jun 26, 2024, 10:14:46 AMJun 26
to exce...@googlegroups.com

Hi Steven,

 

I think you’ll have to make a new add-in that works, then gradually evolve towards the problem add-in to pin down the feature, code or dependency that is causing problems.

 

-Govert

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/caddbe29-adfe-48b7-8aea-4f4a9ab6535an%40googlegroups.com.

Kedar Kulkarni

unread,
Jun 26, 2024, 2:11:56 PMJun 26
to Excel-DNA
i have following suggestions

1. Remove all other addins / startup files including COM /VBA addins etc. 
2. Add MessageBox.Show in the constructor of the class that has IExcelAddin or Ribbon if exists. That breakpoint should hit before running any code. But if that is not being hit, you have an issue somewhere else outside of your addin.
3. In exceptions settings, select all checkboxes.

You need to be able to attach debugger or start the addin from visual studio. 

steven price

unread,
Jul 1, 2024, 11:13:15 AMJul 1
to Excel-DNA
Hi,

Many thanks for the reply. I created a new Addin based on .NET 4.8 and built the code fine and it runs perfectly in debug. My issue now is distribution. I copied the debug/bin folder contents to my target computer C drive and added the AddIn to Excel and I can see the functions fine but when I calling of them I get a #VALUE error. The parameters all look fine in the Excel Function Wizard

Any help appreciated 

Steve

steven price

unread,
Jul 1, 2024, 11:38:59 AMJul 1
to Excel-DNA
.. actually I get the #VALUE error. on the local computer I used for debugging if I add the Addin using the myAddin-add-packed.xlll from an Excel session not started from debug.

Kedar Kulkarni

unread,
Jul 1, 2024, 3:28:57 PMJul 1
to exce...@googlegroups.com
Are you able to see the formulas registered in excel ( I think you are as otherwise would get #name error. ) you need a good logging mechanism when not debugging and log errors in the function. Also check all dependencies are loaded or check with unpacked xll first.

Reply all
Reply to author
Forward
0 new messages