Friday, March 30, 2012

Re: JSNI error when using GWT canvas

I have exactly the same issue. Hope this is related to the development
mode and not to the production mode.

On 3 fév, 15:39, Karel <karel.cromb...@gmail.com> wrote:
> Hey guys,
>
> I am getting quite random internal GWT errors when I am using the GWT
> canvas widget in complex cases. Sometimes, seemingly random, JSNI
> errors are fired such as:
>
> com.google.gwt.dev.shell.HostedModeException: Something other than an
> int was returned from JSNI method
> '...@com.google.gwt.dom.client.CanvasElement::getWidth()': JS value of
> type JavaScript object(20511), expected int
>         at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:
> 266)
>         at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144)
>         at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:
> 247)
>         at
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java :
> 75)
>         at com.google.gwt.dom.client.CanvasElement$.getWidth$
> (CanvasElement.java)
>         at
> com.google.gwt.canvas.client.Canvas.getCoordinateSpaceWidth(Canvas.java:
> 127)
>          at...
>
> These errors occur quite often, but do not seem to break anything.
> They usually originate from a getCoordinateSpaceHeight() call on the
> canvas. I tried digging in the debugger to find out what's wrong, but
> the debugger does not cross the JSNI boundary, so I can't see what's
> going on in javascript.
>
> Anyone got any idea what is causing these errors?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment