Bug 317537

Summary: ScrollingGraphicalViewer.reveal can result in NPE on workbench shutdown
Product: [Tools] GEF Reporter: Ian Trimble <ian.trimble>
Component: GEF-Legacy GEF (MVC)Assignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ian Trimble CLA 2010-06-21 20:12:40 EDT
If ScrollingGraphicalViewer.reveal is called while workbench shutdown is in progress, the call to getFigureCanvas can return null, resulting in an NPE at line 89. There may be other cases where this occurs, but workbench shutdown is the only one I have observed to date.
Comment 1 Alexander Nyßen CLA 2010-10-20 15:49:04 EDT
From the description you provide it does not get quite clear why reveal gets called during shutdown of the workbench. Could you provide a stack trace? I assume this could pretty much result from a misuse of the reveal method.
Comment 2 Ian Trimble CLA 2010-10-20 16:29:39 EDT
I will provide a stacktrace if I see it again - 4 months have elapsed since the bug was logged and I don't have a stacktrace on-hand. But the fact remains that this is not coded defensively, making the NPE possible.