...
ExcelDna.Integration Verbose: 4 : ExcelComAddIn.OnStartupComplete
ExcelDna.Integration Error: 6 : Unhandled exception in async delegate call. : NullReferenceException - Object reference not set to an instance of an object.
ExcelDna.Integration Error: 6 : Unhandled exception in async delegate call. : NullReferenceException - Object reference not set to an instance of an object.
...Hi Alan,
For the ExcelDna.Integration trace source, the EventId 6 mean “Runtime”: https://github.com/Excel-DNA/ExcelDna/blob/2aa1bd9afaf76084c1d59e2330584edddb888eb1/Source/ExcelDna.Integration/Logging.cs#L64
The error you see is from here:
This happens when an async macro (e.g. from ExcelAsyncUtil.QueueAsMacro) has run and thrown an unhandled exception.
So I think the NullReferenceException is from add-in code and not Excel-DNA code, but it’s hard to tell what changes might be causing this.
I also see that I made some attempts last year to improve robustness of running async macros from AutoOpen, including in the case of a “Protected View” sheet:
With version 0.35, unhandled exceptions in the async macros will also call the registered ExcelIntegration.UnhandledExceptionHandler.
That would give you another opportunity to catch the exception yourself, and e.g. print out the StackTrace to see where exactly the NullReferenceException arises.
I hope that gives some clues.
Regards,
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 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.
Exception of type 'ExcelDna.Integration.XlCallException' was thrown.
at ExcelDna.Integration.XlCall.Excel(Int32 xlFunction, Object[] parameters) at ExcelDna.Integration.ExcelDnaUtil.GetApplication() at ExcelDna.Integration.ExcelDnaUtil.get_Application() at ...AutoOpen()
try{ ExcelApplication = ((Microsoft.Office.Interop.Excel.Application) ExcelDnaUtil.Application);...| "On Windows 10 April 2018 Update only: 461808" (my laptop working) "On all other OS versions, including Windows 10 October 2018 Update: 461814 |
" |
--
ExcelApplication = ((Microsoft.Office.Interop.Excel.Application) ExcelDnaUtil.Application);
Exception of type 'ExcelDna.Integration.XlCallException' was thrown.
at ExcelDna.Integration.XlCall.Excel(Int32 xlFunction, Object[] parameters) at ExcelDna.Integration.ExcelDnaUtil.GetApplication() at ExcelDna.Integration.ExcelDnaUtil.get_Application() at ...AutoOpen()try{ // this is to do what would have happened if XlCall.Excel(XlCall.xlcWorkbookInsert, 6); hadn't thrown an exception at L297 application = GetApplicationFromWindows(allowProtected, out isProtected);
XlCall.Excel(XlCall.xlcFileClose, false);}catch{ // Not expecting this ever - but be consistent about Try vs. exceptions application = null; isProtected = false;}