I have a HTML code,
<div class="layout"
data-type="renderingCanvas"
data-format="canvas"
style="width:100px; height:100px">
</div>
where data-type refers to the javascript file, like renderingCanvas will go to the javascript file name canvas.js which will perform modifications on the png image.
and data-format is just a structure which contains all the types (svg, canvas, bmp etc.) It is just to make sure formats are valid.
Now, for rendering purpose, I change data-format to “svg” ..
<div class="layout"
data-type="renderingSVG"
data-format="svg"
style="width:100px; height:100px">
</div>
where renderingSVG goes to svg.js, and modifications are done on svg file.
But this creates heap corruption error. like it says
Program : iisexpress.exe
Heap Corruption detected : after normal block......(some memory references)
Strangest part is, when I change it back to “canvas”, it works perfectly fine. What I meant is, when I do this
<div class="layout"
data-type="renderingSVG"
data-format="canvas"
style="width:100px; height:100px">
</div>
Even though the format I have mentioned is canvas, but it is using and modifying a svg image.
I thought it is an IIS express error, and someone posted online that if we add this it might work :
<staticContent>
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>
But it didnt. Any clue what am I doing wrong? Or is there anything that needs to be added to render svg image.
PS : There is no error in data-format, and data-type implmentation. Same behavior with IIS7/IIS express?IIS5
PS (new-update) : Heap error is only reported by Visual Studio, when using debug mode. When using release mode, it works fine. Strange!
Its not strange that it works fine in release mode. In release mode, it tends to overlook the memory corruption, and moves forward. Working in release mode doesnt mean your program is fine. If there is no error on client side implementation, then check server side. Information provided in the question is insufficient.