Keyboard shortcut for inserting AI Assistant translation into target box crashing Trados Studio 2024 pretty consistently

As the title says, the keyboard shortcut (Ctrl+Shift+x) I have assigned for inserting the AI Assistant translation into the target box is crashing Trados Studio 2024 pretty consistently. Anyone else have this problem?

<SDLErrorDetails time="2024-07-22 22:33:42">
  <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.<>c__DisplayClass151_0.<ApplyTranslation>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>2057</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>PRECISION7740\mbeijer</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>PRECISION7740</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>66854716 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

<SDLErrorDetails time="2024-07-22 22:10:01">
  <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.<>c__DisplayClass151_0.<ApplyTranslation>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>2057</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>PRECISION7740\mbeijer</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>PRECISION7740</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>66854716 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

<SDLErrorDetails time="2024-07-22 18:06:33">
  <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.<>c__DisplayClass151_0.<ApplyTranslation>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>2057</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>PRECISION7740\mbeijer</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>PRECISION7740</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>66854716 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

emoji
  • Hmm, it's actually not just the shortcut I assigned to AI Assistant, but various keyboard shortcuts that are (pretty consistently) crashing Trados Studio 2024. The latest one to crash Studio is my shortcut for splitting segments (Alt+T).

    <SDLErrorDetails time="2024-07-22 23:04:12">
      <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>Sdl.TranslationStudio.Editor</Source>
        <HResult>-2147467261</HResult>
        <StackTrace><![CDATA[   at Sdl.TranslationStudio.Editor.AbstractActiveRangeAction.IsActionEnabled()
       at Sdl.TranslationStudio.Api.Implementation.Editor.AbstractActiveDocumentAction.UpdateAction()
       at Sdl.TranslationStudio.Editor.AbstractActiveRangeAction.sideBySideEditor_Target_Entered(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnGotFocus(EventArgs e)
       at System.Windows.Forms.Control.InvokeGotFocus(Control toInvoke, EventArgs e)
       at System.Windows.Forms.Control.WmSetFocus(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]></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>2057</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>PRECISION7740\mbeijer</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>PRECISION7740</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>66854716 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    I am getting loads of crashes at the moment. Is anyone else getting this many crashes per day? I'll try to keep track of the daily number, but feels like 30 or so a day!

    emoji
  •  

    I know you are an experienced AHK coder, but have you tried:

    a) separating the modifier keys from the "normal" keystrokes? (INstead of ^c, {CTRL down}, sleep 100, c, ... etc.

    b) increasing sleep times between keystrokes?

    Do you get crashes with normal Studio hotkeys as well, or only when you use AHK?

    Do you use any the AHK app?

    (Just wondering, I use AHK a lot, no problems yet.)

    emoji
  • Hi Daniel,

    All the shortcuts crashing Studio are Studio shortcuts, no AHK here. Although I do use AHK extensively in many other places!

    emoji
  • I am accumulating quite a collection of crash error messages! The latest one is Trados Crashes when when I press Alt+Down, which I have set to save a term to my RYSTUDIO termbase.

    <SDLErrorDetails time="2024-07-24 22:32:07">
      <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>RyS_Termbase_Presentation</Source>
        <HResult>-2147467261</HResult>
        <StackTrace><![CDATA[   at RyS_Termbase_and_Presentation_Plugin.cls162.()
       at RyS_Termbase_and_Presentation_Plugin.RySTermsPresentationViewPartControl.AddTerm(String source, String target)
       at RyS_Termbase_and_Presentation_Plugin.RySTermsPresentationViewPartControl.tsbtnNewConcept_Click(Object sender, EventArgs e)
       at RyS_Termbase_and_Presentation_Plugin.RySTermsPresentationViewPart.()
       at RyS_Termbase_and_Presentation_Plugin.RySTBTAAddTerm.Execute()
       at Sdl.Desktop.IntegrationApi.AbstractAction.Sdl.Desktop.IntegrationApi.Extensions.Internal.IAction.Execute()
       at Sdl.Desktop.IntegrationApi.Internal.Adaptors.InternalActionAdaptor.Execute()
       at Sdl.Desktop.Platform.Implementation.CommandBars.SimpleActionExecuter.Execute(ActionData actionData)
       at Sdl.Desktop.Platform.Implementation.ResourceLoggingInternalCommandExecuter`1.ExecuteWithResourceLogging(TCommandData commandData, String message)
       at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.ExecuteAction(IAction action, ActionOrigin origin, Boolean allowToggle)
       at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.ExecuteActionForShortcut(Keys shortcut)
       at Sdl.Platform.UI.StudioWindowForm.OnPreviewKeyDown(Keys keys)
       at Sdl.Platform.UI.GlobalKeysMessageFilter.PreFilterMessage(Message& m)
       at System.Windows.Forms.Application.ThreadContext.ProcessFilters(MSG& msg, Boolean& modified)
       at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
       at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(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>2057</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>PRECISION7740\mbeijer</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>PRECISION7740</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>66854716 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    emoji
  •  I have scanned through all the "object reference errors" listed for development and non are in the context of shortcuts.
    Sadly I cant reproduce your examples but I am still keen to keep this post moving forward if you are still having problems.
    Can you confirm if you still need support?

    Lyds

    Lydia Simplicio | RWS Group

    _______
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Thanks Lydia!

    No, I'm no longer really in need of support on this one. Sadly, all the constant crashing made me go back to CafeTran for the time being. I will check back now and again, but am mainly using CafeTran again as it never crashes. I wonder if it might be related to using the RYSTUDIO terminology plugin, which I need to use because Trados termbases still (!!!) do not work reliably. 

    Michael

    emoji