| Summary: | Closing a Sapphire diagram editor would clear up the all the diagram rendering context cache | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Shenxue Zhou <shenxue.zhou> |
| Component: | Sapphire | Assignee: | Shenxue Zhou <shenxue.zhou> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | blocker | ||
| Priority: | P1 | CC: | konstantin, ling.hao |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Shenxue Zhou
When you fix this issue, please make sure to include additional information about the problem and the resolution in order for this to be verifiable. Here are the repro steps: 1. Open two Sapphire Diagram based editors 2. Closing one of them, and try to launch context menu in the other 3. You'll get an NPE. The root cause was all Sapphire diagram based editors shared a static cache of all the DiagramRenderingContext. When an editor is closed, it also cleared up the cache thus causing other editors to lose their cached DiagramRenderingContext. The fix is not to share the static DiagramRenderingContext cache. Instead, every editor instance hold its own DiagramRenderingContext cache. The cache will be disposed when the editor is closed. Verified via repro steps. |