We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

NullPointerException or Hang when trying to load Presentation with defective Windows Fonts

Hello,

we observed the following problem when trying to read any *.pptx-file via
new Presentation(fileData) and having the corrupted font (we attached it) inside the windows Font-folder.

In Version 15.5.1 the following Exception occurs:
java.lang.NullPointerException
at com.aspose.slides.p6a2feef8.p9f36407e.ab.do(Unknown Source)
at com.aspose.slides.p6a2feef8.p9f36407e.k.do(Unknown Source)
at com.aspose.slides.p6a2feef8.p9f36407e.k.(Unknown Source)
at com.aspose.slides.p6a2feef8.p9f36407e.h.byte(Unknown Source)
at com.aspose.slides.p6a2feef8.p9f36407e.h.try(Unknown Source)
at com.aspose.slides.p6a2feef8.p9f36407e.h.do(Unknown Source)
at com.aspose.slides.wl.do(Unknown Source)
at com.aspose.slides.wd.(Unknown Source)
at com.aspose.slides.wd.do(Unknown Source)
at com.aspose.slides.bnx.int(Unknown Source)
at com.aspose.slides.bnx.static(Unknown Source)
at com.aspose.slides.bnb.do(Unknown Source)
at com.aspose.slides.bnb.do(Unknown Source)
at com.aspose.slides.bnb.do(Unknown Source)
at com.aspose.slides.bnb.(Unknown Source)
at com.aspose.slides.TextFrame.do(Unknown Source)
at com.aspose.slides.Table.do(Unknown Source)
at com.aspose.slides.Table.int(Unknown Source)
at com.aspose.slides.bkt.do(Unknown Source)
at com.aspose.slides.zm.do(Unknown Source)
at com.aspose.slides.zm.do(Unknown Source)
at com.aspose.slides.dm.do(Unknown Source)
at com.aspose.slides.bfq.do(Unknown Source)
at com.aspose.slides.ayr.do(Unknown Source)
at com.aspose.slides.axj.byte(Unknown Source)
at com.aspose.slides.axj.do(Unknown Source)
at com.aspose.slides.Presentation.int(Unknown Source)
at com.aspose.slides.Presentation.if(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)

In Version 15.9.0 the following Exception occurs:
com.aspose.slides.PptxReadException:
com.aspose.slides.ms.pbdb106a0.bt
at com.aspose.slides.avm.do(Unknown Source) ~[aspose.slides-15.9.0.jar:15.9.0]
at com.aspose.slides.Presentation.int(Unknown Source) ~[aspose.slides-15.9.0.jar:15.9.0]
at com.aspose.slides.Presentation.if(Unknown Source) ~[aspose.slides-15.9.0.jar:15.9.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose.slides-15.9.0.jar:15.9.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose.slides-15.9.0.jar:15.9.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose.slides-15.9.0.jar:15.9.0]

(Looks like Issue SLIDESJAVA-35093)
This only happens when you have a broken font inside the windows Font-Folder.
For our company this means the whole PowerPoint functionality is broken because of an global update for all clients that brought in a single faulty font.
Is there a workaround for it or can you fix the behaviour of parsing ALL Fonts before even loading a single Presentation.

Another Error occurs when placing a faulty Font inside the Windows-Font-folder and calling:
Slide.getThumbnail(float, float)

Then the Aspose hangs inside the following thread-stack:

WinNTFileSystem.getBooleanAttributes(File) line: not available [native method]
File.isFile() line: 882
d$a.accept(File, String) line: not available
File.list(FilenameFilter) line: 1161
d.if(String, String) line: not available
d.new(String) line: not available
h.do(String, boolean, IDictionary) line: not available
h.byte() line: not available
h.try() line: not available
h.do(String, int) line: not available
wa.do(String, int) line: not available
vr.(wa, String, int, int, float, int) line: not available
vr.do(wa, String, int, int, float, int) line: not available
bnk.int(float) line: not available
bnk.static() line: not available
bmn.do(String, bnk, float[]) line: not available
bmn.do(bmn$b, bmn$b, bmn$i, float[], float[]) line: not available
bmn.do() line: not available
bmn.(TextFrame, TextFrameFormat, ParagraphCollection, float, float, IBaseSlide, aa, IFontsEffectiveData, byte, ayu) line: not available
TextFrame.do(float, float, IShapeStyle, ayu) line: not available
TextFrame.do(ShapeFrame[], fu[], float[], float[], float[], float[], ayu) line: not available
TextFrame.do(ayu) line: not available
AutoShape.do(fe, ayu) line: not available
GroupShape.do(fe, ayu) line: not available
GroupShape.do(fe, ayu) line: not available
Slide.for(fe, ayu) line: not available
Slide.do(fe, k, ayw) line: not available
Slide.do(fz) line: not available
Slide.do(float, float) line: not available
Slide.getThumbnail(float, float) line: not available

This looks like the Problem desribed in:
https://forum.aspose.com/t/fontloader-hangs-in-15-8-0/140935

Because of the urgency of our problem and the impact for our application, wen need a workaround or fix for this.

Any help would be apriciated.

Thanks in advance

Hi Chris,


Thank you for posting.

I have observed your comments and like to share with you that I am unable to install the font on my end and it appears like there is some problem with the font as you can see in this screenshot. Please try removing this font from your fonts folder and then try loading the presentation because this font is not a valid font.

Also, there is no way to parse some, or no fonts before loading the presentation. About the issue, SLIDESJAVA-35093, that is totally a different issue; which is reported for the problem with license.

Please share if I may help you further in this regard,

Best Regards,