Hi,
I’m facing an intermittent issue, noticing the following error when presentation.save(OutputStream,SaveFormat.Pptx)
is being invoked. This is happening in environment ( not in local), only after deployment. Also, if I redeploy it doesn’t happen again.
“Cannot invoke “com.aspose.slides.TextParam.r2(boolean)” because <local3>
is null”
Sharing stacktrace for ref.
com.aspose.slides.j6s.x6(Unknown Source)
,
com.aspose.slides.v5g.x6(Unknown Source)
,
com.aspose.slides.v5g.x6(Unknown Source)
,
com.aspose.slides.b6e.x6(Unknown Source)
,
com.aspose.slides.e4f.x6(Unknown Source)
,
com.aspose.slides.e4f.(Unknown Source)
,
com.aspose.slides.z5w.x6(Unknown Source)
,
com.aspose.slides.e1u.x6(Unknown Source)
,
com.aspose.slides.e1u.x6(Unknown Source)
,
com.aspose.slides.e1u.x6(Unknown Source)
,
com.aspose.slides.e1u.r2(Unknown Source)
,
com.aspose.slides.l3.x6(Unknown Source)
,
com.aspose.slides.a5j.x6(Unknown Source)
,
com.aspose.slides.a5j.x6(Unknown Source)
,
com.aspose.slides.r0.x6(Unknown Source)
,
com.aspose.slides.i7g.x6(Unknown Source)
,
com.aspose.slides.g5r.x6(Unknown Source)
,
com.aspose.slides.g5r.x6(Unknown Source)
,
com.aspose.slides.g5r.x6(Unknown Source)
,
com.aspose.slides.Presentation.x6(Unknown Source)
,
com.aspose.slides.Presentation.x6(Unknown Source)
,
com.aspose.slides.Presentation.x6(Unknown Source)
,
com.aspose.slides.Presentation$1.x6(Unknown Source)
,
com.aspose.slides.internal.m2d.x6.x6(Unknown Source)
,
com.aspose.slides.internal.m2d.r2.x6(Unknown Source)
,
com.aspose.slides.Presentation.save(Unknown Source)
,
Please let me know if this is known or any available solution for this.
Thanks
@manavjaiswal
It appears you are encountering a null pointer exception when saving a presentation in your deployed environment. This issue may be related to the specific environment configuration or the state of the presentation object at the time of saving.
Here are several steps you can take to troubleshoot and potentially resolve the issue:
-
Check for Null Values: Ensure that all necessary objects and parameters are properly initialized before calling the save
method. The error message indicates that a TextParam
object is null, so verify that all text-related properties are set correctly.
-
Environment Consistency: Since the issue occurs only in the deployed environment, check for differences in configurations, libraries, or dependencies between your local and deployed environments. Ensure that the same version of Aspose.Slides is being used in both environments.
-
Update Aspose.Slides: If you are not using the latest version of Aspose.Slides, consider updating to the latest version, as it may contain bug fixes and improvements that could resolve your issue.
-
Logging: Implement additional logging around the save operation to capture the state of the presentation object and any relevant parameters. This can help identify what might be causing the null reference.
-
Test with a Simplified Presentation: Create a minimal presentation with basic elements and test the save operation. If this works, gradually add elements from your original presentation to identify what might be causing the issue.
If the problem persists after trying these steps, consider reaching out to Aspose support with detailed information about your environment and the issue.
Feel free to ask if you have further questions!
@manavjaiswal,
Thank you for contacting free support. We are sorry that you encountered this problem. We need more details to investigate the case. Please try to isolate the problem and share the following files and information:
- The sample presentation file
- The code example to reproduce the error
- The OS name and version on which the error occurs
- The JDK target version in your application project
- The Aspose.Slides version you are using
@andrey.potapov
Please find the details:
OS: Linux
JDK: 21.0.5
Aspose slides version:‘25.6’, classifier:‘jdk16’
This error doesn’t happen specific to some chart or usecase. It happens for all usecases.
Also sometimes, I don’t get the stacktrace for exception. For one instance I was able to get the stacktrace which I shared above.
Please let me know if this helps in triaging it.
@manavjaiswal,
Thank you for the details. Could you please also specify the Linux name and version on which the error occurs?
Hi @andrey.potapov
Please find the linux version details as below.
NAME=“Oracle Linux Server”
VERSION="8.10
ID=“ol”
ID_LIKE=“fedora”
VARIANT=“Server”
VARIANT_ID=“server”
VERSION_ID=“8.10”
PLATFORM_ID=“platform:el8”
PRETTY_NAME=“Oracle Linux Server 8.10”
Again we have started getting this error in server.
Could you please check and update on this?
Thanks,
Thilak Babu
@Thilakbabu,
Thank you for the details. Unfortunately, I was unable to reproduce the error described in this forum thread.
Code example:
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Presentation presentation = new Presentation();
presentation.save(outputStream, SaveFormat.Pptx);
Dockerfile example:
FROM oraclelinux:8.10 AS build
RUN dnf install -y \
java-21-openjdk-devel \
maven \
&& dnf clean all
ENV JAVA_HOME=/usr/lib/jvm/java-21
ENV PATH="$JAVA_HOME/bin:$PATH"
WORKDIR /app
COPY . .
RUN mvn -B clean install
FROM oraclelinux:8.10
RUN dnf install -y \
java-21-openjdk \
&& dnf clean all
ENV JAVA_HOME=/usr/lib/jvm/java-21
ENV PATH="$JAVA_HOME/bin:$PATH"
WORKDIR /app
COPY --from=build /app/target/TestApp-jar-with-dependencies.jar ./target/TestApp-jar-with-dependencies.jar
CMD ["java", "-cp", "target/TestApp-jar-with-dependencies.jar", "Application"]
Please check carefully whether you are using correctly the streams to which the presentations are saved. If the issue persists, please try to isolate the problem and provide step-by-step instructions on how to reproduce the error.
Hi @andrey.potapov
The issue happens sporadically. Whenever we face this issue, if we destroy the server and redeploy the same image without any code change again, we are not seeing the issue.
Also, we have started to observe this issue only after started using 25.6 Aspose slides java version.
So, we neither don’t have any concreate steps to reproduce the issue nor the root cause of the issue.
But we are pretty sure that this is happening in 25.6 Aspose Slides version.
Please let us know if you could provide some insights on this.
Thanks
Thilak Babu
@Thilakbabu,
To resolve the issue, we first need to reproduce it and identify the cause. Unfortunately, we haven’t been able to do so yet. It would be very helpful if you could isolate the problem and provide additional information on how to reproduce it. Then we can continue our investigation.
We faced this issue today in one of our environment. Where in we have 3 pods (aks instances) of same image. Out of 3 pods, only in one pod we were able to get this exception. Because of which saving to ppt was failing.
Could you please at least let us know what this error means?
java.lang.NullPointerException: Cannot invoke "com.aspose.slides.TextParam.r2(boolean)" because "<local3>" is null
com.aspose.slides.j6s.x6(Unknown Source)
,
com.aspose.slides.v5g.x6(Unknown Source)
,
com.aspose.slides.v5g.x6(Unknown Source)
,
com.aspose.slides.b6e.x6(Unknown Source)
,
com.aspose.slides.e4f.x6(Unknown Source)
,
com.aspose.slides.e4f.<init>(Unknown Source)
,
com.aspose.slides.z5w.x6(Unknown Source)
,
com.aspose.slides.e1u.x6(Unknown Source)
,
com.aspose.slides.e1u.x6(Unknown Source)
,
com.aspose.slides.e1u.x6(Unknown Source)
,
com.aspose.slides.e1u.r2(Unknown Source)
,
com.aspose.slides.l3.x6(Unknown Source)
,
com.aspose.slides.a5j.x6(Unknown Source)
,
com.aspose.slides.a5j.x6(Unknown Source)
,
com.aspose.slides.r0.x6(Unknown Source)
,
com.aspose.slides.i7g.x6(Unknown Source)
,
com.aspose.slides.g5r.x6(Unknown Source)
,
com.aspose.slides.g5r.x6(Unknown Source)
,
com.aspose.slides.g5r.x6(Unknown Source)
,
com.aspose.slides.Presentation.x6(Unknown Source)
,
com.aspose.slides.Presentation.x6(Unknown Source)
,
com.aspose.slides.Presentation.x6(Unknown Source)
,
com.aspose.slides.Presentation$1.x6(Unknown Source)
,
com.aspose.slides.internal.m2d.x6.x6(Unknown Source)
,
com.aspose.slides.internal.m2d.r2.x6(Unknown Source)
,
com.aspose.slides.Presentation.save(Unknown Source)
,
As we already told this is only happening in environment and also happens sporadically. So we could not isolate the issue as such. Please try to provide more insights on the error and possible reasons if you’re aware of. That might be bit helpful.
Thanks.
@Thilakbabu,
I need some time to answer your question. I will get back to you as soon as possible.
@manavjaiswal,
We have opened the following new ticket(s) in our internal issue tracking system and will answer your question according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESJAVA-39738
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
1 Like