Overriding the structure information leads to GetMostSignificantStructureContext error

Hello there

I am trying to develop an extension to the standard XLIF filter, which overrides the information in the structure info column on the right hand side.

Example: paragraphUnit.Properties.Contexts.Contexts[1].DisplayText = "TEST";

This works well, as long as I only use "Translate single file" to open and process an XLIF file.

However, when I create a project, an object reference error is thrown. The error is actually not thrown by the extension code, but seems to come from the framework. The SDL XLIFF file resulting from the Convert task cannot be opened in the Studio Editor, an empty page is shown.

Below is the stack trace produced when creating the project. Any idea of what is happening here? In what way is the conversion to SDL XLIFF different when opening a single file from creating a project?

<SDLErrorDetails time="8/14/2015 1:09:04 PM">
  <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.LanguagePlatform.TranslationMemoryTools</Source>
    <HResult>-2147467261</HResult>
    <StackTrace><![CDATA[   at Sdl.LanguagePlatform.TranslationMemoryTools.TUConverter.GetMostSignificantStructureContext(IParagraphUnitProperties paragraphProperties)
   at Sdl.LanguagePlatform.TranslationMemoryTools.TUConverter.BuildLinguaTranslationUnitInternal(LanguagePair lp, ISegmentPair sp, IParagraphUnitProperties paragraphProperties, Boolean stripTags, Boolean excludeTagsInLockedContentText, Boolean acceptTrackChanges, Boolean alignTags, Boolean& hasSourceTrackChanges, Boolean includeTrackChanges)
   at Sdl.ProjectApi.AutomaticTasks.TranslationMemoryLookupContentProcessor.ProcessWaitingParagraphs()
   at Sdl.ProjectApi.AutomaticTasks.TranslationMemoryLookupContentProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
   at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
   at Sdl.FileTypeSupport.Filters.Processors.SegmentRenumberingBilingualProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
   at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
   at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.BilingualContentHandlerAdapter.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
   at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
   at Sdl.FileTypeSupport.Framework.BilingualApi.AbstractBilingualContentProcessor.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
   at Sdl.FileTypeSupport.Framework.Integration.LocationMarkerLocator.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
   at Sdl.FileTypeSupport.Framework.Integration.AbstractBilingualProcessorContainer.ProcessParagraphUnit(IParagraphUnit paragraphUnit)
   at Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi.ParagraphUnitBuffer.ProcessParagraphUnit(IParagraphUnit pu)
   at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.OutputParagraphUnit(IParagraphUnit pu)
   at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseLocalizableParagraphUnit(transunit transunit, LockTypeFlags lockFlags)
   at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseTransUnit(transunit transunit)
   at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.ParseGroup(group group)
   at Sdl.FileTypeSupport.Bilingual.SdlXliff.XliffFileReader.OnGroup(XmlElement groupElement)
   at Sdl.FileTypeSupport.Bilingual.SdlXliff.SdlXliffFeeder.<ContinueScanning>b__f(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.ProjectApi.Implementation.TaskExecution.ContentProcessingTaskImplementation.TaskFileExecuter.Parse(String targetFilePath)]]></StackTrace>
  </Exception>
  <Environment>
    <ProductName>SDL Trados Studio</ProductName>
    <ProductVersion>11.0.0.0</ProductVersion>
    <EntryAssemblyFileVersion>11.2.4409.10</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows Server 2008 R2 Enterprise </OperatingSystem>
    <ServicePack>Service Pack 1</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>GLOBAL\D047359</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.18063</DotNetFrameWork>
    <ComputerName>DEWDFM6094</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>33549656 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>
 
Parents Reply Children
No Data