Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 552137

Summary: [DateTime] RAP crashes in the browser when using a DropDown DateTime in a certain way
Product: [RT] RAP Reporter: Matthias Boehm <Matthias.Boehm>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: 3.9   
Target Milestone: 3.11   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/151169
https://git.eclipse.org/c/rap/org.eclipse.rap.git/commit/?id=8e6f33f7232df55cba62a194526337aff4e19fa0
Whiteboard:
Attachments:
Description Flags
Simple Application demonstrating this bug none

Description Matthias Boehm CLA 2019-10-16 05:29:29 EDT
Created attachment 280271 [details]
Simple Application demonstrating this bug

I'm creating a DateTime like this:

DateTime dateTime = new DateTime(parent, SWT.DATE | SWT.DROP_DOWN | SWT.BORDER);
dateTime.setMinimum(new Date());
dateTime.setMaximum(new Date(Instant.now().plus(3, ChronoUnit.DAYS).toEpochMilli()));


Then, when I open the application in the browser, open the calendar via the drop down button, and click twice on the "next month" button, RAP crashes with the following error:

"The application terminated unexpectedly". 

When clicking the Details button, I get the following details:

Error: Error: Error in property value of class rwt.util.Range in method setValue with incoming value '11': Is invalid!

  description: Error in property value of class rwt.util.Range in method setValue with incoming value '11': Is invalid!
  stack: Error: Error in property value of class rwt.util.Range in method setValue with incoming value '11': Is invalid!
   at statics.error (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:2580:7)
   at Function code (Function code:1:208)
   at members.setValue (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:26209:7)
   at members.setMonth (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:59752:9)
   at members._setDate (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:59803:7)
   at members._onCalendarDateChange (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:59871:9)
   at members._dispatchEvent (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:3966:13)
   at members.dispatchEvent (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:3907:7)
   at members.createDispatchChangeEvent (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:3880:9)
   at Function code (Function code:1:580)
  Stack: Error: Error in property value of class rwt.util.Range in method setValue with incoming value '11': Is invalid!
   at statics.error (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:2580:7)
   at Function code (Function code:1:208)
   at members.setValue (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:26209:7)
   at members.setMonth (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:59752:9)
   at members._setDate (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:59803:7)
   at members._onCalendarDateChange (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:59871:9)
   at members._dispatchEvent (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:3966:13)
   at members.dispatchEvent (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:3907:7)
   at members.createDispatchChangeEvent (http://127.0.0.1:60665/rwt-resources/390/rap-client.js:3880:9)
   at Function code (Function code:1:580)
  Debug: on


I get a similar message when clicking the "previous month" button twice. 

Note that when I create a DateTime with the SWT.CALENDAR style, this error doesn't occur. 

I attach a simple application demonstrating this bug.
Comment 1 Eclipse Genie CLA 2019-10-16 10:29:00 EDT
New Gerrit change created: https://git.eclipse.org/r/151169