| Summary: | [DnD] Drag and drop with UI feedback can crash the client | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Martin Domig <martin> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 3.0 | ||
| Target Milestone: | 3.1 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Attachments: | |||
The error stack: Error: TypeError: null is not an object (evaluating 'node.offsetLeft') line: 47142 column: 27 sourceURL: https://zswtest.finkzeit.at/rwt-resources/rap-client.js Stack: _getRowLocation@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:47142:27 _renderFeedbackBefore@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:47098:44 _renderFeedback@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:47076:37 renderFeedback@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:47056:27 _renderFeedback@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:43993:48 setCurrentTargetElement@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:44080:25 _onMouseOver@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:44071:37 _dispatchEvent@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:3865:22 dispatchEvent@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:3806:26 _dispatchMouseEvent@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:15503:27 _fireElementHoverEvents@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:15492:31 _onmouseevent_post@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:15430:35 _processMouseEvent@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:15402:28 _onmouseevent@https://zswtest.finkzeit.at/rwt-resources/rap-client.js:15379:32 https://zswtest.finkzeit.at/rwt-resources/rap-client.js:624:22 Debug: on Created attachment 256461 [details]
Simple patch to fix the client crash
Could you please provide this fix through Gerrit? [1] https://wiki.eclipse.org/RAP/Git Martin, I can't reproduce it with our Controls Demo. Which browser are you using? Could you please provide a simple snippet/entry point that demonstrate the issue? I'm interesting why node is null and how this is possible. Created attachment 256493 [details]
Demo bundle with second table view to reproduce the bug
Reproduced it on the attached demo bundle.
I've added a second table view with no elements to the default perspective and added DnD support to both of them. Start it up, open both table views and start dragging items into the empty table.
Takes a couple of times to trigger the bug. I don't know what exactly it depends on (network latency?), our live application crashes quite reliably after 2-3 attempts, sometimes on the first. I know this is not as simple as it could be since triggering the bugt is a bit of a PITA, but its what I could throw together in a hurry :)
Doesn't seem to be a browser issue, since I could reproduce it on
* Safari 8.0.8
* Chrome 45.0.2454.85 (64-bit)
* Firefox 40.0.3
...all running on my Mac.
Bug also appears on Internet Explorer 11 and Chrome running on Windows.
Created attachment 256494 [details] Animated GIF demonstrating the crash on the demo project Takes a while, quite boring to watch until... boom. The error message: Error: TypeError: node is null Stack: .members._getRowLocation@http://localhost:9090/rwt-resources/rap-client.js:47142:9 .members._renderFeedbackBefore@http://localhost:9090/rwt-resources/rap-client.js:47098:24 .members._renderFeedback@http://localhost:9090/rwt-resources/rap-client.js:47076:11 .members.renderFeedback@http://localhost:9090/rwt-resources/rap-client.js:47056:7 rwt.remote.DNDSupport.prototype._renderFeedback@http://localhost:9090/rwt-resources/rap-client.js:43993:7 rwt.remote.DNDSupport.prototype.setCurrentTargetElement@http://localhost:9090/rwt-resources/rap-client.js:44080:5 rwt.remote.DNDSupport.prototype._onMouseOver@http://localhost:9090/rwt-resources/rap-client.js:44071:9 .members._dispatchEvent@http://localhost:9090/rwt-resources/rap-client.js:3865:13 .members.dispatchEvent@http://localhost:9090/rwt-resources/rap-client.js:3806:7 rwt.event.EventHandler._dispatchMouseEvent@http://localhost:9090/rwt-resources/rap-client.js:15503:7 rwt.event.EventHandler._fireElementHoverEvents@http://localhost:9090/rwt-resources/rap-client.js:15492:7 rwt.event.EventHandler._onmouseevent_post@http://localhost:9090/rwt-resources/rap-client.js:15430:1 rwt.event.EventHandler._processMouseEvent@http://localhost:9090/rwt-resources/rap-client.js:15402:5 rwt.event.EventHandler._onmouseevent@http://localhost:9090/rwt-resources/rap-client.js:15379:9 .bind/<@http://localhost:9090/rwt-resources/rap-client.js:624:14 Debug: on Thanks for the demo project. I can reproduce the issue now and I'm looking for the real reason. Fixed with change https://git.eclipse.org/r/#/c/58919/ |
Created attachment 256460 [details] Animated GIF showing how to crash the client We have a number of tables with DnD support, you can drag table items from one table into an other. The DropTargetListener we use adds DND.FEEDBACK_INSERT_BEFORE to the event. With RAP 3.0, when dragging a table item from one table into an other, the client can crash with a "null is not an object" javascript error message. Complete error stack see below. I'll attach an animated GIF to demonstrate (watch closely just before the crash) and a proposed fix.