rebootcode / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

NS_ERROR_OUT_OF_MEMORY exception #1001

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add large (5000px+)SVG element dinamical with addSvgElementFromJson
2. Call this: svgCanvas.setResolution('fit', 'fit');

What is the expected output? What do you see instead?
Expected: no error
Instead:

columnNumber 0
data null
filename "http://localhost/svg-editor.js"
inner null
lineNumber 4578
location JS frame :: http://localhost/svg-editor.js :: updateRulers :: line 
4577 { language=2, languageName="JavaScript", 
filename="http://localhost/svg-editor.js", more...}
message "Component returned fail...TMLCanvasElement.width]"
name "NS_ERROR_OUT_OF_MEMORY"
result 2147942414
QueryInterface QueryInterface()
initialize initialize()

In what browser did you experience this problem? (ALL, Firefox, Opera, etc)
FireFox 14.0.1 Win7 x64

In what version of SVG-edit does the problem occur? (Latest trunk, 2.5.1,
etc)
Latest trunk

Original issue reported on code.google.com by hajdua...@gmail.com on 17 Aug 2012 at 7:12

GoogleCodeExporter commented 9 years ago
Hi,

Firstly SVG-Edit is not made with high-resolution editing in mind. So a lot of 
its algorithms and code do not necessarily be as optimized and efficient as 
possible. I'm afraid your solution for now is to throw in more hardware (more 
RAM on your side) and hopefully that will resolve the error.

In my personal case with 4GB of RAM it was enough to play around in 10kx10k 
resolution. Although moving around will start to be laggy.

Closing this issue.

Original comment by asyazwan on 17 Aug 2012 at 9:56

GoogleCodeExporter commented 9 years ago
It's a browser limitation, I have 8 GB of RAM.
Chrome fails if the canvas height is greater than 32767 pixels. Firefox fails 
greater than 8192.

Please review this patch.

Original comment by hajdua...@gmail.com on 29 Aug 2012 at 11:20

Attachments: