RFR: 6810: Create treemap viewer for JOverflow
    Alex Macdonald 
    aptmac at openjdk.java.net
       
    Wed Jun 10 16:07:31 UTC 2020
    
    
  
On Tue, 9 Jun 2020 15:55:32 GMT, Kangcheng Xu <kxu at openjdk.org> wrote:
>> Hi! I'm slowly getting through the code so bear with me here. My first impressions are that the UI looks nice and the
>> controls work as you described. The transision between views is quick and the breadcrumbs work well.
>> I'm writing now to describe a NPE I'm seeing which happens when enabling the treemap view while a heap dump is
>> currently open and the JOverflow page is being viewed.
>> This error can happen two ways (seems to be the same problem):
>> 
>> 1. if a JOverflow page is currently being viewed while the treepmap view is added, the error "Failed to create the
>> part's controls" is displayed.
>> 
>> 2. if a JOverflow page is opened in a different tab (i.e, the user is looking at something else like a JFR page) and
>> the treepmap view is added, the view is created with the expected with the "No JOverflow editor selected". However,
>> when going back and viewing the JOverflow page that was opened prior to the treemap view, a NPE is displayed in a
>> dialog.
>> 
>> Having said that, it just seems to be a problem with the already opened heap dump; opening another `*.hprof` file will
>> display the treemap view as expected (this is a continuation of the previous gif):
>> 
>> Error output: java.lang.NullPointerException 	at
>> org.openjdk.jmc.joverflow.ext.treemap.TreemapPage.bindTreemapActions(TreemapPage.java:224) 	at
>> org.openjdk.jmc.joverflow.ext.treemap.TreemapPage.allIncluded(TreemapPage.java:220) 	at
>> org.openjdk.jmc.joverflow.ui.JOverflowUi.updateModel(JOverflowUi.java:173) 	at
>> org.openjdk.jmc.joverflow.ui.JOverflowUi.addModelListener(JOverflowUi.java:190) 	at
>> org.openjdk.jmc.joverflow.ext.treemap.TreemapPageBookView.lambda$0(TreemapPageBookView.java:72) 	at
>> org.openjdk.jmc.joverflow.ui.JOverflowEditor.addUiLoadedListener(JOverflowEditor.java:281) 	at
>> org.openjdk.jmc.joverflow.ext.treemap.TreemapPageBookView.doCreatePage(TreemapPageBookView.java:72) 	at
>> org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:369) [...]
>
> Hi @aptmac!
> 
>> I'm slowly getting through the code so bear with me here.
> 
> Don't worry! Thank you very much for reviewing! The process understandably takes time.
> 
>> I'm writing now to describe a NPE I'm seeing which happens when enabling the treemap view while a heap dump is
>> currently open and the JOverflow page is being viewed.
> 
> I was able to reproduce the problem described. Sorry for not testing thoroughly. Such NPE is caused when the mouse
> click listener binding for the toolbar buttons happens before the actual view composites get created. I've added a null
> check to prevent this.  Please verify the problem is resolved as for 2278edc. Thanks!
> I was able to reproduce the problem described. Sorry for not testing thoroughly. Such NPE is caused when the mouse
> click listener binding for the toolbar buttons happens before the actual view composites get created. I've added a null
> check to prevent this.  Please verify the problem is resolved as for
> [2278edc](https://github.com/openjdk/jmc/commit/2278edc7f8ae2908f15575bc905a4c1903fd68b5). Thanks!
Thanks for checking out so quickly, yes the error doesn't happen anymore.
-------------
PR: https://git.openjdk.java.net/jmc/pull/77
    
    
More information about the jmc-dev
mailing list