Getting the Height of a Table Cell in Java Throws KeyNotFoundException

Please browse the files in the compressed package.
SimpleTable.pptx.zip (27.5 KB)
I just create a default table using powerpoint and run the follwing code.

Presentation presentation = new Presentation(filePath);
((Table)presentation.getSlides().get_Item(0).getShapes().get_Item(0)).get_Item(0, 0).getHeight();

It throw KeyNotFoundException.

class com.aspose.slides.exceptions.KeyNotFoundException: The given key was not present in the dictionary.
    com.aspose.slides.Collections.Generic.SortedList$ThrowHelper.throwKeyNotFoundException(Unknown Source)
        com.aspose.slides.Collections.Generic.SortedList.get_Item(Unknown Source)
        com.aspose.slides.internal.o0.break.<init>(Unknown Source)
        com.aspose.slides.internal.o0.long.goto(Unknown Source)
        com.aspose.slides.internal.o0.long.case(Unknown Source)
        com.aspose.slides.internal.o0.extends.do(Unknown Source)
        com.aspose.slides.sd.do(Unknown Source)
        com.aspose.slides.sd.do(Unknown Source)
        com.aspose.slides.sd.do(Unknown Source)
        com.aspose.slides.sd.do(Unknown Source)
        com.aspose.slides.rr.do(Unknown Source)
        com.aspose.slides.av2.do(Unknown Source)
        com.aspose.slides.rr.do(Unknown Source)
        com.aspose.slides.ol.do(Unknown Source)
        com.aspose.slides.sj.do(Unknown Source)
        com.aspose.slides.ax1.static(Unknown Source)
        com.aspose.slides.z2.do(Unknown Source)
        com.aspose.slides.axu.do(Unknown Source)
        com.aspose.slides.axu.<init>(Unknown Source)
        com.aspose.slides.axl.do(Unknown Source)
        com.aspose.slides.awg.do(Unknown Source)
        com.aspose.slides.awg.for(Unknown Source)
        com.aspose.slides.Row.getHeight(Unknown Source)
        com.aspose.slides.Cell.getHeight(Unknown Source)
        com.nobook.ippt.core.AiPresentationImpl.init(AiPresentationImpl.java:186)
        com.nobook.ippt.console.UploadFileProcess.process(UploadFileProcess.java:45)
        com.nobook.ippt.console.UploadFileProcess.process(UploadFileProcess.java:13)
        com.nobook.ippt.rabbitmq.MQAccessBuilder$2.consume(MQAccessBuilder.java:178)
        com.nobook.ippt.rabbitmq.ThreadPoolConsumer.lambda$start$0(ThreadPoolConsumer.java:105)
        java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        java.base/java.lang.Thread.run(Thread.java:833)

@oscarstar,
Thank you for reporting the issue. We will check it and reply to you as soon as possible.

Thank you for your attention and reply. This exception causes the function we developed earlier to fail to work properly.

@oscarstar,
Unfortunately, I have not managed to reproduce the error you encountered. Please check your results using the latest version of Aspose.Slides if it is possible. If the issue persists, please share the following information:

  • OS version on which the code was executed
  • JDK version in your app
  • any additional information about your runtime environment

When I use 22.9, it does no throw exception. If I change to 22.11, It throw KeyNotFoundException.
OS: macOS 13.0.1
JDK: openjdk-17.0.1
SDK: Aspose.Slides.Java 22.11

@oscarstar,
Thank you for the additional information. I’ve added a ticket with ID SLIDESJAVA-38999 to our issue-tracking system. Our development team will investigate the case. We will inform you of any progress.

Thank you for your reply. It works well on the Linux server. I don’t know what caused this. I will try to find more Mac Book to see if this problem will occur.

@oscarstar,
Thank you for the additional information. I’ve forwarded it to our developers.

The issues you found earlier (filed as SLIDESJAVA-38999) have been fixed in Aspose.Slides for Java 22.12 (ZIP).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.