This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 216627 - Cannot import old snapshot and cannot generate snapshot
Summary: Cannot import old snapshot and cannot generate snapshot
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Petr Cyhelsky
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2012-08-09 19:18 UTC by alexander.burdukov
Modified: 2013-03-29 21:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Snapshot that produce the exception (2.86 KB, application/octet-stream)
2012-08-09 19:18 UTC, alexander.burdukov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexander.burdukov 2012-08-09 19:18:43 UTC
Created attachment 122955 [details]
Snapshot that produce the exception

Starting from NB 7.2 it is impossible to display snapshot created on fly and cannot load snapshots created in NB 7.1.2.

Following exception is produced in both cases:

java.lang.ArrayIndexOutOfBoundsException: 396
    at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.get5Bytes(CPUCCTContainer.java:511)
    at org.netbeans.lib.profiler.results.cpu.CPUCCTContainer.getSelfTime1ForNodeOfs(CPUCCTContainer.java:246)
    at org.netbeans.lib.profiler.results.cpu.PrestimeCPUCCTNodeBacked.setSelfTimeNode(PrestimeCPUCCTNodeBacked.java:245)
    at org.netbeans.lib.profiler.results.cpu.PrestimeCPUCCTNodeBacked.getChildren(PrestimeCPUCCTNodeBacked.java:188)
    at org.netbeans.lib.profiler.results.cpu.PrestimeCPUCCTNodeBacked.getNChildren(PrestimeCPUCCTNodeBacked.java:257)
    at org.netbeans.lib.profiler.ui.components.treetable.AbstractTreeTableModel.isLeaf(AbstractTreeTableModel.java:173)
    at org.netbeans.lib.profiler.ui.components.treetable.ExtendedTreeTableModel.isLeaf(ExtendedTreeTableModel.java:133)
    at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2784)
    at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:492)
    at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1359)
    at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1495)
    at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1287)
    at javax.swing.tree.VariableHeightLayoutCache.ensurePathIsExpanded(VariableHeightLayoutCache.java:983)
    at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(VariableHeightLayoutCache.java:181)
    at javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(BasicTreeUI.java:1695)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.treeExpanded(BasicTreeUI.java:3783)
    at javax.swing.JTree.fireTreeExpanded(JTree.java:2754)
    at javax.swing.JTree.setExpandedState(JTree.java:3614)
    at javax.swing.JTree.expandPath(JTree.java:2202) 

See attached snapshot file as example.

After quick investigation it seems that bug is somewhere in the method PrestimeCPUCCTNodeBacked.setSelfTimeNode: 

it should not try to invoke container.getSelfTime1ForNodeOfs(ofs) if CPUCCTContainer.collectingTwoTimeStamps flag is false.

Please, note that this is showstopper for ME SDK product.
Comment 1 Jiri Sedlacek 2012-08-10 09:09:31 UTC
Regression, caused by http://hg.netbeans.org/profiler-main/rev/0ba6412dadf9 which implements Bug 55485.
Comment 2 Jiri Sedlacek 2012-08-10 09:13:17 UTC
Fixed in profiler-main: http://hg.netbeans.org/profiler-main/rev/ab1013604687.
Comment 3 Jiri Sedlacek 2012-08-10 09:15:08 UTC
Petře please make sure the fix gets into the closest patch release.
Comment 4 Tomas Hurka 2012-08-16 10:10:50 UTC
Verified in profiler-main.
Comment 5 Quality Engineering 2012-08-17 01:26:58 UTC
Integrated into 'main-golden', will be available in build *201208170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ab1013604687
User: Jiri Sedlacek <jis@netbeans.org>
Log: Bugfix #216627 - do not read SelfTime1 when not collecting two timestamps
Comment 6 Tomas Hurka 2012-08-21 10:44:10 UTC
Transplanted to release72 branch as d6750fe9b909.
Comment 7 Quality Engineering 2012-09-01 11:03:44 UTC
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/d6750fe9b909
User: Jiri Sedlacek <jis@netbeans.org>
Log: Bugfix #216627 - do not read SelfTime1 when not collecting two timestamps
(transplanted from ab1013604687b30232a72d0165e835193c9e2d26)
Comment 8 Tomas Danek 2012-09-03 11:56:27 UTC
(In reply to comment #4)
> Verified in profiler-main.
Comment 9 alexander.burdukov 2013-03-29 21:05:35 UTC
Verified with NB 7.2.1 and 7.3. The issue is resolved. Closed.