schplurtz / a2s

DokuWiki asciitosvg plugin
GNU General Public License v2.0
3 stars 1 forks source link

Minor problem - + sign on corners may cause memory running out. #4

Open Vi4Ever opened 6 years ago

Vi4Ever commented 6 years ago

Coming from Ditaa needed to change the corners from + to . or ' Test case: Problematic example -> not rendering and giving Fatal Error memory message at php level: --> look at the plus sign in the corner left under which should not be there:

<a2s>
 .---------------------------.
 |                           |
 +-------------+-------------'
               |                
</a2s>

Error : Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in \ASCIIToSVG.php on line 3635

Intermediate example Not rendering but does not produce the Fatal Error. Removed the plus sign above the pipe sign at the bottom:

<a2s>
 .---------------------------.
 |                           |
 +---------------------------'
               |                
</a2s>
schplurtz commented 6 years ago

Thanks for reporting this bug.

Unfortunately, I just don't have the skill to modify the parser which is used as a library. I will import the latest version of dhobsd/asciitosvg and see if the bug is still present.

Vi4Ever commented 6 years ago

Hi, Sometimes looking for a problem may be a struggle when you see Fatal Error. If somewhere some reason is already documented why things are not working and a workaround is provided, it helps a lot. It is also rather specific to migrate from Ditaa to a2s ... A2s is a very nice tool and I do very much appreciate the effort people like you are putting in this kind of art. Thank you very much in advance !!!

schplurtz commented 6 years ago

I took a look at the code and definitely, I am not able to fix this. current a2s uses last asciitosvg code. So there is nothing I can do.

Please report this bug to asciitosvg.