When opening or working on an sdlxliff in Trados Studio 2017/2021, this error is shown: The given key was not present in the dictionary. The stacktrace of the error is:
<StackTrace><![CDATA[ at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Sdl.DesktopEditor.Control.Support.RowSynchronizer.ChangeLayoutRowHeights(Int32 cellIndex) at Sdl.DesktopEditor.Control.Support.RowSynchronizer.SetCellHeight(ISynchronizableCell cell, Int32 height, ISynchronizableLayout layout) at Sdl.DesktopEditor.Control.Support.LayoutSynchronizer.CellHeightChanged(ISynchronizableCell cell, Int32 newHeight, ISynchronizableLayout layout) at FrameworkEditControl.DetermineCellHeight(CT_PaintContext* rco_pc, Int32 rowNumber, Int32 minHeight) at FrameworkDocumentControl.co_ProcessCompletedRows(FrameworkDocumentControl* , set<unsigned int\,std::less<unsigned int>\,std::allocator<unsigned int> >* , Boolean b_processVisibleOnly, Boolean* pb_heightsChanged) at FrameworkDocumentControl.vv_ProcessLayoutTimer(FrameworkDocumentControl* ) at FrameworkDocumentControl.vl_WindowProc(FrameworkDocumentControl* , HWND__* h_wnd, UInt32 n_msg, UInt32 w_p, Int32 l_p) at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at System.Windows.Forms.Control.DefWndProc(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> |
Workaround 1: 1. Open the *.sdlxliff in Trados Studio - Editor View 2. While in Trados Studio, go to File - Advanced Save - Save Source File As 3. Reopen the newly saved file in Trados Studio Workaround 2:
Source: <seg-source> <g id="988"> <mrk mtype="seg" mid="346">Lyr.</mrk> <mrk mtype="seg" mid="347"> <mrk mtype="x-sdl-location" mid="648899f5-f4d5-4eac-a7c5-1c05df82a3c8"/>Arise, children of the Fatherland, the day of glory has arrived!</mrk> <mrk mtype="x-sdl-location" mid="0f8471b1-068b-4630-9bee-e5e332b51728"/> </g> </seg-source> Broken target: <target> <g id="988"> <mrk mtype="seg" mid="346">Allons enfants de la Patrie, le jour de gloire est arrivé!</mrk> </g> </target> Fixed target: <target> <g id="988"> <mrk mtype="seg" mid="346">Lyr.</mrk> <mrk mtype="seg" mid="347">Allons enfants de la Patrie, le jour de gloire est arrivé!</mrk> </g> </target> |
This may happen when during a merging operation one of the target segments was not inserted correctly in the *.sdlxliff. It may also be useful to check the source file for irregularities. |