Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Windows Client crashes with System.NullReferenceException after Windows Update

Posted on by


If your Dynamics NAV or Dynamics 365 Business Central Windows Client does not start after a windows update, be sure to look inside Event Viewer Application Log and see if you find a stack trace like the following

 

Type: Microsoft.Dynamics.Nav.Types.Exceptions.WatsonReportException

Message: <ii>Watson report failure</ii>

StackTrace:

     bij Microsoft.Dynamics.Nav.Watson.WatsonHandler.SendWatsonReport(Exception exception, Boolean showUI, Assembly assembly, String applicationName)

     bij Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.HandleWatson(Exception exception, Int32& runCore)

Source: Microsoft.Dynamics.Nav.Watson

HResult: -2146233088

----------------------------------

Type: System.NullReferenceException

Message: <ii>De objectverwijzing is niet op een exemplaar van een object ingesteld.</ii>

StackTrace:

     bij Microsoft.Dynamics.Nav.Client.WinClientExcelExportService.FindMajorVersion(RegistryKey registryKey)

     bij Microsoft.Dynamics.Nav.Client.WinClientExcelExportService.<.ctor>b__8_0(RegistryKey regKey)

     bij Microsoft.Dynamics.Nav.Client.WinClientExcelExportService.FindRegistryKey(RegistryHive hive, String keyName, Action`1 action)

     bij Microsoft.Dynamics.Nav.Client.WinClientExcelExportService.FindFirstRegistryKey(String keyName, Action`1 action)

     bij Microsoft.Dynamics.Nav.Client.WinClientExcelExportService..ctor(UISession uiSession)

     bij Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession.<>c.<AddServices>b__22_6(UISession uis)

     bij Microsoft.Dynamics.Framework.UI.ClientSessionCore.AddUIService(Func`2 addService)

     bij Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession.AddServices()

     bij Microsoft.Dynamics.Framework.UI.ClientSessionCore.Prepare()

     bij Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.SetupClientSession()

     bij Microsoft.Dynamics.Nav.Client.WinClient.StartWinFormsClient.RunCore()

Source: Microsoft.Dynamics.Nav.Client.WinClient

HResult: -2147467261

 

SOLUTION

This event should have happened right after a Windows update and Dynamics NAV / Dynamics 365 Business Central client is a victim of this.

Some registry keys getting lost with that, unfortunately, which the application needs as it is checking during client startup if Microsoft Excel is installed and e.g. which version has been deployed.

To resolve this problem, you have to verify that these registry path and keys exists 

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe

@="C:\\Program Files\\Microsoft Office\\Root\\Office16\\EXCEL.EXE"
"Path"="C:\\Program Files\\Microsoft Office\\Root\\Office16\\"
"UseURL"="1"
"SaveURL"="1"

If these are not existing, you have to add them manually or through a .reg file. (NOTE: these are related to Office16).

Categories:

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,537 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,520 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans