| Summary: | [RAP/EMF]ExtendedImageRegistry NullPointerException after session time out | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | chengdong Mising name <chengdong.li> | ||||||||||
| Component: | Edit | Assignee: | Kenn Hussey <Kenn.Hussey> | ||||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | Kenn.Hussey | ||||||||||
| Version: | 2.6.0 | Flags: | Kenn.Hussey:
helios+
|
||||||||||
| Target Milestone: | SR1 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Linux | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
chengdong Mising name
Created attachment 177344 [details]
library model used as a test case.
attached the test case.
Created attachment 177360 [details]
proposed changes
Please confirm whether these changes address the issue.
Created attachment 177383 [details]
propsed patch for ExtendedImageRegistry
This is a proposed change for ExtendedImageRegistry. Similar changes should apply to ExtendedFontRegistry and ExtendedColorRegistry.
Ken: The patch you supplied does not fix the problem. Because the INSTANCE is immutable, it did not change between 2 sessions, but the table==null. I propose to change the INSTANCE to mutable, so that when display is disposed, set INSTANCE to null, and recreate INSTANCE if necessary. See the previous attachement for ExtendedImageRegistry. Similar should apply to Font and Color registry. One more thing: we really should dispose the images when the display is disposed. Does anyone know what prevent us from doing that? Created attachment 177409 [details]
better patch
Silly me. This patch should address the problem and also ensure safe/correct access to the (session-based) image registry via the static INSTANCE field. Similar changes also made to the font and color registries.
Tested previous patch. And confirmed the bug is fixed. Thanks Kenn! The changes have been committed to HEAD and R2_6_maintenance streams. The changes are available in builds at http://www.eclipse.org/modeling/emf/downloads/?showAll=1&hlbuild=I201008251601&project=emf#I201008251601 (2.7.0) and http://www.eclipse.org/modeling/emf/downloads/?showAll=1&hlbuild=M201008301320&project=emf#M201008301320 (2.6.1). |