| Summary: | DecorationScheduler Job never finishes | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ian Bull <irbull> | ||||||
| Component: | Workbench | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P2 | ||||||||
| Version: | 1.1 | ||||||||
| Target Milestone: | 1.3 M2 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 147179 [details]
patch to reproduce
Small patch for demo workbench to reproduce, just collapse the tree.
Created attachment 147336 [details]
Proposed fix
Committed patch to CVS HEAD. The fix was to call DecoratorManageräshutdown when the session is invalidated. In addition DecorationScheduler#updatePending() now returns false if shutdown was requested. |
There appears to be an infinite loop in RAP when a decoration job is running. If you have a decoration job running, and you close your connection (shudown the browser), the decoration job runs forever. (and hangs on to UI Thread object too). If you look at DecorationScheduler#createDecorationJob: while (updatesPending()) { System.out.println("Update Pending:"); try { Thread.sleep(100); } catch (InterruptedException e) { // Cancel and try again if there was an error // RAP [rh] fake service context UICallBack.runNonUIThreadWithFakeContext( display, new Runnable() { public void run() { decorationJob.schedule(); } }); return Status.CANCEL_STATUS; } } This just keeps sleeping, and updatePending returns true. I reproduced this by added a decorator to the RAP Mail demo (to the navigator view). I then printed 1000 names in the view, and expanded the tree. While waiting for the tree to expand I closed the browser, and observed that we sit in an infinite loop.