Hi,
Even though Apply TM Template still seems to be unable to apply recognizers (as reported in https://community.rws.com/product-groups/trados-portfolio/rws-appstore/f/rws-appstore/40485/recognizers-not-working-in-applytm-template), I decided to forge ahead anyway and apply (only) custom abbreviation lists for English, Dutch and French to our 3,700 translation memories.
All is fine as long as the TMs are a combination of English, Dutch and French. However, Apply TM Template always crashes as soon as it comes across a TM with a different source or target language (i.e. one that is not included in our language resource template) throwing up the 'Object reference not set to an instance of an object' error. This is the error stack trace:
<SDLErrorDetails time="09/03/2022 09:06:36">
<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.Community.ApplyTMTemplate</Source>
<HResult>-2147467261</HResult>
<StackTrace><![CDATA[ at Sdl.Community.ApplyTMTemplate.Services.ResourceManager.ExcludeWhatIsNotNeeded(Settings settings, List`1 languageResourceBundles)
at Sdl.Community.ApplyTMTemplate.Services.ResourceManager.ApplyTemplateToTms(ILanguageResourcesContainer languageResourcesContainer, List`1 translationMemories, Settings settings)
at Sdl.Community.ApplyTMTemplate.ViewModels.MainWindowViewModel.<ApplyTmTemplate>b__66_0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Sdl.Community.ApplyTMTemplate.ViewModels.MainWindowViewModel.<ApplyTmTemplate>d__66.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
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 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.Show()
at System.Windows.Window.ShowDialog()
at Sdl.Community.ApplyTMTemplate.Studio.ApplyTMTemplateAction.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.WinForms.IgCommandBarAction.Execute()
at Sdl.Desktop.Platform.WinForms.IgCommandBarAction._lazyButtonTool_ToolClick(Object sender, ToolClickEventArgs e)
at Infragistics.Win.UltraWinToolbars.ToolBase.OnToolClick(ToolClickEventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds id, EventArgs e)
at Infragistics.Win.UltraWinToolbars.ToolBase.OnToolClick()
at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.DoClickProcessing(MouseEventArgs e)
at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.OnMouseUp(MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)
at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
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>Studio16</ProductVersion>
<EntryAssemblyFileVersion>16.2.9.9198</EntryAssemblyFileVersion>
<OperatingSystem>Microsoft Windows 10 Pro</OperatingSystem>
<ServicePack>NULL</ServicePack>
<OperatingSystemLanguage>1033</OperatingSystemLanguage>
<CodePage>1252</CodePage>
<LoggedOnUser>XXX</LoggedOnUser>
<DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
<ComputerName>XXX</ComputerName>
<ConnectedToNetwork>True</ConnectedToNetwork>
<PhysicalMemory>16661104 MB</PhysicalMemory>
</Environment>
</SDLErrorDetails>
Is this a bug or should be using this tool differently?
Many thanks,
Lieven
New stack trace upload without user and workstation details
[edited by: Lieven Lannoo at 8:20 AM (GMT 0) on 9 Mar 2022]

Translate