TextFragment NullReference Exception after executing function AppendText()

I have a Null Reference Exeption in my textFragment Object as soon as I attach the TextFragment to a page with the AppendText() function.

-> But only if I set a textSegment to the textFragment.

Without textSegement there is no null exeption -> textFragment.Segments.Add(textSegment);

But the textFragment is not null :_(

Document document = new Document();
Page page = document.Pages.Add();
page.SetPageSize(tcmToPoints(21000), tcmToPoints(29700));

TextFragment textFragment = new TextFragment();
TextSegment textSegment = new TextSegment();
TextState textState = new TextState();
textState.Font = FontRepository.OpenFont(Path.Combine(ToolDirectory, "ARIBLK.TTF"));
textState.Font.IsEmbedded = true;
textState.Font.IsSubset = true;
textState.ForegroundColor = Color.FromArgb(255, 0, 255, 0);
textState.BackgroundColor = Color.FromArgb(0, 255, 255, 255);
textState.FontSize = 36;
textSegment.TextState = textState; ;
textSegment.Position = new Position(tcmToPoints(10437), yStartTextFragment(5924));
textSegment.Text = "WELT";
textFragment.Segments.Add(textSegment);

TextBuilder builder = new TextBuilder(page);
builder.AppendText(textFragment);

document.OptimizeResources(new OptimizationOptions()
{
	RemoveUnusedObjects = true,
	SubsetFonts = false
});

document.Convert(Path.Combine(TempDirectory, "convert-log.txt"), PdfFormat.v_1_4, ConvertErrorAction.None);
document.Save(SpoolFilePath);

@RobFormware

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input font file (ARIBLK.TTF).
    Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.