-
Notifications
You must be signed in to change notification settings - Fork 11
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
Hangs and eats all memory trying to render a complex diagram. #53
Comments
Can you try to call dumpDrawing somehow a put the result somewhere? Dump drawing should print-out the scene in nearly haskell, workable for debugging |
|
You have
This is not filtered by Rasterific, and yeah, it makes the rendering go bonker. |
@Twinside Thank you for taking time to research this issue. So what can be done? I am not sure I can control this. The data I supply to the Can you explain to me what data type you are showing, and maybe post the code you used to obtain it, so that I can examine my various diagrams with it and locate what goes wrong? |
I've tried the SVG, and you have NaN and Infinity written in your SVG (that your browser probably ignore), I wouldn't call that flawless. The code is mostly the copy/past of Diagram.Rasterific with a call changed to dump the generated drawing, I've pushed it here. I've added safegard to Rasterific for these cases, at least it shouldn't go into an infinite loop anymore. |
Unfortunately, I do not have a short example. I am trying stuff with graphs, and one thing I did was to render a graph in some fashion. I discovered that, while I could vectorize it with the SVG back end, if I try to do the same with Rasterific, it eats all memory in an infinite loop. I did some profiling and I found out that the looping function is
clipLine
.Here is the commit. You can run it with, for example,
cabal run exes -- --output x.png --width 200
. It hangs when I try it. If you replaceclr489
example graph with, say,cyc3
, it will render beautifully.Here is the profiling log.
Please let me know if it hangs on your machine too, and if I can do anything else to help.
The text was updated successfully, but these errors were encountered: