Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two-dimensional matrices with more than two columns not rendering #1706

Closed
ouss1002 opened this issue Mar 4, 2024 · 1 comment · Fixed by #1710
Closed

Two-dimensional matrices with more than two columns not rendering #1706

ouss1002 opened this issue Mar 4, 2024 · 1 comment · Fixed by #1710
Assignees
Labels
bug Something isn't working

Comments

@ouss1002
Copy link
Contributor

ouss1002 commented Mar 4, 2024

Describe the bug
When trying to render a matrix with three columns or more, the rendering fails with the exception java.lang.NullPointerException: Cannot invoke "java.util.List.get(int)" because the return value of "java.util.List.get(int)" is null at net.sourceforge.plantuml.math.ASCIIMathTeXImg.AMTparseExpr(ASCIIMathTeXImg.java:938)

To Reproduce
1- Create a matrix (at least two rows) with three columns or more
2- Wrap it inside of a @startmath ... @endmath block
3- Render the matrix.

Example:

@startmath
H = [[1,2,3],[4,5,6]]
@endmath

Expected behavior
The matrix renders correctly, regardless of the number of rows/columns.

Actual behavior
A java.lang.NullPointerException is thrown, and the rendering is buggy/faulty for the matrix

Screenshots
Here are the results with their corresponding matrix code:
image

The problem only arises if the matrix has at least two rows and three columns !

Desktop:

OS: Windows server 2019
Browser chrome

Additional context
The matrices used to render correctly back in the version V1.2021.7 where the javascript engine used to be the one that renders the matrices.
This is a regression as noted on the PlantUML website regarding potential regressions post-migration into Java in V1.2021.8

PlantUML version : 1.2024.3

@github-actions github-actions bot added the triage label Mar 4, 2024
@The-Lum The-Lum self-assigned this Mar 6, 2024
@The-Lum The-Lum added bug Something isn't working and removed triage labels Mar 6, 2024
The-Lum added a commit to The-Lum/ASCIIMathTeXImg that referenced this issue Mar 8, 2024
@ouss1002
Copy link
Contributor Author

ouss1002 commented Mar 8, 2024

Thank you very much @The-Lum for fixing the the issue !
I have a question, will this fix be part of the next release ? ping @arnaudroques

Regards,
Oussama

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants