"Object reference not set to an instance of an object" from particular segment (cs-CZ > sr-Latn-CS)

Hi, 

I just wanted to ask you for help with this error which appears always from particular segment 65 and the Studio is freezed with this message then:

<SDLErrorDetails time="2. 11. 2022 16:04:09">
  <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.Core.Globalization</Source>
    <HResult>-2147467261</HResult>
    <StackTrace><![CDATA[   at Sdl.Core.Globalization.UnitMetadata.UnitMetadataRegistry.TryHierachy[T](Func`2 f, String languageCode)
   at Sdl.Core.Globalization.UnitMetadata.UnitMetadataRegistry.GetPreferredLabelValueSet(String unitKey, String languageCode)
   at Sdl.LanguagePlatform.Core.Tokenization.MeasureToken.Localize(CultureInfo culture, AutoLocalizationSettings autoLocalizationSettings, ILocalizableToken originalMemoryToken, Boolean adjustCasing)
   at Sdl.LanguagePlatform.Core.Tokenization.MeasureToken.Localize(CultureInfo culture, AutoLocalizationSettings autoLocalizationSettings)
   at Sdl.TranslationStudio.Editor.TranslationEditor.Intellisense.SuggestionData..ctor(DocumentToken documentToken, CultureInfo culture, AutoLocalizationSettings localizationSettings)
   at Sdl.TranslationStudio.Editor.TranslationEditor.Intellisense.TagFormattingDataProvider.ProcessDocumentTokens(SideBySideEditor editor, IList`1 suggestionData)
   at Sdl.TranslationStudio.Editor.TranslationEditor.Intellisense.TagFormattingDataProvider.GetSuggestionData(EditingContext context)
   at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.LaunchTagFormattingWindowAction.GetSuggestionData(SideBySideEditor editor)
   at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.LaunchTagFormattingWindowAction.IsActionEnabled()
   at Sdl.TranslationStudio.Api.Implementation.Editor.AbstractActiveDocumentAction.UpdateAction()
   at Sdl.TranslationStudio.Api.Editor.AbstractSelectionDependentAction.OnSelectionChanged(IDocumentEditingView view)
   at Sdl.TranslationStudio.Api.Editor.DocumentEditingViewEventHandler.Invoke(IDocumentEditingView view)
   at Sdl.TranslationStudio.Editor.TranslationEditor.SelectionChangedDelayedEventHandler.<>c__DisplayClass27_0.<FireEvent>b__0()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(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 System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()]]></StackTrace>
  </Exception>
  <Environment>
    <ProductName>Trados Studio</ProductName>
    <ProductVersion>Studio16</ProductVersion>
    <EntryAssemblyFileVersion>16.2.12.9338</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>

  • the project was created in Trados Studio 2021 SR2 - 16.2.12.9338 (in 2017 it works without the error)
  • saving the target file immediately after creating a new project (and without translating) works well

Since we are using Studio 2021 this message appears regularly in projects into sr-Latn-CS (Former), always from particular segment. After that, it's impossible to do anything within the project (moving into next segments, analyze, pre-translation, exporting etc.). 

emoji