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 102977 - Netbeans hangs on new url attribute in css
Summary: Netbeans hangs on new url attribute in css
Status: RESOLVED WONTFIX
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-30 13:38 UTC by korb
Modified: 2009-12-21 05:52 UTC (History)
1 user (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 korb 2007-04-30 13:38:24 UTC
I was in the CSS editor, adding a new style class. One of the attributes was a
background-image. I wanted to reuse an image that was already on my web site, so
I started to enter the url to the image. I had typed url(http), I paused for a
moment trying to decide what the URL should be, and NB froze. Looking at my
messages.log, I see the following exception:

Uncaught error fetching image:
java.lang.IllegalArgumentException: protocol = http host = null
        at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:146)
        at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:764)
        at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)
        at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:107)
        at
sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240)
        at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
        at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)


NB is completely unresponsive at this point, and I had to kill java to get it to
come back.

If it matters, this is on SuSE Linux 10.2 (kernel 2.6.18.8-0.1) running on a
64-bit version of JDK 1.5.0_10:

java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_10-b03, mixed mode)
Comment 1 Peter Zavadsky 2007-05-01 12:32:07 UTC
I can't reproduce it. Neither I got the provided exception nor the freeze.

Please provide more info:
- the are the exact steps (what and where exactly did you try to type in)
- also the full thread dump when the IDE freezes (the reason might be different
than the exception, it sounds like a deadlock).
Thanks.
Comment 2 _ krystyna 2007-06-15 23:56:21 UTC
I can't reproduce this either on 5.5.1 on Ubuntu/Windows/Solaris or NB6 daily build.

Comment 3 korb 2007-06-18 14:21:25 UTC
OK, I just reproduced this on 5.5.1 (the original occurred on rc1, as I recall). Here's the exception from the messages.log:

Uncaught error fetching image:
java.lang.IllegalArgumentException: protocol = http host = null
	at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:146)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:760)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
	at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:107)
	at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240)
	at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
	at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

I created a new CSS rule by typing this:

body {
}

I then put my mouse after the opening brace and hit enter to move down to a new line. NB then produced a list of
possible attribute names, and I selected background-image and hit enter. I then typed url(), then clicked inside the
parens and typed "http" and paused for a moment. Nothing happened, so then I started to type the remainder of the URL.
As soon as I typed the colon, BANG! it hung, and wrote the above to the log.

This originally happened on my Linux system w/ JDK 1.5.0_10, though today this happened on my Windoze XP system w/ JDK
1.5.0_12. I have installed the profiler and VWP add-ins in both cases.

I don't know how to force a thread dump on Windoze, so I can't give that to you, sorry.
Comment 4 Peter Zavadsky 2007-08-22 01:42:22 UTC
I missed the last message (removing incomplete keyword), will need to investigate it.
Comment 5 Peter Zavadsky 2007-08-22 01:45:43 UTC
Krys, could you try to reproduce it on Windows? Thanks.

To get the thread dump on Windoze, when you run it from console you press Ctrl-Break.
Comment 6 Peter Zavadsky 2007-08-22 01:52:02 UTC
Krys, you don't need to I just reproduced it on Ubuntu and NB 6.0 as well, (steps as described in the last reporter's
message).

The entire stack is (see below). Passing to css editor. This doesn't have to do anything with the designer.

java.lang.IllegalArgumentException: protocol = http host = null
        at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:146)
        at org.netbeans.core.NbProxySelector.select(NbProxySelector.java:89)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:764)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:694)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:938)
        at java.net.URL.openStream(URL.java:1007)
        at org.xhtmlrenderer.swing.NaiveUserAgent.getInputStream(NaiveUserAgent.java:74)
        at org.xhtmlrenderer.swing.NaiveUserAgent.getImageResource(NaiveUserAgent.java:94)
        at org.xhtmlrenderer.render.AbstractOutputDevice.getBackgroundImage(AbstractOutputDevice.java:138)
        at org.xhtmlrenderer.render.AbstractOutputDevice.paintBackground(AbstractOutputDevice.java:157)
        at org.xhtmlrenderer.render.Box.paintBackground(Box.java:476)
        at org.xhtmlrenderer.layout.Layer.paintBackgroundsAndBorders(Layer.java:216)
        at org.xhtmlrenderer.layout.Layer.paint(Layer.java:271)
        at org.xhtmlrenderer.layout.Layer.paint(Layer.java:236)
        at org.xhtmlrenderer.swing.BasicPanel.executeRenderThread(BasicPanel.java:193)
        at org.xhtmlrenderer.swing.BasicPanel.paintComponent(BasicPanel.java:173)
        at javax.swing.JComponent.paint(JComponent.java:1006)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JViewport.paint(JViewport.java:728)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at org.netbeans.core.windows.view.ui.MultiSplitPane.paint(MultiSplitPane.java:294)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at org.netbeans.core.windows.view.ui.MultiSplitPane.paint(MultiSplitPane.java:294)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at org.netbeans.core.windows.view.ui.MultiSplitPane.paint(MultiSplitPane.java:294)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paint(JComponent.java:1015)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
        at javax.swing.JComponent.paintChildren(JComponent.java:843)
        at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4979)
        at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4925)
        at javax.swing.JComponent.paint(JComponent.java:996)
        at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
        at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
        at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
        at java.awt.Container.paint(Container.java:1709)
        at org.netbeans.core.windows.view.ui.MainWindow.paint(MainWindow.java:510)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
        at sun.awt.X11.XRepaintArea.paintComponent(XRepaintArea.java:56)
        at sun.awt.RepaintArea.paint(RepaintArea.java:224)
        at sun.awt.X11.XComponentPeer.handleEvent(XComponentPeer.java:645)
        at java.awt.Component.dispatchEventImpl(Component.java:4044)
        at java.awt.Container.dispatchEventImpl(Container.java:2024)
        at java.awt.Window.dispatchEventImpl(Window.java:1778)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 7 Marek Fukala 2007-10-12 18:59:45 UTC
reproducible. I need to disable the logging from within the FS code to prevent the exceptions being logged on >INFO level.
Comment 8 Marek Fukala 2007-11-01 23:35:51 UTC
Basically the same problem as described in issue #116641 - preview update should not block IDE. Petr Hejl evaluated the
issue and didn't find any simple and safe way how to fix it. We are not going to fix it in 6.0.
Comment 9 Marek Fukala 2008-02-25 16:50:59 UTC
The exception is caught now and logged at the INFO level with some explanation:

INFO [org.netbeans.modules.css.visual.ui.preview.CssPreviewPanel]: It seems there is a bug in FlyinSaucer XHTML renderer.
java.lang.NullPointerException
        at org.xhtmlrenderer.swing.AWTFSImage$OldAWTFSImage.getWidth(AWTFSImage.java:49)
...

this is the FlyingSaucer issue, handled properly on nb side. Downgrading to P4 so we can track the problem.
Comment 10 Quality Engineering 2009-12-21 05:52:29 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team