| Summary: | UIJob can be scheduled, but never run | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ian Bull <irbull> | ||||||||||
| Component: | Workbench | Assignee: | Project Inbox <rap-inbox> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P1 | ||||||||||||
| Version: | 1.0 | ||||||||||||
| Target Milestone: | 1.3 M2 | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Ian Bull
Created attachment 141679 [details]
Demo
Created attachment 141722 [details]
Proposed patch
This patch runs each waiting async thread before the UIThread ends. Most of these threads will likely fail, but at least they get a chance to run (and clean up). In particular, the UIJob will get a chance to run it's finally block and shut down the job.
Created attachment 147289 [details]
Mini-app to that demonstrates the leak
I could not find a memory leak with the previously attached demo app.
This is a modified version of the initial demo app.
Note the extra thread that schedules the Job which itself schedules the UIJob and causes the UIJob to run without a session context.
Created attachment 147290 [details]
Bugfix
This patch fixes the memory leak. The JobManagerAdapter now recognizes UIJobs and binds them to the session/display. By doing so, it is ensured that this binding is release if the session terminates.
Previously the Job was attached to the defaultProgressMonitor (application scope) and never unbound.
Thanks Ian for pointing at this! The attached patch is in CVS HEAD. Please re-open if the proplem persists. |