| Summary: | GridRowContainer.getToolTipTargetBounds can be called when _hoverRow is null | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Wolfgang Pedot <wolfgang.pedot> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | tbuschto |
| Version: | 3.1 | ||
| Target Milestone: | 3.1 M4 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
Wolfgang Pedot
Forgot to mention: the mouse-cursor needs to hover over the table while scrolling so mostly mousewheel/trackpad-scrolling is affected. Is this crash are regression or can be reproduced with RAP 3.0? Could you provide a simple snippet to demonstrate the issue? I can't reproduce it with Controls Demo -> TableViewer Tab. I´ll have to test this with 3.0. I tried to reproduce it in the Demo (same RAP-Bundles) with ToolTips but it seems to be impossible there. I managed to get _hoverItem to be null between requestToolTipText and setCellToolTipText but the tooltip was never rendered in those cases so there was no call to getToolTipTargetBounds and therefor no crash. I also noticed that there are lots of calls to getToolTipTargetBounds when moving the mouse-cursor inside the cell that triggered the tooltip, could this be somwhow theme-related (our app used smaller rows)? The issue is always tricky to reproduce because the timing has to be just right (usually scrolling, then halt short, then scroll further) and sometimes I have to try for quite some time before I get it to crash with our application. However I did not manage to crash the demo.... Created attachment 258123 [details]
Shows calls to GridRowContainer._setHoverItem with RWT.FIXED_COLUMNS set
Created attachment 258124 [details]
Shows calls to GridRowContainer._setHoverItem with RWT.FIXED_COLUMNS not set
Created attachment 258125 [details]
Shows a scroll-timing hit (scrolling between requestCellToolTipText and its response) but no crash
Created attachment 258126 [details]
Shows a prevented crash when scroll-timing is hit
I have tested on a RAP 3.0 based and I can reproduce the issue there as well. It does appear to be easier to reproduce on FireFox (41.0.1) for me but there are reports with other browsers as well. After further investigation I also managed to crash the demo now, appearantly RWT.FIXED_COLUMNS is a key factor. Once I enabled that (and tooltips) I could reproduce the issue in the demo. The scroll-timing is crucial though, one has to scroll right when the "requestToolTip" call goes out to the server and before the answer is processed. Then there is another window to hit because GridRowContainer._hoverItem has to be null at the right moment. I have added lots of console.logs to try and find out what is happening and I attached some logfiles. There is a noticeable difference in the output depending on the presence of FIXED_COLUMNS, there seem to be much more calls and the "row" parameter is quite often undefined. I think I managed to reproduce the scenario in a unit test. However, it requires the mouse to hover the grid clientArea, but none of the rows. I'm not sure how that would be possible, since the entire client area consists of rows. I have received numerous reports of this from users so it appears to be quite common. It happens quite often for some, not so much for others. The type of input-device may also be a factor, some are reporting more problems when using a mousewheel compared to a trackpad on the same machine but that may also be because of different usage patterns and timings. Fixed with Commit ac2a2d72588aebfa1d71d17672189e063edc88eb. HoverItem is now checked before rendering the tooltip. |