Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344928 - IllegalArgumentException: "Not a valid integer number" when moving a modal dialog in chrome when browser zoom is not 100%
Summary: IllegalArgumentException: "Not a valid integer number" when moving a modal di...
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.4 RC1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 04:32 EDT by Sebastien Arod CLA
Modified: 2011-05-06 09:37 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Arod CLA 2011-05-06 04:32:03 EDT
Moving a RAP modal dialog in Chrome when the zoom is not 100% raise the following exception:

java.lang.IllegalArgumentException: Not a valid integer number: 362.4999694824219
	at org.eclipse.rwt.internal.util.NumberFormatUtil.parseInt(NumberFormatUtil.java:19)
	at org.eclipse.rwt.lifecycle.WidgetLCAUtil.readBoundsValue(WidgetLCAUtil.java:1008)
	at org.eclipse.rwt.lifecycle.WidgetLCAUtil.readBoundsX(WidgetLCAUtil.java:988)
	at org.eclipse.rwt.lifecycle.WidgetLCAUtil.readBounds(WidgetLCAUtil.java:406)
	at org.eclipse.rwt.lifecycle.WidgetLCAUtil.readBounds(WidgetLCAUtil.java:390)
	at org.eclipse.swt.internal.widgets.shellkit.ShellLCA.readBounds(ShellLCA.java:322)
	at org.eclipse.swt.internal.widgets.shellkit.ShellLCA.readData(ShellLCA.java:77)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA$1.doVisit(DisplayLCA.java:97)
	at org.eclipse.swt.internal.widgets.WidgetTreeVisitor$AllWidgetTreeVisitor.visit(WidgetTreeVisitor.java:36)
	at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:50)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA.readData(DisplayLCA.java:104)
	at org.eclipse.rwt.internal.lifecycle.ReadData.execute(ReadData.java:27)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.continueLifeCycle(RWTLifeCycle.java:192)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.sleep(RWTLifeCycle.java:269)
	at org.eclipse.swt.widgets.Display.sleep(Display.java:1162)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:841)
	at org.eclipse.jface.window.Window.open(Window.java:816)
...

Steps to reproduce:
1/ Open a model dialog
2/ Change the zoom to any non 100% value
3/ 


It seems to work fine with IE9 and FF4. 
I detected the problem using Chrome 11.0.696.60. 
I guess chrome is sending some non integer values for elements positioning when zoom is not 100%
Comment 1 Sebastien Arod CLA 2011-05-06 04:35:28 EDT
Oops I pressed subit a bit too early 
Step 3 is
3/ Move the RAP model dialog using the mouse

You'll get an HTTP error 500 caused by the IllegalArgumentException
Comment 2 Rüdiger Herrmann CLA 2011-05-06 05:24:10 EDT
Please state what version of RAP you are using.
Comment 3 Sebastien Arod CLA 2011-05-06 05:27:02 EDT
I'm using RAP 1.4 M7a
Comment 4 Ivan Furnadjiev CLA 2011-05-06 09:37:47 EDT
Fixed in CVS HEAD by calling Math#ceil() on the returned values in Location.js#__computeScroll,  Location.js#__computeBody and Location.js#__computeOffset.