Uploaded image for project: 'Java Mission Control'
  1. Java Mission Control
  2. JMC-5372

Exception printed on page when opening invalid recording

XMLWordPrintable

      Earlier, the Jfr editor gracefully failed when opening an invalid recording showing a dialog explaining that the recording was invalid (using the title specified at com.oracle.jmc.flightrecorder.ui.JfrEditor.INVALID_RECORDING_DIALOG_TITLE and the message at com.oracle.jmc.flightrecorder.ui.JfrEditor.INVALID_RECORDING_DIALOG_TEXT).

      Now the page fails with an exception stack trace:
      java.lang.IllegalArgumentException: Cannot fetch accessor from Attribute(address, Type(text)) for type com.oracle.jdk.SocketWrite
      at com.oracle.jmc.flightrecorder.ui.common.AggregationGrid.lambda$4(AggregationGrid.java:153)
      at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:269)
      at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
      at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:952)
      at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:926)
      at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:316)
      at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:747)
      at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:283)
      at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:395)
      at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:725)
      at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
      at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:511)
      at com.oracle.jmc.flightrecorder.ui.common.AggregationGrid.mapItems(AggregationGrid.java:159)
      at com.oracle.jmc.flightrecorder.ui.common.AggregationGrid.buildRows(AggregationGrid.java:174)
      at com.oracle.jmc.flightrecorder.ui.common.ItemHistogram.show(ItemHistogram.java:202)
      at com.oracle.jmc.flightrecorder.ui.common.FilterComponent.filterChangeHelper(FilterComponent.java:201)
      at com.oracle.jmc.flightrecorder.ui.common.FilterComponent.filterChangeHelper(FilterComponent.java:206)
      at com.oracle.jmc.flightrecorder.ui.pages.SocketIOPage$IOPageUi.onPrimaryFilterChange(SocketIOPage.java:342)
      at com.oracle.jmc.flightrecorder.ui.pages.SocketIOPage$IOPageUi.buildHistograms(SocketIOPage.java:317)
      at com.oracle.jmc.flightrecorder.ui.pages.SocketIOPage$IOPageUi.<init>(SocketIOPage.java:199)
      at com.oracle.jmc.flightrecorder.ui.pages.SocketIOPage.display(SocketIOPage.java:502)
      at com.oracle.jmc.flightrecorder.ui.JfrEditor.displayPage(JfrEditor.java:207)
      at com.oracle.jmc.flightrecorder.ui.JfrEditor.navigateTo(JfrEditor.java:191)
      at com.oracle.jmc.flightrecorder.ui.JfrOutlinePage.selectionChanged(JfrOutlinePage.java:405)
      at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:158)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
      at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
      at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:155)
      at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2191)
      at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1229)
      at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1258)
      at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:242)
      at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:236)
      at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:405)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4248)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1501)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1509)
      at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1313)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4072)
      at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5070)
      at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5457)
      at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
      at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227)
      at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1135)
      at org.eclipse.swt.widgets.Tree.mouseDownSuper(Tree.java:2102)
      at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1127)
      at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2616)
      at org.eclipse.swt.widgets.Tree.mouseDown(Tree.java:2069)
      at org.eclipse.swt.widgets.Display.windowProc(Display.java:5725)
      at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
      at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227)
      at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2140)
      at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2402)
      at org.eclipse.swt.widgets.Display.windowProc(Display.java:5789)
      at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
      at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5218)
      at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5367)
      at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
      at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3695)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
      at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
      at com.oracle.jmc.rcp.application.Application.start(Application.java:36)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:538)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

      To reproduce:
      1. Open 7u14.jfr
      2. Open the Socket I/O page

      If not showing the modal dialog it would be very nice to include the error title and message in the editor along with the stack trace instead of only printing the stack trace.

        1. 7u14.jfr
          594 kB
          Erik Greijus
        2. Skärmavbild 2016-12-23 kl. 10.20.46.png
          442 kB
          Erik Greijus

            jmatsuoka Joshua Matsuoka
            egreijus Erik Greijus (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: