Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Event subscriber crash not caught by NAV

$
0
0
Hi all,

One of my event subscribers in NAV2016 is causing an unhandled exception.
wlb0acgh3577.png

As soon as the event is fired, I'm getting this exception in the client:
uegdqbtni8yb.png

The NST event viewer:
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace:
at Microsoft.Dynamics.Nav.EventSubscription.NavEventScope.CallEventSubscriber(NavEventSubscription subscriber, NavCodeunit subscriberCodeunitInstance, Object[] parameters)
at Microsoft.Dynamics.Nav.EventSubscription.NavEventScope.ProcessCallToAllSubscribers(NavApplicationObjectBase callerApplicationObject, PrepareParametersCallBack prepareParameters)
at Microsoft.Dynamics.Nav.Runtime.NavRecord.ValidateField(Action`1 fieldEvent, NCLMetaField metaField, Boolean isUserInput)
at Microsoft.Dynamics.Nav.Runtime.NavRecord.Validate(NCLMetaField metaField, NavValue newValue, NavRecord callerRecord, Boolean isUserInput)
at Microsoft.Dynamics.Nav.Runtime.NavRecord.Validate(NCLMetaField metaField, NavValue newValue, NavRecord callerRecord)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit60015.CreateServItemLines_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit60015.CreateServItemLines(INavRecordHandle ServRegHeader, INavRecordHandle vRecServHeader)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit60015.WizardFinish_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit60015.WizardFinish(INavRecordHandle vRecServRegHeader)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit60015.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.BusinessApplication.Page60015.FinishWizard_Scope.OnRun()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Page60015.FinishWizard()
at Filter.InvokeWithFilter(NavMethodScope )
at Microsoft.Dynamics.Nav.BusinessApplication.Page60015.Finish_a45_OnAction()
Source: Microsoft.Dynamics.Nav.Ncl
HResult: -2147467261


If I remove the subscriber, the issue is gone. As soon as I manually re-create it, it crashes again.
There is no code behind the validate of the field. And no real code in the subscriber (it even crashes with 'IF TRUE THEN;').

Any ideas?


Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>