Page 1 of 1

com.oxygenxml.chemistry.e.fb error with a custom transform

Posted: Wed Mar 13, 2024 5:09 pm
by Vinny
Folks,
Starting today, I've got this message when I try to output PDF using a custom CSS stylesheet (PDF/HTML5/CSS transform):

[java] ERROR OxygenPDFChemistry - [CH][ERROR] Error com.oxygenxml.chemistry.e.fb "FOP stage failed: Cannot invoke "org.apache.fop.layoutmgr.LeafPosition.getLeafPos()" because "<local7>" is null"
[java] com.oxygenxml.chemistry.e.fb: FOP stage failed: Cannot invoke "org.apache.fop.layoutmgr.LeafPosition.getLeafPos()" because "<local7>" is null

Of course it looks like some bug in FOP. I remember stumbling on the same bug at some point in the past, which I had managed to skirt because it had happened when I had added specific contents, that I was able to alter until the bug went off. In this case, I’m starting from old, prewritten DITA source. Is there anyway to precisely locate what triggers the bug?

Thanks,
Vincent

Re: com.oxygenxml.chemistry.e.fb error with a custom transform

Posted: Wed Mar 13, 2024 5:30 pm
by Vinny
Well this seems partly linked to the CSS file, because if I change it, the bug goes away.

Re: com.oxygenxml.chemistry.e.fb error with a custom transform

Posted: Wed Mar 13, 2024 6:04 pm
by julien_lacour
Hello Vincent,

In order to analyze this I need a small sample where this problem occurs: usually one or more topics and the publishing template or at least the CSS stylesheet(s). Is it possible for you to send this at support@oxygenxml.com?

Note: If your DITA documents contain some sensitive content, you can randomize it by using Oxygen's Help > Support Tools > Randomize XML text content option. Create a copy of your DITA structure before doing this operation as the randomizing cannot be reverted.

Regards,
Julien

Re: com.oxygenxml.chemistry.e.fb error with a custom transform

Posted: Wed Mar 13, 2024 6:19 pm
by Vinny
Bonjour Julien,

I've succeeded in isolating the block of CSS code that triggers the error:

Code: Select all

.fig .title, .table .title, .image {
    text-align: center;
    font-family:'Avenir Next';
    font-size: 10pt;
    font-style: normal;
    font-weight: normal;
}
Specifically, it’s the text-align keyword (first line) which triggers the error. Commenting it out makes everything work like a charm again.
Do I still need sending you some sample material or is that info enough to investigate?

Merci pour tout,
Vincent

Re: com.oxygenxml.chemistry.e.fb error with a custom transform

Posted: Wed Mar 13, 2024 6:39 pm
by julien_lacour
Hello Vincent,

Unfortunately I think yes, I don't have this font on my side and I don't know from where you have it.
I need at least this font and the topic concerned by this problem as it could be related to the text to be displayed.
If you can isolate the topic and it contains no sensitive information you can share it here if you prefer.
From the few tests I made using <oXygen/> XML Editor 26.0, build 2024012406 the PDF is generated correctly.

Regards,
Julien

Re: com.oxygenxml.chemistry.e.fb error with a custom transform

Posted: Wed Mar 13, 2024 7:04 pm
by Vinny
Julien,

okay. I’ll prepare a suitable archive file and send it to the address you mentioned (probably tomorrow). The 'Avenir Next' font is bundled with MacOS.

Further investigation shows that this is not font related (switching to ‘monospace’ or some other font doesn’t change anything). However, changing text-align to either left or right solves the issue, so the problem is specifically tied to the center alignment request. And it’s the .fig .title selector that causes the problem (.table .title and .image work fine).

PS : I tried to use the figure figcaption selector instead of .fig .title, same crash.
Cheers,
Vincent

Re: com.oxygenxml.chemistry.e.fb error with a custom transform

Posted: Fri Mar 15, 2024 2:42 pm
by julien_lacour
Hello,

I reproduced the problem and added an issue on our tracking system, as you mentioned the problem is related to the centered text context.
I will notify this thread when the bug will be fixed. Thank you for the sample files.

Regards,
Julien

Re: com.oxygenxml.chemistry.e.fb error with a custom transform

Posted: Fri Mar 15, 2024 3:17 pm
by Vinny
Thanks Julien!

Re: com.oxygenxml.chemistry.e.fb error with a custom transform

Posted: Wed Apr 24, 2024 5:16 pm
by julien_lacour
Hello,

A new maintenance build for Oxygen 26.1 is available, this version contains the fix for this null error in centered context.

Regards,
Julien