You are currently working on UAT 

"Object reference not set to an instance of an object" when accepting all changes in document

Hi,

we've got a return package from the proofreader and after succesful import it seems impossible to accept all changes because of this common "Object..." error:

Screenshot of Trados Studio showing an error message box with the text 'Object reference not set to an instance of an object.' and an 'OK' button.

How can we deal with it? Please advise.



Generated Image Alt-Text
[edited by: Trados AI at 4:51 PM (GMT 0) on 28 Feb 2024]
emoji
Parents Reply Children
  • <SDLErrorDetails time="12. 6. 2019 10:13: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.TranslationEditor.Actions.TrackChanges.AbstractTrackChangesCommandAction.CollectRowsWithTrackChanges(List`1 confirmationLevels)
       at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.TrackChanges.AbstractTrackChangesCommandAction.AcceptAllTrackChanges()
       at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.TrackChanges.TrackChangesAcceptAllAction.Execute()
       at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.<>c__DisplayClass30_0.<ExecuteAction>b__0()
       at Sdl.Desktop.Logger.Log.Resources(Object message, Action action)
       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.ToolMenuItem.OnClick()
       at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.DoClickProcessing(MouseEventArgs e)
       at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.OnMouseUp(MouseEventArgs e)
       at Infragistics.Win.TextUIElementBase.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.PopupControlBase.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>SDL Trados Studio</ProductName>
        <ProductVersion>15.0.0.0</ProductVersion>
        <EntryAssemblyFileVersion>15.1.2.48878</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows Server 2012 R2 Standard</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1033</OperatingSystemLanguage>
        <CodePage>1250</CodePage>
        <LoggedOnUser>SKRIVANEK\patrik.bulak</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>PRG-RD-SH21</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>16776756 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    Ok, thank you for your patience. Here you go. See the XML attached.

  • Hello ,

    Thanks for this- exactly what we need

    The following would suggest that it is the 'track changes' that is causing the problems 

    <StackTrace><![CDATA[ at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.TrackChanges.AbstractTrackChangesCommandAction.CollectRowsWithTrackChanges(List`1 confirmationLevels)
    at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.TrackChanges.AbstractTrackChangesCommandAction.AcceptAllTrackChanges()

    ..and after a little more research it would seem this is a very rare case scenario and could be caused by 'empty tracked changes'.

    Make sure that always working with "All segments" and not with "All content" in Studio> Review tab> Display Filter and manually accept the changes.

    Screenshot of Trados Studio interface showing the Review tab with Display Filter set to 'All segments'. A red arrow points to the 'Track Changes' option, and a green arrow indicates the 'Accept All Changes' command.

    If this does not help- then please take a look at the following article for a workaround.

    https://gateway.rws.com/csm?id=kb_article_view&sysparm_article=KB0032866

    Did this help?

    Oana Nagy | QA Engineer | RWS Group

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:52 PM (GMT 0) on 28 Feb 2024]
  • Hi ,

    thank you for your help but this doesn't work. I've made 3 replacements as I read the article and the problem remains the same: after opening sdlxliff there are still unacceptable changes:

    Screenshot of SDL Trados Studio with an 'Error' dialog box stating 'Object reference not set to an instance of an object.' The Track Changes option is highlighted in the toolbar.

    Any other idea?

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:52 PM (GMT 0) on 28 Feb 2024]
  • Hi

    What I would try is:

    1) Restart (not repair) Studio. It somehow works itself into a hole and a restart will fix it.

    2) If a restart does not fix it:

    a) backup the SDLXLIFF in case this does not work

    b) use Notepad++ or similar to find the problematic places in the SDLXLIFF. Look for mtype="x-sdl-deleted" and <mrk mtype="x-sdl-added" or sdl:revid=

    Corrupted image file, unable to view content.

    Delete the whole node from <mrk ... to ...</mrk>. In my test case, this is left:

    Corrupted image file, unable to view content.

    If you did all of this (like the KB article described) and there are still problems, I'd look for the strings "x-sdl-added" and "x-sdl-delete" individually, also "sdl:revid=", just to see whether there are fragments left.

    Daniel

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:52 PM (GMT 0) on 28 Feb 2024]
  • Hi @Daniel Hug, thank you!

    Anyway, this way is very similiar to accepting the changes one by one directly in Studio Ctrl+F9 which would be the least effective method. (Restart of TS didn't help.)

  • Hi

    if Steven is right and the problem is caused by an empty tracked change, you could try looking for this (Notepad++, Regex): 

    <mrk mtype="x-sdl-(deleted|added)" sdl:revid="\w+-\w+-\w+-\w+-\w+"\s?/>.<\/mrk>

    Daniel

  • Hi @Daniel Hug and ,

    you mean just like this?

    Trados Studio Replace dialog box with a regular expression in the 'Find what' field and an empty 'Replace with' field. Message at the bottom says 'Replace All: 0 occurrence was replaced.'

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:52 PM (GMT 0) on 28 Feb 2024]
  • Hi

    Yes, that is what I meant. "Replace all", but do backup your SDLXLIFF file before you do this. (So you tried and it did not find any occurrences?)

    You could make the regex more tolerant like this:

    <mrk mtype="x-sdl-(deleted|added)".*?>.<\/mrk> and just search if there are any occurrences?

    Daniel

  • Then I get this:

    Error dialog box in Trados Studio with message 'Failed to open 190502_akitmi_obsh_V2_2018_COR.docx.sdlxliff'. Lists several XML validation errors related to mismatched start and end tags.

    Any other idea?

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 4:52 PM (GMT 0) on 28 Feb 2024]
  • I thought you might just want to "find" them to have a look, not delete them (replace with empty sting)...

    You could make the regex more tolerant like this:

    <mrk mtype="x-sdl-(deleted|added)".*?>.<\/mrk> and just search if there are any occurrences?

    I think at this point you would have to make the file itself accessible otherwise it is getting to tentative. I don't know whether this is possible for you.

    Daniel