Preflight Checklist
You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.
Describe the bug
A clear and concise description of what the bug is.
Application hangs when converting to png via cli using --scale parameter once the scale parameter is large enough
and once the diagram is complex enough.
I expect the program to either create the png file I asked for or exit with an error message if it ran out of memory or exceeded some limit, etc. The application should not hang indefinitely.
To Reproduce
Steps to reproduce the behavior:
- Open the attached test_hang.drowio.txt file.
- download to a local location
- rename the file to test_hang.drawio.txt
- run this command and confirm the png is created correctly.
time drawio -x -f png -s 1 test_hang.drawio
test_hang.drawio -> test_hang.png
real 0m4.069s
user 0m1.789s
sys 0m0.328s
- run this command and confirm the png generation hangs indefinitely (I kill it after 3 minutes.)
time drawio -x -f png -s 10 test_hang.drawio
This hangs and you must eventually use ctrl-c to kill it. No output file is created.
Expected behavior
A clear and concise description of what you expected to happen.
The cli command should create a test_hang.png output file in less than 3 minutes. (I'd expect 15-20 seconds... although it seems like a very long time to do the rendering. I wonder what is wrong with an algorithm that would take 20 seconds to render a png of a file that displays instantly on the screen.)
Screenshots
If applicable, add screenshots to help explain your problem.
draw.io version (In the Help->About menu of the draw.io editor):
- draw.io version 19.0.3
- diagrams.net 19.0.3
Desktop (please complete the following information):
- OS: Windows, MacOS, Linux...
linux
Additional context
Add any other context about the problem here.
The resolution is too low if you don't use -s 10 on some of our diagrams, so we must use it.
If you simplify the diagram, e.g. by deleting some elements in the middle. Eventually -s 10 will work.
Conversely if you increase it to -s 11 it will still hang.
I also tried with jpg output and it still hangs.
I tried to simplify the diagram more than the one I have attached, and it does fix the problem, but the problem comes back if you then increase the -s to a bigger setting.
It's not clear of some element in my diagram is a factor causing this to happen or not.
I carefully removed all proprietary information from the attached test diagram.
github is annoyingly restrictive and won't let you upload a file named .drawio.
Addendum:
I'm trying to reproduce this again locally, and realizing I no longer can reproduce it reliably.
Usually this is run in a script via ssh. Therefore we have to run it under xvfb-run. The (failing) command I run is:
time xvfb-run -a drawio -x -f png -s 10 test_hang.drawio
So there may be some other factor causing this to hang related to xvfb. It's possible it has to do with the virtual screen size?
test_hang.drawio.txt
Preflight Checklist
You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.
Describe the bug
A clear and concise description of what the bug is.
Application hangs when converting to png via cli using --scale parameter once the scale parameter is large enough
and once the diagram is complex enough.
I expect the program to either create the png file I asked for or exit with an error message if it ran out of memory or exceeded some limit, etc. The application should not hang indefinitely.
To Reproduce
Steps to reproduce the behavior:
time drawio -x -f png -s 1 test_hang.drawio
test_hang.drawio -> test_hang.png
real 0m4.069s
user 0m1.789s
sys 0m0.328s
time drawio -x -f png -s 10 test_hang.drawio
This hangs and you must eventually use ctrl-c to kill it. No output file is created.
Expected behavior
A clear and concise description of what you expected to happen.
The cli command should create a test_hang.png output file in less than 3 minutes. (I'd expect 15-20 seconds... although it seems like a very long time to do the rendering. I wonder what is wrong with an algorithm that would take 20 seconds to render a png of a file that displays instantly on the screen.)
Screenshots
If applicable, add screenshots to help explain your problem.
draw.io version (In the Help->About menu of the draw.io editor):
Desktop (please complete the following information):
linux
Additional context
Add any other context about the problem here.
The resolution is too low if you don't use -s 10 on some of our diagrams, so we must use it.
If you simplify the diagram, e.g. by deleting some elements in the middle. Eventually -s 10 will work.
Conversely if you increase it to -s 11 it will still hang.
I also tried with jpg output and it still hangs.
I tried to simplify the diagram more than the one I have attached, and it does fix the problem, but the problem comes back if you then increase the -s to a bigger setting.
It's not clear of some element in my diagram is a factor causing this to happen or not.
I carefully removed all proprietary information from the attached test diagram.
github is annoyingly restrictive and won't let you upload a file named .drawio.
Addendum:
I'm trying to reproduce this again locally, and realizing I no longer can reproduce it reliably.
Usually this is run in a script via ssh. Therefore we have to run it under xvfb-run. The (failing) command I run is:
time xvfb-run -a drawio -x -f png -s 10 test_hang.drawio
So there may be some other factor causing this to hang related to xvfb. It's possible it has to do with the virtual screen size?
test_hang.drawio.txt