RFR: 6204: Flight recorder launcher tab bugs out [v5]

Alex Macdonald aptmac at openjdk.java.net
Mon Jun 28 15:11:06 UTC 2021


On Fri, 25 Jun 2021 16:12:48 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:

>> Miroslav Wengner has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   6204: code clean up
>
> It took me longer to figure out how to get to this page than I had originally thought. For anyone else curious, here's what it looks like:
> 
> ![2021-06-25-115040_1173x738_scrot](https://user-images.githubusercontent.com/10425301/123451350-945a4580-d5ab-11eb-8b15-0d349926fccc.png)
> 
> Steps:
> 1. Run as JMC-Eclipse IDE
> 2. Import a project
> 3. Highlight project in the package explorer and select "Run as" -> "Run as Java Application with Flight Recorder"
> 4. Go back to the context menu under the package explorer, but this time go "Run as" -> "Run Configurations.."
> 5. Find the Launcher under "Java Application", then use the "Flight Recorder" tab at the top
> 
> At first observation, compared to master these changes allow for the "Run as Java Application with Flight Recorder" to be used, otherwise I was experiencing and error trying to enable flight recorder features, so that's nice.
> 
> However using this changeset I'm hitting a NPE at RecordingWizardPage line 222: https://github.com/openjdk/jmc/blob/master/application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/wizards/RecordingWizardPage.java#L222
> 
> Running through with the debugger I found that the shell is actually `null`, so this blows up trying to `layout()`. Simply removing this line looks to fix it.
> 
> Is this what the bug is? I'm trying to select a template in the template manager but nothing seems to be working:
> ![ezgif-2-1ce1066b3b31](https://user-images.githubusercontent.com/10425301/123454466-983b9700-d5ae-11eb-91d0-a66f5d0d8a9b.gif)

> @aptmac it also doesn't allow you to select a template, even when you have created one in previous recording. This is bug and should be IMHO solved in another ticket, what do you think ?

To be honest I thought from reading the bug description on [JMC-6204](https://bugs.openjdk.java.net/browse/JMC-6204) that this was the actual issue needing to be solved. It reads:

> Usually the template combo box will contain the templates available in the template manager. However, it seems to bug out, especially for JDK 11 templates. Perhaps if the previously used template is no longer available too? Or if trying to select a template using the Template Manager button?

So I see this PR as addressing a separate issue where the addition of commercial features flags was preventing the launcher tab from opening, but JMC-6204 is concerned with the template manager within the launcher. @thegreystone could you confirm?

If you still wanted to go the separate bug route then a new bug could be opened for tracking this PR, and leave 6204 for the template manager work.

For Linux there still needs to be a resolution for this line: https://github.com/openjdk/jmc/blob/master/application/org.openjdk.jmc.flightrecorder.controlpanel.ui/src/main/java/org/openjdk/jmc/flightrecorder/controlpanel/ui/wizards/RecordingWizardPage.java#L222. I'm not sure if that issue reported for Oracle JDK 7.1 is still valid, but to be safe there could also just be a quick check on `getShell()` to make sure it's not null. As it stands now it's crashing from a NPE and not providing any helpful diagnostic information, here's what the error looks like:

![2021-06-28-110728_1152x733_scrot](https://user-images.githubusercontent.com/10425301/123659781-0b3c4c00-d801-11eb-8259-ce02e4f0701f.png)

-------------

PR: https://git.openjdk.java.net/jmc/pull/265


More information about the jmc-dev mailing list