"Object reference not set to an instance" caused by corrupted reportEvents.json file

ScottRFitzScottRFitz Posts: 1 New member
edited October 9, 2024 4:02PM in SQL Prompt
Just in case anyone else runs into this issue. 

SQLPrompt v 10.14.23.11448 was throwing an error on SSMS startup, causing SQLPrompt to be completely unresponsive.  The below error was logged on each SSMS startup.  

In the users subfolder \AppData\Local\Red Gate\SQL Prompt 10\ I noticed a file called "reportedEvents.json" - this file was filled with nothing but NULL characters.  Deleting this file, and restarting SSMS fixed my issue.  I've a attached a log file and the errant json file for reference.
2024-10-08 16:48:04.920 -07:00 [Error] Report error dialog UI shown System.NullReferenceException: Object reference not set to an instance of an object. at RedGate.SqlPrompt.UsageReporting.UsageData.ReportedEventsUtils.GetReportedEvents(IFile file) at DynamicInjector2db6c52d66b94f4abbddf91ced318b4e(Object[] ) at Ninject.Activation.Providers.StandardProvider.Create(IContext context) at Ninject.Activation.Context.ResolveInternal(Object scope) at Ninject.Activation.Context.Resolve() at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings, Boolean filterImplicitBindings) at Ninject.KernelBase.Resolve(IRequest request) at Ninject.Planning.Targets.Target`1.ResolveWithin(IContext parent) at Ninject.Activation.Providers.StandardProvider.GetValue(IContext context, ITarget target) at Ninject.Activation.Providers.StandardProvider.<>c__DisplayClass15_0.b__0(ITarget target) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Ninject.Activation.Providers.StandardProvider.Create(IContext context) at Ninject.Activation.Context.ResolveInternal(Object scope) at Ninject.Activation.Context.Resolve() at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings, Boolean filterImplicitBindings) at Ninject.KernelBase.Resolve(IRequest request, Boolean handleMissingBindings, Boolean filterImplicitBindings) at Ninject.KernelBase.Resolve(IRequest request) at Ninject.ResolutionExtensions.GetResolutionIterator(IResolutionRoot root, Type service, Func`2 constraint, IEnumerable`1 parameters, Boolean isOptional, Boolean isUnique) at Ninject.ResolutionExtensions.Get[T](IResolutionRoot root, IParameter[] parameters) at RedGate.SqlPrompt.EntryPointCommon.BaseConnect.Initialize(IKernel kernel, IDTEWrapper dte) at RedGate.SqlPrompt.SsmsCommon.AbstractSsmsConnect.Initialize(IKernel kernel, IDTEWrapper dte) at RedGate.SqlPrompt.SsmsPackage20.SsmsPackage.b__3_0(ILog logger, IKernel kernel, Action onTabsRestored) at RedGate.SqlPrompt.EntryPointCommon.Startup.<>c__DisplayClass0_0.b__0() at RedGate.SqlPrompt.UsageReporting.ErrorReporting.ErrorReporterWithUI.Do(Action action)

Tagged:
Sign In or Register to comment.