OpenAI Provider for Trados makes Studio crash once every second time after opening a file

Hello

I have open a ticket with support, but they cannot help me because the problem is generated by OpenAI Provider for Trados (Studio 2024). This is the ticket (even if the problem at the beginning was another, look at the last comments): https://gateway.sdl.com/communitycasedetail?caseId=500Vm00000BBlLTIA1

Every now and then Studio crashes after opening a file and the culprit is the plugin OpenAI (in the stacktrace, see attached files).

I did many things to try to fix the problem:

  1. I deleted the prompts in Italian and redid everything in English as I thought maybe this was the problem.
  2. I deleted all settings and started from scratch in Studio
  3. I installed Windows from scratch (but I have the same problem also on my laptop, so it should not be related to Windows installation)
  4. I disabled the Termbase Viewer, as Studio crashes everytime I open a file and the Termbase Viewer tries to load a termbase (a couple of minutes).
  5. I hid the Termbase Viewer for the same reason.

Nothing was useful. Studio does not crash only when OpenAI Provider is disabled or uninstalled. But I need it to work, as when it does not crash it is a powerful tool to improve productivity.

This did not happen with the last Beta of Studio 2024.

Can somebody help please? Thank you and kind regards,

Angelo

<SDLErrorDetails time="24.07.2024 12:39:06">
  <ErrorMessage>Object reference not set to an instance of an object.</ErrorMessage>
  <Exception>
    <Type>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <HelpLink />
    <Source>OpenAI.Provider</Source>
    <HResult>-2147467261</HResult>
    <StackTrace><![CDATA[   at OpenAI.Provider.ViewModel.TranslationViewModel.GetTranslationCacheItem()
   at OpenAI.Provider.ViewModel.TranslationViewModel.<>c__DisplayClass134_0.<OnChangeSegment>b__0()
   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)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(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 Sdl.TranslationStudio.Application.Launcher.RunApplication()]]></StackTrace>
  </Exception>
  <Environment>
    <ProductName>Trados Studio</ProductName>
    <ProductVersion>Studio18</ProductVersion>
    <EntryAssemblyFileVersion>18.0.0.1013</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 11 Pro</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1040</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>Office2022Win11\angelo.caltagirone</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>OFFICE2022WIN11</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>33257044 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>
<SDLErrorDetails time="26.07.2024 09:09:21">
  <ErrorMessage>Object reference not set to an instance of an object.</ErrorMessage>
  <Exception>
    <Type>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <HelpLink />
    <Source>OpenAI.Provider</Source>
    <HResult>-2147467261</HResult>
    <StackTrace><![CDATA[   at OpenAI.Provider.ViewModel.TranslationViewModel.GetTranslationCacheItem()
   at OpenAI.Provider.ViewModel.TranslationViewModel.<>c__DisplayClass134_0.<OnChangeSegment>b__0()
   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)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(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 Sdl.TranslationStudio.Application.Launcher.RunApplication()]]></StackTrace>
  </Exception>
  <Environment>
    <ProductName>Trados Studio</ProductName>
    <ProductVersion>Studio18</ProductVersion>
    <EntryAssemblyFileVersion>18.0.0.1013</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 11 Pro</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1040</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>Office2022Win11\angelo.caltagirone</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>OFFICE2022WIN11</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>33257044 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

emoji
Parents
  • It happened again. But this time after reopening Studio I had this new message:

    <SDLErrorDetails time="07.08.2024 15:41:45">
      <ErrorMessage>Collection was modified; enumeration operation may not execute.</ErrorMessage>
      <Exception>
        <Type>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2146233079</HResult>
        <StackTrace><![CDATA[   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
       at Sdl.TranslationStudio.Editor.Terminology.ProjectTermbasesLoader.CancelAllInitializing()
       at Sdl.TranslationStudio.Editor.Terminology.ProjectTermbasesLoader.Dispose()
       at Sdl.TranslationStudio.Editor.Terminology.TermAccessProvider.Dispose()
       at Sdl.TranslationStudio.Editor.EditorService.OnApplicationStop(OnApplicationStopEvent e)
       at System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
       at System.Reactive.Sink`1.ForwardOnNext(TTarget value)
       at System.Reactive.IdentitySink`1.OnNext(T value)
       at System.Reactive.Sink`1.ForwardOnNext(TTarget value)
       at System.Reactive.Linq.ObservableImpl.OfType`2._.OnNext(TSource value)
       at System.Reactive.Subjects.Subject`1.OnNext(T value)
       at Sdl.Desktop.Platform.Implementation.Services.EventAggregator.Publish[TEvent](TEvent sampleEvent)
       at Sdl.Desktop.Platform.Implementation.Studio.Exit(Boolean restart, String[] restartArguments)
       at Sdl.Desktop.Platform.Implementation.Studio.Close(Boolean restart, String[] restartArguments)
       at Sdl.Desktop.Platform.Implementation.Studio.Close()
       at Sdl.TranslationStudio.Application.Launcher.RunApplication()
       at Sdl.TranslationStudio.Application.Launcher.Main(String[] args)]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>Trados Studio</ProductName>
        <ProductVersion>Studio18</ProductVersion>
        <EntryAssemblyFileVersion>18.0.0.1013</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 11 Pro</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1040</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>Office2022Win11\angelo.caltagirone</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>OFFICE2022WIN11</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>33257044 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    emoji
  • Hi   - the first errors seem to come from the cache within the OpenAI Provider. Can you try disabling the cache in the options to see if this stabilizes the provider? I know this may increase traffic and cost but it might be good to try and isolate this to that option and we can then take things from there.

    Screenshot of RWS AppStore Applications settings showing options under 'Search Options' with 'Use In-process caching' checked and a 'Reset cache' button.

    You could also experiment just with resetting cache before opening a new file.


    Thanks, Daniel

    Daniel Brockmann
    Team Trados @ RWS

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 11:45 AM (GMT 1) on 9 Aug 2024]
Reply Children