NAV 2016 debugger crashes in code that calls XML functions

rsaritzkyrsaritzky Member Posts: 469
Hi all,

I'm trying to debug some code that communicates with the Fedex web service. An XML message is formatted and sent to the web service. If I set a breakpoint in that codeunit and click on any line that calls the XML Mgt codeunit, the debugger crashes. Here are the event logs. This one is on the local workstation:

Type: Microsoft.Dynamics.Nav.Client.NavClientClosingException
Fatal: False
ShowError: True
Message: This operation cannot be completed. There is no active connection to the server. Close the application and start it again.
StackTrace:
     at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoExecute(Func`1 execute)
     at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.DoRethrowWithCatchException(Exception exception, Boolean designMode)
     at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.WinFormsDispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs eventArgs)
     at Microsoft.Dynamics.Framework.UI.WinForms.WinFormsDispatcher.HandleDispatcherException(Object sender, Exception e)
     at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
     at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
     at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
     at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
     at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
     at Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession.RunMessagePump()
     at Microsoft.Dynamics.Nav.Client.WinClient.NavWinFormsClientSession.RunCore()
     at Microsoft.Dynamics.Nav.Client.WinClient.NavClientErrorHandler.ExecuteAndCatchExceptions(Func`1 execute)
Source: Microsoft.Dynamics.Nav.Client.WinClient
HResult: -2146233088
----------------------------------
Type: Microsoft.Dynamics.Nav.Types.NavConnectionLostException
Message: This operation cannot be completed. There is no active connection to the server. Close the application and start it again.
StackTrace:
     at Microsoft.Dynamics.Nav.Client.WinClient.ExceptionHandler.<>c__DisplayClass6.<DoRethrowWithCatchException>b__4()
     at Microsoft.Dynamics.Nav.Client.WinClient.NavClientErrorHandler.ExecuteAndCatchExceptions(Func`1 execute)
Source: Microsoft.Dynamics.Nav.Client.WinClient
HResult: -2146233088
----------------------------------
Type: Microsoft.Dynamics.Nav.Types.NavConnectionLostException
Message: This operation cannot be completed. There is no active connection to the server. Close the application and start it again.
StackTrace:
     at Microsoft.Dynamics.Nav.Client.ServiceConnection.CallServer[T](BeginCallServerMethod beginCallServerMethod, EndCallServerMethod`1 endCallServerMethod)
     at Microsoft.Dynamics.Nav.Client.ServiceConnectionBase.ActionField(NavRecordState& state, NavDataSet recDataSet, Int32 controlId)
     at Microsoft.Dynamics.Nav.Client.DataBinder.NstDataAccess.ActionMethod(Int32 controlId)
     at Microsoft.Dynamics.Nav.Client.Actions.InvokePageTriggerAction.InvokeTrigger(LogicalControl logicalControl, UISession uiSession)
     at Microsoft.Dynamics.Nav.Client.Actions.InvokePageTriggerAction.InvokeCore(LogicalControl logicalControl, Object state, UISession uiSession)
     at Microsoft.Dynamics.Framework.UI.LogicalAction.InvokeCoreWithErrorHandling(LogicalControl logicalControl, Object state, UISession uiSession)
     at Microsoft.Dynamics.Framework.UI.LogicalAction.DoInvoke(LogicalControl logicalControl, UISession uiSession)
     at Microsoft.Dynamics.Framework.UI.ActionControl.Invoke()
     at Microsoft.Dynamics.Framework.UI.Windows.ActionsHelper.ModalitySafe(Action action)
     at Microsoft.Dynamics.Framework.UI.Windows.ActionsHelper.ModalitySafeInvoke(ActionControl actionControl)
     at Microsoft.Dynamics.Framework.UI.Windows.ActionControlAdapterBase.DefaultInvokeAction(LogicalControlAdapter adapter, ActionControl actionControl)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInActionControl(ActionControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKey(LogicalControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInChildren(LogicalControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKey(LogicalControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInChildren(LogicalControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKey(LogicalControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInChildren(LogicalControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKey(LogicalControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInChildren(LogicalControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyAll(LogicalControl control)
     at Microsoft.Dynamics.Framework.UI.WinForms.ProcessShortcutHelper.ProcessShortcutKeyInLogicalControlsFromCurrentControl(Boolean execute)
     at Microsoft.Dynamics.Framework.UI.WinForms.LogicalFormAdapter.ProcessKey(Keys keyData)
     at Microsoft.Dynamics.Framework.UI.WinForms.LogicalFormAdapter.BusinessForm_PreviewProcessCmdKey(Object sender, HandledPreviewKeyDownEventArgs e)
     at Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessForm.OnPreviewProcessCmdKey(HandledPreviewKeyDownEventArgs e)
     at Microsoft.Dynamics.Framework.UI.WinForms.Controls.BusinessForm.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
     at Microsoft.Dynamics.Framework.UI.WinForms.Controls.ExpanderBox.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Integration.ElementHost.ProcessCmdKey(Message& msg, Keys keyData)
     at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
     at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
     at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
Source: Microsoft.Dynamics.Nav.Client.ServiceConnection
HResult: -2146233088

I've attached a file for the event log on the server (message post is too many characters otherwise)

Has anyone had issues with debugging calls to XML Mgt?

Ron
Ron

Answers

  • AquirAquir Member Posts: 23
    Are you using some standard DotNet DLL to communicate with the Webservice or something 3rd party?

    based on this line
    System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager
    

    it's trying to call some unmanaged code... :confused:
  • rsaritzkyrsaritzky Member Posts: 469
    Thanks for making that observation. This code was built by an Addon vendor, so I will bring that to their attention.

    Ron
    Ron
Sign In or Register to comment.