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.
Build: NetBeans IDE Dev (Build 201404130001) VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b70, Java(TM) SE Runtime Environment, 1.8.0-b132 OS: Linux User Comments: skobi: Unable to start profiling with remote platform on raspberry pi Stacktrace: java.lang.NullPointerException at org.netbeans.lib.profiler.common.integration.IntegrationUtils.getPlatformByOSAndArch(IntegrationUtils.java:279) at org.netbeans.modules.profiler.nbimpl.actions.ProfilerLauncher.setupAgentEnv(ProfilerLauncher.java:383) at org.netbeans.modules.profiler.nbimpl.actions.ProfilerLauncher.access$200(ProfilerLauncher.java:77) at org.netbeans.modules.profiler.nbimpl.actions.ProfilerLauncher$Session.configure(ProfilerLauncher.java:208) at org.netbeans.modules.profiler.nbimpl.actions.ProfilerLauncher$Session.getProperties(ProfilerLauncher.java:150) at org.netbeans.modules.profiler.nbimpl.providers.DefaultProfilerArgsProvider.getArguments(DefaultProfilerArgsProvider.java:71)
Created attachment 146724 [details] stacktrace
The exception is caused in method getPlatformByOSAndArch() because the parameter String JVMTarget is null. It should be set in class RemotePlatform but as far as I can see it is never set. Simply Checking for null does not work because this causes a wrong path where libprofilerinterface.so is expected. When attaching the profiler to the running process on the remote machine everthing works fine. The remote machine is a raspberry pi configured as remote platform running jdk-8-oracle-arm-vfp-hflt or jdk-7-oracle-armhf.
Set Hardware back to All:All because the problem does not seem to be hardware specific. I originally found the bug using Linux Mint on a PC Laptop developing with the Raspberry Pi running Raspian. It is mainly caused by the missing property JVMTarget in the XML file describing the remote platform.
Caused by incompatible remote platform VM, the remote platform on Pi is not a J2SE Embedded VM.
Does this mean that a remote plattform always has to be a J2SE Embedded VM? Shouldn't this than be checked when adding a remote platform?
(In reply to skobi from comment #5) > Does this mean that a remote plattform always has to be a J2SE Embedded VM? > Shouldn't this than be checked when adding a remote platform? For now use the embedded VM as a workaround, after fixes it should also work with the full VM.
Created attachment 147289 [details] Fix for JDK 8 Attaching a fix working on JDK 8 (normal, embedded). Good as a hot fix. For JDK 7 it's harder, no abi property. I am investigating if it's possible to detect it in some cheap way.
Petre please integrate the fix for JDK 8.
fixed in http://hg.netbeans.org/profiler-main/rev/ea07d608256d notes: There should no longer be any problems when not profiling. Profiling with remote jdk8 (either full or embedded) should be OK - For profiling the profile has to be at least compact3 Profiling with remote jdk7 currently won't work on vfp-hflt architecture (there is no simple way how to recognise vfp-hflt architecture from sflt or vfp-sflt on jdk 7) new Bug should be filed for this problem.
Integrated into 'main-silver', will be available in build *201405180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ea07d608256d User: Petr Cyhelsky <cyhelsky@netbeans.org> Log: #243800 detect arm floating point architecture only by sun.arch.abi property