Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 186650

Summary: [POG]profile external java app. with VM arguments causes JVMTI error
Product: z_Archived Reporter: Alan Haggarty <haggarty>
Component: TPTPAssignee: Stanislav Polevic <stanislav.v.polevic>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: analexee, jkubasta, kendricw
Version: unspecifiedKeywords: plan
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460

Description Alan Haggarty CLA 2007-05-11 17:33:23 EDT
Build ID:  I20070503-1400

Steps To Reproduce:
This was originally noticed with the ArgumentsTest case
of org.eclipse.tptp.ac.testautomation profiler tests but
can be reproduced with others.

1. launch profile -> external java application
2. provide class and path (I used ArgumentsTest from 
org.eclipse.tptp.ac.testautomation\automation-files\external_classes
3. in the Arguments tab add -Dprop1="prop one" to the VM arguments.
4. profile execution analysis for jdk 1.5+


More information:
After running this the console view immediately printed:

the java class is not found:  one'

5-6 minutes later a error message shows up that reads:

"The JVMTI agent org.eclipse.tptp.jvmti is not available.
Make sure that the libraries for the agent are available 
and it is configured properly"

- the "details" pane in this message dialog is empty.

I can reproduce with stand-alone AC and IAC. 

Subsequent profiling attempts in the
same workbench hang forever or a long time at 27%
unless I restart the workbench.

Running this case without the VM argument results in a
successful launch and data collected.

I am using the 4.4.0-200705080100A build on Windows XP.
Comment 1 Guru Nagarajan CLA 2007-05-14 11:28:18 EDT
This is a duplicate of 179816

*** This bug has been marked as a duplicate of bug 179816 ***
Comment 2 Guru Nagarajan CLA 2007-05-14 11:30:05 EDT
The duplicate defect is 178916
Comment 3 Guru Nagarajan CLA 2007-05-14 11:30:33 EDT

*** This bug has been marked as a duplicate of bug 178916 ***
Comment 4 Alan Haggarty CLA 2007-06-20 11:16:20 EDT
This problem can be reproduce in Vista using the 200706140100A build
exactly as described below. 178916 is marked fixed and last committed
on May 29.
Comment 5 Guru Nagarajan CLA 2007-06-20 23:41:39 EDT
Whats the command line you are using
Comment 6 Alan Haggarty CLA 2007-06-22 08:21:24 EDT
No command line, but it seems in the later builds it is fixed if I use the
VM arg:
-Dprop1="prop one"
to the launch profile.
But if I add:
-Dprop1='prop one'
it fails with similar behavior as before.

single quotes is something covered in the original ArgumentsTest test case.The test case uses the args:
-Dprop1="prop one" -Dprop2="prop
two" -Dprop3='prop three'



Comment 7 Kendric Wang CLA 2007-06-22 08:47:09 EDT
Was able to reproduce a similar problem using the TPTP-4.4.0-200706140100C build  on LinuxIA32 with JVMPI. No error messages were generated, but there was also no output was sent to the console.
Comment 8 Guru Nagarajan CLA 2007-06-25 19:38:51 EDT
There is a seperate defect on reporting the right error message to the user. 
As regards the command line arguments this is an enh for the AC to process command line args to escape certain chars. 

Closing this as Works for me and will create an enh for 4.5 against the AC.

Comment 9 Alan Haggarty CLA 2007-06-26 10:01:10 EDT
Does this mean single quotes is no longer supported in the arguments?
It was in previous versions tested with JVMPI.
Comment 10 Alan Haggarty CLA 2007-08-16 15:23:02 EDT
I have also found this same behavior for other arguments errors
than just single quotes. In the latest test I accidently used
-d instead of -D. The result was a usage message to the console
but I could not launch another app successfully afterwards. After 
many minutes I got the same JVMTI exception and then the workbench 
became usable.

It seems in between the error and the exception displaying the 
profiler is blocked. I can try to submit but the launch status just
spins for a while at 51% and then disappears without error.

to reproduce:
1) profile an app adding the VM Argument:
-dprop1="prop one"
2) notice usage message to console
3) try to rerun the profile with 
-Dprop1="prop one"
eventually you will get an exception error. Close this
and try to run the properly configured launch again.
Comment 11 Guru Nagarajan CLA 2007-08-23 17:46:30 EDT
Alexander - if you have time after you are done with 194939 - take a look at this.
Comment 12 Stanislav Polevic CLA 2008-04-09 09:41:35 EDT
Reassigning to Igor.
Comment 13 Stanislav Polevic CLA 2008-05-15 08:05:59 EDT
This defect is fixed in TPTP build #200805130100.
Comment 14 Paul Slauenwhite CLA 2009-06-30 12:12:06 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.