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 7.0 M2 (Build 201010151251) VM: Java HotSpot(TM) 64-Bit Server VM, 16.3-b01-279, Java(TM) SE Runtime Environment, 1.6.0_20-b02-279-10M3065 OS: Mac OS X User Comments: mpapis: finding next ocurences of word 'webkit' in 'jqtouch' library (https://github.com/senchalabs/jQTouch) path: themes/apple/img/theme.css GUEST: I was setting up a CSS file.... when the problem ocurred. GUEST: alt-enter in css file on line: opacity: 0.35; Stacktrace: java.net.MalformedURLException at java.net.URL.<init>(URL.java:601) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at org.xhtmlrenderer.swing.NaiveUserAgent.resolveAndOpenStream(NaiveUserAgent.java:121) at org.xhtmlrenderer.swing.NaiveUserAgent.getImageResource(NaiveUserAgent.java:158) at org.xhtmlrenderer.render.AbstractOutputDevice.getBackgroundImage(AbstractOutputDevice.java:153)
Created attachment 102802 [details] stacktrace
The potential exception won't popup anymore even though it might still happen if the URL is invalid. It will be just logged then. However! I realized when testing the scenario with the background image using the dataURI: background: url'(data:image/png;base64,iVBO... that the EDT is running endlessly following code and the IDE needs to be killed. It looks like it may be the flyingsaucer8 issue: "AWT-EventQueue-1" prio=6 tid=0000000051077000 nid=0xb40ce000 runnable [00000000b40cc000] java.lang.Thread.State: RUNNABLE at apple.awt.CRenderer.doImage(Native Method) at apple.awt.OSXSurfaceData.blitImage(OSXSurfaceData.java:1428) - locked <0000000006340ef8> (a java.lang.Object) - locked <000000000b341730> (a java.lang.Object) at apple.awt.CRenderer.blitImage(CRenderer.java:685) at apple.awt.CRenderer.copyImage(CRenderer.java:701) at apple.awt.CRenderer.copyImage(CRenderer.java:785) at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3261) at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3246) at org.xhtmlrenderer.swing.Java2DOutputDevice.drawImage(Java2DOutputDevice.java:271) at org.xhtmlrenderer.render.AbstractOutputDevice.paintTiles(AbstractOutputDevice.java:300) at org.xhtmlrenderer.render.AbstractOutputDevice.paintBackground0(AbstractOutputDevice.java:245) at org.xhtmlrenderer.render.AbstractOutputDevice.paintBackground(AbstractOutputDevice.java:191) at org.xhtmlrenderer.render.Box.paintBackground(Box.java:436) at org.xhtmlrenderer.render.InlineLayoutBox.paintInline(InlineLayoutBox.java:255) at org.xhtmlrenderer.layout.Layer.paintInlineContent(Layer.java:274) at org.xhtmlrenderer.layout.Layer.paint(Layer.java:332) at org.xhtmlrenderer.swing.BasicPanel.doRender(BasicPanel.java:163) at org.xhtmlrenderer.swing.BasicPanel.paintComponent(BasicPanel.java:148) at org.netbeans.modules.css.visual.ui.preview.CssPreviewPanel$PatchedXHTMLPanel.paintComponent(CssPreviewPanel.java:259) at javax.swing.JComponent.paint(JComponent.java:1029)
Hmm, it's a bug in FS resp. in AbstractOutputDevice.paintTiles() where: private void paintTiles(FSImage image, int left, int top, int right, int bottom) { int width = image.getWidth(); int height = image.getHeight(); for (int x = left; x < right; x+= width) { for (int y = top; y < bottom; y+= height) { drawImage(image, x, y); } } } will run endlessly when width || height == 0 which is the case here. The real cause might be the bad image decoding so the width or height are incorrect. In any case the renderer should assert >= 0;
the issue may cause dataloss
fortunately there has been a way how to workaround on netbeans side using UserAgent.getImageResource() so I do not need to patch the FS sources. web-main#dd58bae88e86 I've tried to file an issue to the FS itself (https://xhtmlrenderer.dev.java.net) , but since the project is locked I'm not allowed to even file new issues.
Integrated into 'main-golden', will be available in build *201012180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/dd58bae88e86 User: Marek Fukala <mfukala@netbeans.org> Log: #191644 - endless image drawing