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 115777 - Add stopwatch profiling point failed
Summary: Add stopwatch profiling point failed
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Jiri Sedlacek
URL:
Keywords:
: 114527 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-18 04:28 UTC by waynezhang
Modified: 2009-01-16 14:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description waynezhang 2007-09-18 04:28:05 UTC
Try to add stopwatch profiling point throws following exception, happened at least M10 and Beta1.

======================================

java.lang.IllegalArgumentException: Tried to pass null fo arg
	at org.openide.filesystems.FileUtil.isParentOf(FileUtil.java:1052)
	at org.openide.filesystems.FileUtil.getRelativePath(FileUtil.java:841)
	at org.netbeans.modules.profiler.ppoints.Utils.getRelativePath(Utils.java:221)
	at org.netbeans.modules.profiler.ppoints.CodeProfilingPoint$Location.store(CodeProfilingPoint.java:234)
	at
org.netbeans.modules.profiler.ppoints.StopwatchProfilingPointFactory.storeProfilingPoint(StopwatchProfilingPointFactory.java:95)
	at org.netbeans.modules.profiler.ppoints.ProfilingPointFactory.saveProfilingPoints(ProfilingPointFactory.java:147)
	at org.netbeans.modules.profiler.ppoints.ProfilingPointFactory.saveProfilingPoints(ProfilingPointFactory.java:138)
	at org.netbeans.modules.profiler.ppoints.ProfilingPointsManager.storeProfilingPoints(ProfilingPointsManager.java:522)
	at org.netbeans.modules.profiler.ppoints.ProfilingPointsManager.addProfilingPoints(ProfilingPointsManager.java:210)
	at org.netbeans.modules.profiler.ppoints.ProfilingPointsManager.addProfilingPoints(ProfilingPointsManager.java:199)
	at org.netbeans.modules.profiler.ppoints.ProfilingPointsManager.addProfilingPoint(ProfilingPointsManager.java:195)
	at org.netbeans.modules.profiler.ppoints.ui.InsertProfilingPointAction.performAction(InsertProfilingPointAction.java:70)
	at org.netbeans.modules.profiler.ppoints.ui.InsertProfilingPointAction.performAction(InsertProfilingPointAction.java:86)
	at org.openide.util.actions.NodeAction.performAction(NodeAction.java:267)
	at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:96)
	at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:55)
	at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:92)
	at org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:255)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1216)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1257)
	at java.awt.Component.processMouseEvent(Component.java:6038)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
	at java.awt.Component.processEvent(Component.java:5803)
	at java.awt.Container.processEvent(Container.java:2058)
	at java.awt.Component.dispatchEventImpl(Component.java:4410)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Component.dispatchEvent(Component.java:4240)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
	at java.awt.Container.dispatchEventImpl(Container.java:2102)
	at java.awt.Window.dispatchEventImpl(Window.java:2429)
	at java.awt.Component.dispatchEvent(Component.java:4240)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Tomas Hurka 2007-09-18 13:20:44 UTC
*** Issue 114527 has been marked as a duplicate of this issue. ***
Comment 2 Tomas Hurka 2007-09-18 13:20:54 UTC
This is not a general case - there should be some special conditions to reproduce this problem. Lowering priority to P3. Please provide steps how to 
reproduce it. Thanks. 
Comment 3 Jiri Sedlacek 2007-10-17 17:34:14 UTC
Reproduced - happens when there's other profiling point defined in invalid (== not existing) file, happens for example
after refactoring.
Comment 4 Jiri Sedlacek 2007-10-17 17:47:09 UTC
NOTE - profiling point with invalid file information needs to be of the same type.
Comment 5 Jiri Sedlacek 2007-10-19 21:45:10 UTC
Profiling Points with invalid locations are now silently removed to prevent this problem.

Fixed in trunk.

/cvs/profiler/modules/main/src/org/netbeans/modules/profiler/ppoints/ProfilingPointsManager.java,v  <-- 
ProfilingPointsManager.java
new revision: 1.3; previous revision: 1.2
/cvs/profiler/modules/main/src/org/netbeans/modules/profiler/ppoints/ProfilingPoint.java,v  <--  ProfilingPoint.java
new revision: 1.2; previous revision: 1.1
/cvs/profiler/modules/main/src/org/netbeans/modules/profiler/ppoints/CodeProfilingPoint.java,v  <--  CodeProfilingPoint.java
new revision: 1.2; previous revision: 1.1
Comment 6 mariadavydova 2009-01-16 14:07:30 UTC
verified in Build 200901140201