Trados 2015 Studio xlf handling - dreaded "Object reference not set..." error

Hi,

I've been using Studio 2015 for a project containing around 30 xlf files (around 150k words in total).  When I open all files together to make some edits, and save the files back out again, they seem to be getting messed up and then I cannot open any of them subsequently.  I get the infamous "Object reference not set to an instance of an object." error message and nothing else can be done.  Studio 2015 seems to be adding a whole pile of content to each of the sdlxliff files as I've noticed when I make a tiny change across the files and then save them out, each of them grows exponentially i.e. their size multiples from a few hundred KB to a few MB in size.

I had been using Studio 2014 on the same project (same file types and volumes) previously, and I was able to open all files together, make my changes and save out without encountering this error.  On 2015, I'm having multiple problems as are our translators.  It is causing me a lot of problems and delays, and unfortunately I cannot go back to the previous version now as our licenses are updated.

Thanks for any help.

Paul.

Parents
  • Hi Paul,

    Can you post the entire stack trace? (there should be a save button to save the error message)
    "Object reference not set to an instance of an object." is too generic and does not provide any information.
  • <SDLErrorDetails time="1/21/2016 11:56:30 AM">
    <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.FileTypeSupport.Bilingual.SdlXliff</Source>
    <HResult>-2147467261</HResult>
    <StackTrace><![CDATA[ at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseCommentMetadataElement(XmlElement cmtMetadataElement)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseDocInfoElement(XmlElement docInfoElement)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.OnDocInfo(XmlElement docInfo)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.SdlXliffFeeder.<ContinueScanning>b__0(ISdlXliffStreamContentHandler handler)
    at System.Collections.Generic.List`1.ForEach(Action`1 action)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.SdlXliffFeeder.ContinueScanning()
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ContinueParsing()
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseNext()
    at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext()
    at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
    at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
    at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.Load(IJobExecutionContext context)
    at Sdl.Desktop.Platform.Services.JobRequest.Execute(IJobExecutionContext context)
    at Sdl.Desktop.Platform.Implementation.Services.Job.<_worker_DoWork>b__3()
    at Sdl.Desktop.Platform.Implementation.Services.Log.Resources(Object message, Action action)
    at Sdl.Desktop.Platform.Implementation.Services.Job._worker_DoWork(Object sender, DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)]]></StackTrace>
    </Exception>
    <Environment>
    <ProductName>SDL Trados Studio</ProductName>
    <ProductVersion>12.0.0.0</ProductVersion>
    <EntryAssemblyFileVersion>12.0.4996.3</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 8.1 Pro</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>PH-LAPTOP\PH</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.34209</DotNetFrameWork>
    <ComputerName>PH-LAPTOP</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>8302592 MB</PhysicalMemory>
    </Environment>
    </SDLErrorDetails>
Reply
  • <SDLErrorDetails time="1/21/2016 11:56:30 AM">
    <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.FileTypeSupport.Bilingual.SdlXliff</Source>
    <HResult>-2147467261</HResult>
    <StackTrace><![CDATA[ at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseCommentMetadataElement(XmlElement cmtMetadataElement)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseDocInfoElement(XmlElement docInfoElement)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.OnDocInfo(XmlElement docInfo)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.SdlXliffFeeder.<ContinueScanning>b__0(ISdlXliffStreamContentHandler handler)
    at System.Collections.Generic.List`1.ForEach(Action`1 action)
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.SdlXliffFeeder.ContinueScanning()
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ContinueParsing()
    at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseNext()
    at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext()
    at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
    at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
    at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.Load(IJobExecutionContext context)
    at Sdl.Desktop.Platform.Services.JobRequest.Execute(IJobExecutionContext context)
    at Sdl.Desktop.Platform.Implementation.Services.Job.<_worker_DoWork>b__3()
    at Sdl.Desktop.Platform.Implementation.Services.Log.Resources(Object message, Action action)
    at Sdl.Desktop.Platform.Implementation.Services.Job._worker_DoWork(Object sender, DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
    at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)]]></StackTrace>
    </Exception>
    <Environment>
    <ProductName>SDL Trados Studio</ProductName>
    <ProductVersion>12.0.0.0</ProductVersion>
    <EntryAssemblyFileVersion>12.0.4996.3</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 8.1 Pro</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>PH-LAPTOP\PH</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.34209</DotNetFrameWork>
    <ComputerName>PH-LAPTOP</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>8302592 MB</PhysicalMemory>
    </Environment>
    </SDLErrorDetails>
Children
  • Thanks Paul,

    It appears to be due to some corrupt comments.

    You might not want to do this, but probably if you delete out all the comments, you will stop receiving this error.

    If you want to store your comments before erasing them, you could copy the sdlxliff files somewhere as a back up.

    Also, you could use the following plug-in to save them to an Excel file:

    Let me know how it goes.

  • Thanks for the feedback, Jesse.

    Do you know what could cause a corrupt comment, like what sort of characters etc. I should look out for? I'm wondering if I could just remove the troublesome comment(s), rather than the whole lot of them, which seems a bit drastic.

    Interestingly this doesn't seem to be a problem when the files are opened one at a time, only when all are opened together and saved out.

    Will take a look at that app and let you know how it goes, thanks!
  • Hi Paul,

    I should mention that the error is related to comments, but knowing the exact reason why will require the actual data to investigate.

    Also, are you using a third-party plug-ins that deal with comments? The error is coming from comment metadata.

    Unfortunately though, I don't know the exact reason why. My guess is it happens when an error occurs during saving the file.
    Trying to pinpoint the problem will be hard. If you are allowed to disclose the files, I could take a look, but otherwise one option would be to go file by file:
    1) Save backups of all the files
    2) Delete all the comments from one file
    3) See if the problem went away
    4) If it does, then the problem is in that file. Otherwise, restore the file with the backup

    I can't guarantee the above option will fix the problem.

    Also, if you are familiar with xml you could check the <cmt-meta-def> and <cmt-meta-data> tags in the sdlxliff file (most likely there is something wrong in these areas), but unless you really know what you are doing, I don't recommend this route.