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 228101 - HTML Image tag with base64 src results in IllegalStateException and Editor Failure
Summary: HTML Image tag with base64 src results in IllegalStateException and Editor Fa...
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.3
Hardware: All Mac OS X
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 225216 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-29 20:07 UTC by jyeary
Modified: 2013-05-02 10:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
HTML5 Project with Base64 Images (107.09 KB, application/zip)
2013-03-29 20:07 UTC, jyeary
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jyeary 2013-03-29 20:07:56 UTC
Created attachment 133223 [details]
HTML5 Project with Base64 Images

An HTML/XHTML page which contains base64 encoded images causes the editor to fail with an IllegalStateException and the editor becomes unusable. This has to do with the size of the image. I have attached a project with the issue. If you uncomment the second image file the editor will fail. If you deploy the application, it will display the images.

Exception:


java.lang.IllegalStateException
	at org.netbeans.modules.html.editor.lib.ElementsParser.tag(ElementsParser.java:240)
	at org.netbeans.modules.html.editor.lib.ElementsParser.tag(ElementsParser.java:180)
	at org.netbeans.modules.html.editor.lib.ElementsParser.processNextToken(ElementsParser.java:449)
	at org.netbeans.modules.html.editor.lib.ElementsParser.findNextElement(ElementsParser.java:343)
	at org.netbeans.modules.html.editor.lib.ElementsParser.hasNext(ElementsParser.java:125)
	at org.netbeans.modules.html.editor.lib.ElementsParserCache$CacheBlockContent.<init>(ElementsParserCache.java:212)
	at org.netbeans.modules.html.editor.lib.ElementsParserCache$CacheBlockContent.<init>(ElementsParserCache.java:203)
	at org.netbeans.modules.html.editor.lib.ElementsParserCache$CacheBlock.<init>(ElementsParserCache.java:143)
	at org.netbeans.modules.html.editor.lib.ElementsParserCache$CacheBlock.<init>(ElementsParserCache.java:124)
	at org.netbeans.modules.html.editor.lib.ElementsParserCache$1.getCacheBlock(ElementsParserCache.java:106)
	at org.netbeans.modules.html.editor.lib.ElementsParserCache$1.hasNext(ElementsParserCache.java:84)
	at org.netbeans.modules.html.editor.lib.api.SyntaxAnalyzerResult.getDoctypeDeclaration(SyntaxAnalyzerResult.java:509)
	at org.netbeans.modules.html.editor.lib.api.SyntaxAnalyzerResult.detectHtmlVersion(SyntaxAnalyzerResult.java:171)
	at org.netbeans.modules.html.editor.lib.api.SyntaxAnalyzerResult.getDetectedHtmlVersion(SyntaxAnalyzerResult.java:159)
	at org.netbeans.modules.html.editor.lib.api.SyntaxAnalyzerResult.getHtmlVersion(SyntaxAnalyzerResult.java:133)
	at org.netbeans.modules.html.editor.lib.api.SyntaxAnalyzerResult.doParseHtml(SyntaxAnalyzerResult.java:216)
	at org.netbeans.modules.html.editor.lib.api.SyntaxAnalyzerResult.parseHtml(SyntaxAnalyzerResult.java:195)
	at org.netbeans.modules.html.editor.api.gsf.HtmlParserResult.root(HtmlParserResult.java:137)
	at org.netbeans.modules.html.editor.api.gsf.HtmlParserResult.findBySemanticRange(HtmlParserResult.java:192)
	at org.netbeans.modules.html.editor.HtmlElementProperties.runInEDT(HtmlElementProperties.java:162)
	at org.netbeans.modules.html.editor.HtmlElementProperties.access$000(HtmlElementProperties.java:96)
	at org.netbeans.modules.html.editor.HtmlElementProperties$1.run(HtmlElementProperties.java:137)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:688)
	at java.awt.EventQueue$3.run(EventQueue.java:686)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Comment 1 Marek Fukala 2013-04-22 11:40:07 UTC
Does happen in a specific case, workaround exists => p2. I'll address it ASAP.
Comment 2 Marek Fukala 2013-04-22 12:54:41 UTC
fixed in web-main#2ead3c56831e
Comment 3 Quality Engineering 2013-04-23 02:11:39 UTC
Integrated into 'main-golden', will be available in build *201304222301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2ead3c56831e
User: Marek Fukala <mfukala@netbeans.org>
Log: #228101 - HTML Image tag with base64 src results in IllegalStateException and Editor Failure
Comment 4 Marek Fukala 2013-05-02 10:13:13 UTC
*** Bug 225216 has been marked as a duplicate of this bug. ***