| Summary: | [Table] Graphic is Disposed during Cell background color update | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Avrajit Chatterjee <avrajit.chatterjee> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | avrajit.chatterjee |
| Version: | unspecified | Keywords: | needinfo |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Avrajit Chatterjee
Avrajit, please provide a self-running snippet/project to reproduce the issue. Thanks. How/where did you create the Color used for cell background? Did you dispose this color somewhere after you set it as a cell background? (In reply to comment #2) > How/where did you create the Color used for cell background? Did you dispose > this color somewhere after you set it as a cell background? Actually we keep a custom ColorRegistry singleton class which keeps a map of all the color objects shared between multiple sessions. So when some requires a color object we check if that has been disposed or not. If not then return and if disposed the create a new color object using the same RGB param and put it in the map and return. Ours is a big code base and its a RCP to RAP migration project. Hence its very hard to find out if some one is disposing the colors after getting hold of them from the registry. But I feel it doesnt as this error does not come up always. For me it looks like the color object is disposed in one session while it is used in another. If this is the case, this is not a bug in RAP. There was a discussion about similar problem with disposed font (see Bug 321135). Disposing of a resource while it is in use is a programming error and is illegal in SWT. (In reply to comment #4) > Disposing of a resource while it is in use is a programming error and is illegal in SWT. I will close it as INVALID. Please reopen if you disagree and have a snippet to reproduce it. |