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 229221 - Java 7 u21 breaks debugging JavaFX app in browser
Summary: Java 7 u21 breaks debugging JavaFX app in browser
Status: RESOLVED WORKSFORME
Alias: None
Product: javafx
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.3
Hardware: PC Windows 8 x64
: P1 normal with 1 vote (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-30 14:29 UTC by athalai
Modified: 2013-08-23 08:07 UTC (History)
3 users (show)

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 athalai 2013-04-30 14:29:15 UTC
I have NetBeans 7.3 installed. 

I've upgraded Java 7 to u21, now debugging a JavaFX app in a browser (neither in IE nor in Chrome) does not work (app starts, but no breakpoints hit, etc).

If I run the app not in the browser but as a standalone app, the debugger works.

Now I downgraded back to u17 and everything works again. 

I use Win8-IE10. 

Any help is appreciated.
Comment 1 Stepan Zebra 2013-05-09 12:19:48 UTC
I can reproduce.
Debugger starts, but the Debugging window remains empty. It probably fails to connect to the applet. It might be caused by some of the security changes introduced in 7u21.
Petr, please evaluate. If there's a viable solution, it should be added to the current patch.
Comment 2 Petr Somol 2013-05-10 06:31:28 UTC
Upon in initial investigation we confirm there is a problem with 7u21, apparently contract has been broken on the side of the JDK. Will seek ways how to workaround, yet this is unlikely to be found in 7.3.1 timeframe.
Comment 3 Roman Svitanic 2013-05-22 14:51:52 UTC
This is caused because an argument -Xrunjdwp:transport=${debug-transport},address=${jpda.address} is not passed to the target JVM. We still investigate why is that happening.

As a temporary workaround it is possible to set some JVM arguments in project's properties:

Go to "Project properties > Run" and paste for example "-Xms64m" without quotes in "VM Options" field. After that you should be able to debug JavaFX application in browser.
Comment 4 Tomas Zezula 2013-05-24 20:37:48 UTC
I've tried on Mac build 1.7.0_21-b12 (Firefox) and the evaluation is a bit different.
The debugging does not work as the debugger ends before the debuggee starts which cases a VM exit and restart without env options passed to the java VM.
This can be easily see on instruments execve sys call:
In case no debugger VM options:
CPU     ID                    FUNCTION:NAME
  3    257                     execve:entry Creating /usr/bin/open
  1    257                     execve:entry Creating /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Versions/A/Support/SFLIconTool
  2    257                     execve:entry Creating /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Versions/A/Support/SFLIconTool
  1    257                     execve:entry Creating /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lssave
  1    257                     execve:entry Creating /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java

In case of debugger VM options:

CPU     ID                    FUNCTION:NAME
  2    257                     execve:entry Creating /usr/bin/open
  1    257                     execve:entry Creating /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Versions/A/Support/SFLIconTool
  2    257                     execve:entry Creating /System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Versions/A/Support/SFLIconTool
  2    257                     execve:entry Creating /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lssave
  1    257                     execve:entry Creating /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lssave
  1    257                     execve:entry Creating /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
  3    257                     execve:entry Creating /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java


When the debuggee is started in listen mode the debugger works fine, at least on Mac. This can be used as a workaround start the debuggee in listen mode and connect to it by debugger from the IDE. I am now not able to verify if the problem on Windows has the same cause as I don't have Windows, I will lend some Windows machine and try.
Comment 5 Roman Svitanic 2013-05-29 08:15:17 UTC
It seems that Java browser plugin (jp2plugin.exe on Windows) does not pass mentioned VM options to target VM. This can be easily seen in process tree.

If we pass additional VM arguments like -Xms64m or better -ea:javafx.browserdebug, then it seems that jp2plugin process is terminated and a new java process is started. This newly started process hasn't any parent process, but it contains required env arguments for debugging.

Tested on Windows 7 x64.
Comment 6 Petr Somol 2013-05-31 19:42:29 UTC
fixed in jetmain
http://hg.netbeans.org/jet-main/rev/7c8984d28a95
Comment 7 Quality Engineering 2013-06-02 01:08:40 UTC
Integrated into 'main-golden', will be available in build *201306012301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7c8984d28a95
User: Petr Somol <psomol@netbeans.org>
Log: #229221 - Java 7 u21 breaks debugging JavaFX app in browser
Comment 8 idclaar 2013-08-22 22:08:27 UTC
This is still an issue as of the latest (201308212300).  Can anyone advise as to whether there are additional steps/configuration to get this working in the dev release?
Comment 9 Petr Somol 2013-08-23 07:45:52 UTC
Roman, would you please help to evaluate ?
Comment 10 Roman Svitanic 2013-08-23 07:46:46 UTC
I have tried this on Win7 x64 with IE10 with result that everything works as it should, debugging without problems.

However on Firefox 23.0.1 the situation is different. Even run does not work. But this is caused, as it seems, on Firefox side, because even no warning dialog about Java content being loaded is shown (The one where you have to decide to run the application or cancel it).

So if you are on Windows please use Internet Explorer to debug Java FX in browser, unless Firefox will fix their issue.
Comment 11 Roman Svitanic 2013-08-23 07:58:15 UTC
Confirmed, it is a Firefox bug and it should be fixed in future releases of Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=902375
Comment 12 Petr Somol 2013-08-23 08:07:23 UTC
As we identified the source of the bug outside NetBeans and could not reproduce with another valid setup, I am closing.