Parsing svg file with IE9 (OMSVGParser.parse())

已查看 235 次
跳至第一个未读帖子

dislodrum

未读,
2012年7月31日 08:30:482012/7/31
收件人 lib-g...@googlegroups.com
Hello,

I'm new in this forum so first of all, I'd like to say thanks for this librairy which works pretty good.

My problem is: I want to  parse an existing svg file from my java code.
Here are some pieces of code to explain what I did:

public void saveSvg() {
          String svgCode = mySvg.getMarkup();
          // Here I save the String into a svg file and it works
}

public void loadSvg() {
          String svgCodeToLoad = ... // Here, I load the code from the svg file saved before and it works

          OMSVGDocument doc = OMSVGParser.currentDocument();
  OMSVGSVGElement svgToLoad = doc.createSVGSVGElement();
   svgToLoad  = OMSVGParser.parse(svgCodeToLoad);
}

On Firefox, it works perfectly but on IE9, it crashes the browser !!
I don't get any error or exception.

Please, help !
Thank you in advance !

Dislodrum

Lukas Laag

未读,
2012年8月20日 03:53:232012/8/20
收件人 lib-g...@googlegroups.com
Hi,
Sorry for the delayed response, I was on vacation in a remote location
without computers.
Regarding your issue, can you give more details, notably:
+ does IE crash on any SVG or just a specific one (can you provide an
SVG to reproduce the problem ?)
+ can you confirm the crash happens in web mode, not in dev mode (dev
mode on IE does not work I do not know why exactly but web mode
works).
+ Have you specified the HTML5 doctype in your GWT html file ?

Normally your use case is something which is supported. You can look
at the sample lib-gwt-svg web app
(http://www.vectomatic.org/gwt/lib-gwt-svg-samples-latest/lib-gwt-svg-samples.html),
in the parser section, you have demo and code for the feature.

Lukas

Raymond Loman

未读,
2013年1月14日 09:04:382013/1/14
收件人 lib-g...@googlegroups.com
Hi Lukas,

At first thanks for your nice library. It works for the most except ...

I am getting the same error like Dislodrum above. In FF and Chrome it al works like a charm but in IE9 the browser crashes. To answer the questions you asked Dislodrum:
It appears the error occurs on (all) svg files which can't be parsed by the SVGParserImplIE (it crashes on the ModuleSpaceOOphm.doInvoke which call channel.invokeJS which results
in the crash.

The crash ONLY appears in Development mode and not in Web mode. Do you know when and why this happens?

And we are using the HTML5 doctype here (<!doctype html>)

Kindly awaiting your response (which may be in Dutch if you prefer! :-))


gr.
Raymond Loman


Op maandag 20 augustus 2012 09:53:23 UTC+2 schreef Lukas Laag het volgende:

Lukas Laag

未读,
2013年1月15日 03:26:042013/1/15
收件人 lib-g...@googlegroups.com
Hi,

Thanks for the update, it contains the info I needed to reproduce (dev
mode, any call to OMSVGParser.parse() will reproduce the problem).
I will do my best to fix it, but don't expect too much: it might be a
problem with the dev plugin itself (as the problem does not happen in
web mode). Furthermore, the IE branch of the code is the most
complicated (because IE has no XPath support, so I need to emulate
them, plus there is a bug in IE when you have CSS in SVG).
As a general rule, I advise against using IE as anything but a porting
platform, it is an inferior product for GWT development compared to FF
and chromium. But maybe you have no choice and need to debug an
IE-specific issue.

Lukas

Raymond Loman

未读,
2013年1月23日 10:57:062013/1/23
收件人 lib-g...@googlegroups.com
OK Lucas. I will wait for your reaction. Anyhow it appears only in devmode... 

Op dinsdag 15 januari 2013 09:26:04 UTC+1 schreef Lukas Laag het volgende:

Raymond Loman

未读,
2013年10月8日 03:38:422013/10/8
收件人 lib-g...@googlegroups.com
Hi Lucas, 

Any progress on the below mentioned issue regarding the devmode in IE parsing SVG? 

Some other question. It appears there is a bug after Firefox 0.22 regarding the viewBox issue. There seems to be a development release waiting but there is no binaire code yet to download.
Any idea when this might be released? (I know this is not the right thread for this).

Kindly awaiting your response,

Raymond Loman
Carpago Software

Op dinsdag 31 juli 2012 14:30:48 UTC+2 schreef dislodrum:
回复全部
回复作者
转发
0 个新帖子