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 200806161203) VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b21 OS: Windows XP, 5.1, x86 User Comments: -second debug URL attempt with the following query: http://www.google.com/search?q=hello+there&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a In the first debug URL, openeed the source and set a breakpoint. Then received this NPE
Created attachment 62898 [details] stacktrace
Upgrading this to P2 as feature to set a breakpoint on a remote file is prevented; and subsequent launch of debug session for plain web project, DebugURL to same or new URL will fail. Restart of IDE does not help for existing and/or new projects. New debug launches result in build failure due to the same NPE. NetBeans IDE Dev (Build 200806181204)
It looks like this exception occurs because the breakpoint annotations are being added before the debugger is launched, so NbJSDebugger.getInputStreamForURL() returns null.
It turns out that there are many problems with URL breakpoints, so this will not be fixed for M1. The known issues are: 1) A dataloaders performance fix causes the MIME type for each FileObject to be computed when DataObject.find() is called on it. The calculation of the MIME type opens the FileObject's InputStream, which eventually retrieves the data from the browser. The URLFileObject class needs to be changed to not use this behavior, since retrieval of files from the browser cache is unreliable during debugger startup or URL loading. 2) The breakpoint annotations and line updaters are initialized before the debugger launches the browser, so cache information is not available to get the LineCookie instances. These initializations need to be deferred until the debugger is in the 'Running' state. This causes problems with the display of URLs, which will sometimes display a blank page. This happens because the editor caches the result of FileObject.getInputStream(). 3) The browser extension sometimes stops responding or crashes the Firefox browser when the "source" command is sent to it. It appears that nsIChannel.open() never returns in these cases. I've fixed the NPE in changeset b4c4f7543b0e, but that exposes the above problems.
After some more investigation, the root cause of these problems appears to be the Firefox browser. While a URL is being loaded in the browser, the services used to retrieve URLs either return empty data or hang, causing the IDE and the browser to stop responding. Switching to asynchronous streaming of data does not appear to help. Possible workarounds to this may be to: a) retrieve all the URLs in the breakpoints window before the URL to be debugged starts to load in the browser b) suppress/defer attempts to retrieve the URL source while the browser is loading said URL; this might involve preventing the IDE from showing the editor window for the current breakpoint when that breakpoint is a URIBreakpoint
Krys, can you retest this to see what the current symptoms are.
*** Issue 139189 has been marked as a duplicate of this issue. ***
The wait time for the browser response now has a timeout, so the IDE no longer hangs indefinitely. However, the editor comes up with a blank page since no source could be retrieved from the browser.
NetBeans IDE Dev (Build 20080729221255) Still happens with some URL breakpoints. Testing with the google url above, the IDE did hang once a breakpoint is set and subsequent URL debugging. URL breakpoints for cnn.com seems on the other hand seem to work fine. Attaching partial thread dump from the google hang.
Created attachment 66013 [details] thread dump
*** Issue 142719 has been marked as a duplicate of this issue. ***
Fixed due to the following changes: changeset 95471 06e4cede558e - use base64 encoding to transmit sources from FF extension to NetBeans IDE changeset 95184 20050017c650 - use Firebugs cache to get the source
Verified fixed with NetBeans IDE Dev (Build 20080811162939) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13 System: Windows XP version 5.1
*** Issue 138029 has been marked as a duplicate of this issue. ***