Excel-DNA / IntelliSense

Add in-sheet IntelliSense for Excel UDFs
MIT License
170 stars 52 forks source link

System.ArgumentNullException: Value cannot be null. #26

Closed Murtnowski closed 8 years ago

Murtnowski commented 8 years ago

Excel loads up just fine and when I start typing a custom function everything works as intended. However after executing the function, I get a popup with the crash report below. The function still executes and works. Oddly enough, this crash only happens the first time I execute a function, after this first time I never get the same error again.

I call IntelliSenseServer.Register(); in the AutoOpen of my IExcelAddIn of my ExcelDNA Plugin.

\ Exception Text ** System.ArgumentNullException: Value cannot be null. Parameter name: input at System.Text.RegularExpressions.Regex.Replace(String input, String replacement) at System.Text.RegularExpressions.Regex.Replace(String input, String pattern, String replacement) at ExcelDna.IntelliSense.FormulaParser.TryGetFormulaInfo(String formulaPrefix, String& functionName, Int32& currentArgIndex) at ExcelDna.IntelliSense.IntelliSenseDisplay.FormulaEditTextChange(String formulaPrefix, Rect editWindowBounds, IntPtr excelToolTipWindow) at ExcelDna.IntelliSense.IntelliSenseDisplay.StateUpdate(Object sender, UIStateUpdate update) at ExcelDna.IntelliSense.UIMonitor.RaiseStateUpdates(Object updates)

Ron-Ldn commented 8 years ago

@Murtnowski Unfortunately I cannot reproduce. Would you be able to share the definition of the function, if it is a simple one? And how you called it within Excel? What version of Excel are you using? Thanks

govert commented 8 years ago

@Murtnowski Can you confirm that this is in the latest version from 31 July? I recall a bug like this in an earlier version.

Murtnowski commented 8 years ago

I'm using version 0.1.4-beta2 (Prerelease) which I got from the NuGet manager. Excel 2010.

It claims it's dependencies are: ExcelDna.Integration (>= 0.33.9 && < 0.34) UIAComWrapper (>= 1.1.0.14)

Sorry I'm on an old build. I hadn't seen the v0.1.5-beta3 release yet.

My function definitions looks something like this:

[ExcelFunction(Name="A_FUNCTION_NAME", Description = "Some sort of text here")] public static object A_FUNCTION_NAME([ExcelArgument(Description = "Additional Text because why not")] string myFavParam, [ExcelArgument(Description = "Somethign somethign something")] string moreParam, [ExcelArgument(Description = "Do some stuff")] string lastParam)

\ Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.6.1080.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

ExcelDna.Loader Assembly Version: 0.33.5730.40390 Win32 Version: 1.4.1.1

CodeBase: file:///C:/Users/dummyUser/AppData/Local/assembly/dl3/YD2HJZQN.9Y6/ZYOB6J1L.4RY/2a13a945/43c4b1e3_10ecd101/AdditionalSecret.dll

System Assembly Version: 4.0.0.0 Win32 Version: 4.6.1081.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.6.1038.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.6.1038.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Security Assembly Version: 4.0.0.0 Win32 Version: 4.6.1073.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.6.1064.2 built by: NETFXREL3STAGE

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

ExcelDna.Integration Assembly Version: 0.33.5730.40390 Win32 Version: 1.4.1.1

CodeBase: file:///C:/Users/dummyUser/AppData/Local/assembly/dl3/YD2HJZQN.9Y6/ZYOB6J1L.4RY/2a13a945/43c4b1e3_10ecd101/AdditionalSecret.dll

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.6.1038.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.6.1078.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

PETFunctions Assembly Version: 1.0.0.0 Win32 Version: 1.4.1.1

CodeBase: file:///C:/Users/dummyUser/AppData/Local/assembly/dl3/YD2HJZQN.9Y6/ZYOB6J1L.4RY/2a13a945/43c4b1e3_10ecd101/AdditionalSecret.dll

AdditionalSecret Assembly Version: 1.4.1.1 Win32 Version: 1.4.1.1

CodeBase: file:///C:/Users/dummyUser/AppData/Local/Apps/2.0/GECB4N5R.922/8ZC59JGZ.VDE/petd..vsto_a9744f7054a335ac_0001.0004_98065423ad4b1a12/AdditionalSecret.DLL

ExcelDna.DynamicDelegateAssembly Assembly Version: 0.0.0.0 Win32 Version: 1.4.1.1

CodeBase: file:///C:/Users/dummyUser/AppData/Local/assembly/dl3/YD2HJZQN.9Y6/ZYOB6J1L.4RY/2a13a945/43c4b1e3_10ecd101/AdditionalSecret.dll

ExcelDna.IntelliSense Assembly Version: 0.1.4.0 Win32 Version: 1.4.1.1

CodeBase: file:///C:/Users/dummyUser/AppData/Local/assembly/dl3/YD2HJZQN.9Y6/ZYOB6J1L.4RY/2a13a945/43c4b1e3_10ecd101/AdditionalSecret.dll

Microsoft.CSharp Assembly Version: 4.0.0.0 Win32 Version: 4.6.1038.0

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll

System.Dynamic Assembly Version: 4.0.0.0 Win32 Version: 4.6.1038.0

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll

Anonymously Hosted DynamicMethods Assembly Assembly Version: 0.0.0.0 Win32 Version: 4.6.1080.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll

ExcelDna.DynamicDelegateAssembly Assembly Version: 0.0.0.0 Win32 Version: 1.4.1.1

CodeBase: file:///C:/Users/dummyUser/AppData/Local/assembly/dl3/YD2HJZQN.9Y6/ZYOB6J1L.4RY/2a13a945/43c4b1e3_10ecd101/AdditionalSecret.dll

WindowsBase Assembly Version: 4.0.0.0 Win32 Version: 4.6.1080.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll

System.Dynamic.DynamicAssembly Assembly Version: 0.0.0.0 Win32 Version: 4.6.1038.0

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll

CustomMarshalers Assembly Version: 4.0.0.0 Win32 Version: 4.6.1038.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll

UIAComWrapper Assembly Version: 1.1.0.14 Win32 Version: 1.4.1.1

CodeBase: file:///C:/Users/dummyUser/AppData/Local/assembly/dl3/YD2HJZQN.9Y6/ZYOB6J1L.4RY/2a13a945/43c4b1e3_10ecd101/AdditionalSecret.dll

Interop.UIAutomationClient Assembly Version: 12.0.20617.1 Win32 Version: 1.4.1.1

CodeBase: file:///C:/Users/dummyUser/AppData/Local/assembly/dl3/YD2HJZQN.9Y6/ZYOB6J1L.4RY/2a13a945/43c4b1e3_10ecd101/AdditionalSecret.dll

Accessibility Assembly Version: 4.0.0.0 Win32 Version: 4.6.1038.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

System.Runtime.Caching Assembly Version: 4.0.0.0 Win32 Version: 4.6.1073.0

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Caching/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Caching.dll

ASecret Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0

CodeBase: file:///C:/Users/dummyUser/AppData/Local/Apps/2.0/GECB4N5R.922/8ZC59JGZ.VDE/petd..vsto_a9744f7054a335ac_0001.0004_98065423ad4b1a12/ASecret.DLL

System.Web.Extensions Assembly Version: 4.0.0.0 Win32 Version: 4.6.1073.0

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Web.Extensions/v4.0_4.0.0.0__31bf3856ad364e35/System.Web.Extensions.dll

System.Web Assembly Version: 4.0.0.0 Win32 Version: 4.6.1073.0 built by: NETFXREL3STAGE

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll

govert commented 8 years ago

@Murtnowski This bug should already be fixed in the current version.

Murtnowski commented 8 years ago

Not a bug