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 57790 - Profiler should better handle initialization errors
Summary: Profiler should better handle initialization errors
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-12 19:08 UTC by gaxzero
Modified: 2007-02-12 22:27 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gaxzero 2005-04-12 19:08:57 UTC
java.lang.NullPointerException
	at
org.netbeans.modules.profiler.actions.ProfilingAwareAction.isEnabled(ProfilingAwareAction.java:27)
	at org.openide.awt.Actions$MenuBridge.updateState(Actions.java:625)
	at org.openide.awt.Actions.connect(Actions.java:115)
	at org.openide.awt.Actions.connect(Actions.java:102)
	at org.openide.awt.Actions$MenuItem.<init>(Actions.java:955)
	at
org.netbeans.modules.openide.awt.DefaultAWTBridge.createMenuPresenter(DefaultAWTBridge.java:33)
	at
org.openide.util.actions.CallableSystemAction.getMenuPresenter(CallableSystemAction.java:41)
	at org.openide.awt.MenuBar$LazyMenu$MenuFolder.createInstance(MenuBar.java:581)
	at
org.openide.loaders.FolderInstance.defaultProcessObjects(FolderInstance.java:715)
	at org.openide.loaders.FolderInstance.access$000(FolderInstance.java:68)
	at org.openide.loaders.FolderInstance$2.run(FolderInstance.java:601)
	at org.openide.util.Task.run(Task.java:189)
	at org.openide.awt.AWTTask.run(AWTTask.java:29)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
	at java.awt.Dialog$1.run(Dialog.java:540)
	at java.awt.Dialog.show(Dialog.java:561)
	at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:798)
	at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:841)
	at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:829)
	at org.openide.util.Mutex.doEventAccess(Mutex.java:1044)
	at org.openide.util.Mutex.readAccess(Mutex.java:170)
	at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:814)
	at
org.netbeans.modules.javacore.ProgressPanel.openProgressDialog(ProgressPanel.java:240)
[catch] at org.netbeans.modules.javacore.JMManager$5.run(JMManager.java:1190)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Comment 1 gaxzero 2005-04-12 19:24:20 UTC
only happens on NB 4.1beta (and not on 4.0)
Comment 2 gaxzero 2005-04-13 02:59:52 UTC
probably related to this message at startup
java.lang.Exception: Could not load a the 'client' native library. Original
exception: java.lang.UnsatisfiedLinkError
...
...netbeans-4.1-beta/nb4.1/modules/profiler-ea-libs/deployed/jdk142/linux/libclient.so

I am running blackdown sdk 1.4.2 on x86_64
seems to be ok when running 1.4.2 from sun in i386 mode

fix with better error message?

Comment 3 mishadmitriev 2005-04-13 22:17:47 UTC
Ok, I see two problems here:

1) NullPointerException in ProfilingAwareAction. May be a bug in NB 4.1 or in
our code. Please download the latest Milestone of Profiler, M6, that has just
been released, from http://profiler.netbeans.org, and check if the problem is
still there.

2) UnsatisfiedLinkError - apparently caused by the fact that you run the IDE on
a 64-bit VM, whereas the Profiler's library in question (as well as all its
VM-side libraries) are 32-bit. Support for 64-bit VMs is covered by a separate
issue, http://www.netbeans.org/issues/show_bug.cgi?id=47337, and we hope it will
be addressed, at least partially, in the next release of Profiler, Milestone 7.
Comment 4 iformanek 2005-04-14 15:47:58 UTC
Yes, the NPE is likely caused by the failure to initialize the profiler, the 
call that causes this is:
Profiler.getDefault().getTargetAppRunner().getProfilerClient
().getCurrentInstrType()

We should probably be more graceful about the profiler failure to initialize, 
and just disable all profiling actions in that case rather than throwing NPE.

I am changing this issue to reflect that. If you believe the original issue was 
caused by something else than the lack of 64-bit, please change/add accordingly.

Comment 5 iformanek 2005-04-14 16:12:35 UTC
Implemented for M7.
Comment 6 ehucka 2006-10-09 12:11:00 UTC
Verification of old issues.
Comment 7 Alexander Kouznetsov 2007-02-12 22:27:52 UTC
Closing old issues.
Comment 8 Alexander Kouznetsov 2007-02-12 22:27:54 UTC
Closing old issues.