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

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Vinny
Posts: 16
Joined: Wed Jan 12, 2022 1:07 pm

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

Post 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
Vinny
Posts: 16
Joined: Wed Jan 12, 2022 1:07 pm

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

Post by Vinny »

Well this seems partly linked to the CSS file, because if I change it, the bug goes away.
Last edited by Vinny on Wed Mar 13, 2024 5:56 pm, edited 2 times in total.
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

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

Post 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
Vinny
Posts: 16
Joined: Wed Jan 12, 2022 1:07 pm

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

Post 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
Last edited by Vinny on Wed Mar 13, 2024 6:20 pm, edited 1 time in total.
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

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

Post 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
Vinny
Posts: 16
Joined: Wed Jan 12, 2022 1:07 pm

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

Post 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
Last edited by Vinny on Wed Mar 13, 2024 7:29 pm, edited 1 time in total.
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

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

Post 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
Vinny
Posts: 16
Joined: Wed Jan 12, 2022 1:07 pm

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

Post by Vinny »

Thanks Julien!
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

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

Post 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
Post Reply