Page 1 of 1

OD Chat | Unhandled exception on Middle Tier (Bug report)

Posted: Mon Dec 01, 2025 8:27 am
by rinse-dental
This is a beta feature so I'm simply sharing in the event it's helpful with bug bashing. We're using version 25.3.35.0.

Code: Select all

Error Encountered - 12/1/2025 8:22:18 AM
Unhandled exception :  Middle Tier, incorrect number of parameters passed to method GetForChat.
Expected parameter count: 2
Actual parameter count: 1
System.ApplicationException
   at OpenDentBusiness.DtoObject.ConstructArray(MethodBase methodBase, Object[] objArrayParams) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Remoting\DtoObject.cs:line 197
   at OpenDentBusiness.Meth.GetObject[T](MethodBase methodBase, Object[] parameters) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Remoting\Meth.cs:line 379
   at OpenDentBusiness.ChatMsgs.GetForChat(Int64 chatNum, Int64 userNum) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Data Interface\ChatMsgs.cs:line 15
   at OpenDental.FrmChat.FillMessages(Boolean doRefreshInPlace) in C:\Development\Versioned\OpenDental\WpfOD\Frms\FrmChat.xaml.cs:line 4114
   at OpenDental.FrmChat.SelectChat(Int32 idx, Boolean doRefreshInPlace) in C:\Development\Versioned\OpenDental\WpfOD\Frms\FrmChat.xaml.cs:line 5053
   at OpenDental.FrmChat.Frm_Load(Object sender, EventArgs e) in C:\Development\Versioned\OpenDental\WpfOD\Frms\FrmChat.xaml.cs:line 967
   at OpenDental.FrmODBase._windowFrame_Loaded(Object sender, RoutedEventArgs e) in C:\Development\Versioned\OpenDental\WpfOD\Frame\FrmODBase.cs:line 1106
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Re: OD Chat | Unhandled exception on Middle Tier (Bug report)

Posted: Mon Dec 01, 2025 9:31 am
by SLeon
Thank you for sharing this. We will address this bug shortly.

Re: OD Chat | Unhandled exception on Middle Tier (Bug report)

Posted: Mon Dec 08, 2025 9:28 am
by jsalmon
The bug "Several middle-tier calls were broken" has been fixed and will be released with v25.3.39
https://opendentalsoft.com:1943/ODBugTr ... sions.aspx

Re: OD Chat | Unhandled exception on Middle Tier (Bug report)

Posted: Wed Dec 10, 2025 9:42 am
by rinse-dental
jsalmon wrote: Mon Dec 08, 2025 9:28 am https://opendentalsoft.com:1943/ODBugTr ... sions.aspx
Thanks. On Middle Tier connected clients, we are now able to open chat, view chats, and even create a new chat; however, we now receive the following error when trying to send a chat. This is using version 25.3.39.0. Chat on the server continues to work well.

Code: Select all

Error Encountered - 12/10/2025 9:39:29 AM
Unhandled exception :  No longer allowed to send sql directly.  Rewrite the calling class to not use this query:
UPDATE chatuserattach SET IsRead=0 WHERE ChatNum=2 AND UserNum !=6
System.ApplicationException
   at OpenDentBusiness.Db.NonQ(String command, Boolean getInsertID, String columnNamePK, String tableName, OdSqlParameter[] parameters) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Db\Db.cs:line 349
   at OpenDentBusiness.Db.NonQ(String command, Boolean getInsertID, OdSqlParameter[] parameters) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Db\Db.cs:line 361
   at OpenDentBusiness.Db.NonQ(String command, OdSqlParameter[] parameters) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Db\Db.cs:line 366
   at OpenDentBusiness.ChatUserAttaches.<>c__DisplayClass4_0.<SetUnread>b__0() in C:\Development\Versioned\OpenDental\OpenDentBusiness\Data Interface\ChatUserAttaches.cs:line 64
   at OpenDentBusiness.ReportsComplex.RunFuncOnChatServer[T](Func`1 func, Boolean allowConnectionAttempt) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Reports\ReportsComplex.cs:line 171
   at OpenDentBusiness.ChatUserAttaches.SetUnread(Int64 chatNum, Int64 userNumExclude) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Data Interface\ChatUserAttaches.cs:line 64
   at OpenDental.FrmChat.SendNewMsg() in C:\Development\Versioned\OpenDental\WpfOD\Frms\FrmChat.xaml.cs:line 5358
   at OpenDental.FrmChat._richTextBoxNewMsg_PreviewKeyDown(Object sender, KeyEventArgs e) in C:\Development\Versioned\OpenDental\WpfOD\Frms\FrmChat.xaml.cs:line 2316
   at System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Re: OD Chat | Unhandled exception on Middle Tier (Bug report)

Posted: Mon Dec 15, 2025 8:52 am
by jsalmon
I'll create a bug ticket to look into the new error.

Re: OD Chat | Unhandled exception on Middle Tier (Bug report)

Posted: Mon Dec 15, 2025 3:23 pm
by jsalmon
The bug "In OD Chat, sending a message would crash the application for Middle-Tier users" has been fixed and will be released with v25.3.41 and v25.4.5.
https://opendentalsoft.com:1943/ODBugTr ... sions.aspx