'Chat has crashed' | BETA 25.4.14.0 | Middle Tier

This forum is for programmers who have questions about the source code.
Post Reply
rinse-dental
Posts: 140
Joined: Wed Apr 06, 2022 12:04 pm

'Chat has crashed' | BETA 25.4.14.0 | Middle Tier

Post by rinse-dental »

See unhandled exception I've been been receiving from Chat. I suspect this is similar to the occasional issue I'll get with disconnects in Middle Tier. In this particular instance, chat threw an exception but Open Dental did not. Please let me know if there is anything I can do on my end to keep this from happening.

Code: Select all

Error Encountered - 1/9/2026 4:20:09 PM
Unhandled exception :  The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
System.Net.WebException
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at OpenDentBusiness.OpenDentalServer.ServiceMain.ProcessRequest(String dtoString) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Web References\OpenDentalServer\Reference.cs:line 78
   at DataConnectionBase.QueryMonitor.ProcessMonitoredPayload(Func`2 funcProcessPayload, String inputPayload)
   at OpenDentBusiness.RemotingClient.SendAndReceiveRecursive(IOpenDentalServer service, String dtoString, Boolean hasConnectionLost) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Remoting\RemotingClient.cs:line 370
   at OpenDentBusiness.RemotingClient.SendAndReceive(DataTransferObject dto, Boolean hasConnectionLost) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Remoting\RemotingClient.cs:line 357
   at OpenDentBusiness.RemotingClient.ProcessGetObject[T](DtoGetObject dto, Boolean hasConnectionLost) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Remoting\RemotingClient.cs:line 286
   at OpenDentBusiness.Meth.GetObject[T](MethodBase methodBase, Object[] parameters) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Remoting\Meth.cs:line 386
   at OpenDentBusiness.ChatMsgs.GetNewSince(Int64 seqCountLast, Int64 userNum) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Data Interface\ChatMsgs.cs:line 32
   at OpenDental.FrmChat.dispatcherTimer_Tick(Object sender, EventArgs e) in C:\Development\Versioned\OpenDental\WpfOD\Frms\FrmChat.xaml.cs:line 829
   at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
   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)
-------------------------------------------
Inner exception:  Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
System.IO.IOException
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
   at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
-------------------------------------------
Inner exception:  An existing connection was forcibly closed by the remote host
System.Net.Sockets.SocketException
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
SLeon
Posts: 605
Joined: Mon Mar 01, 2021 10:00 am

Re: 'Chat has crashed' | BETA 25.4.14.0 | Middle Tier

Post by SLeon »

Good morning,

Thank you for reporting this issue. A few Middle Tier issues were fixed in OD Chat and will be in the 25.3.47 and 25.4.15 versions. This is expected to be released within the coming week. If you continue to experience this issue on one of these versions, please update this thread.
rinse-dental
Posts: 140
Joined: Wed Apr 06, 2022 12:04 pm

Re: 'Chat has crashed' | BETA 25.4.14.0 | Middle Tier

Post by rinse-dental »

Great - thanks for letting me know. I've upgraded to BETA 25.4.15 - this resolved another issue we were getting on some (but not all) clients. Likely not relevant but I've included the exception from 25.4.14 should it be useful.

Question - I suspect like a lot of practices, we have shared PCs with shared Windows Logins. We rely on Open Dental auth to manage individual users. We noticed that once a user (e.g. User A) logs into Open Dental and opens Chat, that Chat window remains logged in as as User A regardless of which user is currently logged into Open Dental.

Is this intended behavior? If so, do you have any plans to sync and maintain Open Dental <> Chat user/auth so that if User A logs out of Open Dental, then User A is also logged out of chat? Unfortunately for us, it won't work as designed. :(

25.4.14 Exception on some clients.

Code: Select all

Error Encountered - 1/14/2026 1:11:17 PM
Unhandled exception :  No database context has been set.
System.Exception
   at OpenDentBusiness.CacheAbs`1.GetTableFromCache(Boolean doRefreshCache, Boolean useReadOnlyServer) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Cache\CacheAbs.cs:line 65
   at OpenDentBusiness.Prefs.GetTableFromCache(Boolean doRefreshCache) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Data Interface\Prefs.cs:line 177
   at OpenDentBusiness.Prefs.PrefCache.FillCacheIfNeeded() in C:\Development\Versioned\OpenDental\OpenDentBusiness\Data Interface\Prefs.cs:line 48
   at OpenDentBusiness.CacheDictAbs`3.GetContainsKey(KEY_TYPE key, Boolean isShort) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Cache\CacheDictAbs.cs:line 120
   at OpenDentBusiness.Prefs.GetOne(String prefName) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Data Interface\Prefs.cs:line 143
   at OpenDentBusiness.Prefs.GetOne(PrefName prefName) in C:\Development\Versioned\OpenDental\OpenDentBusiness\Data Interface\Prefs.cs:line 137
   at OpenDentBusiness.Help.IsEncryptedKeyValid() in C:\Development\Versioned\OpenDental\OpenDentBusiness\Misc\Help.cs:line 95
   at OpenDental.WindowFrame.Ellipse_MouseLeftButtonUp(Object sender, MouseButtonEventArgs e) in C:\Development\Versioned\OpenDental\WpfOD\Frame\WindowFrame.xaml.cs:line 170
   at System.Windows.Input.MouseButtonEventArgs.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.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.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.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(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)
SLeon
Posts: 605
Joined: Mon Mar 01, 2021 10:00 am

Re: 'Chat has crashed' | BETA 25.4.14.0 | Middle Tier

Post by SLeon »

Good afternoon,

We've made additional improvements to OD Chat, particularly in 25.4.17. Please let us know if you continue to get that Exception. Duplication steps would be helpful, if possible.

As to your question, we will discuss internally. Currently for your shared PC setup, users should log out of the Chat client as part of their Open Dental logout process. I will update this thread with any development on this.
Post Reply