Titanium JIRA Archive
Alloy (ALOY)

[ALOY-309] Specific markup error causes the compiler to hang

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2012-10-01T17:47:04.000+0000
Affected Version/s2012 Sprint 20
Fix Version/s2012 Sprint 20, Release 3.0.0
ComponentsXML
Labelsn/a
ReporterBenjamin Hatfield
AssigneeUnknown
Created2012-09-28T20:56:31.000+0000
Updated2018-03-07T22:26:06.000+0000

Description

Came across this randomly while testing out Alloy debugging... REPRODUCTION: Generate a new default Alloy project and edit index.xml. Remove the very last quotation mark, then try to compile it (with the CLI, though it fails with Studio too).
<Alloy>
	<Window class="container">
		<Label id="label" onClick="doClick>Hello, World</Label>
	</Window>
</Alloy>
RESULTS: Compilation process hangs here:
[INFO] ----- MVC GENERATION -----
[INFO] [index.xml] view processing...
[INFO]   style:      "index.tss"
[INFO]   view:       "index.xml"
OTHER INFO: Removing any other quotation mark will generate an error from the CLI.

Comments

  1. Tony Lukasavage 2012-10-01

    Well, this might explain why its just hanging. Notice the commented "reportError", ugh...
       if(s === 4){//equal
       	start = p+1;
       	p = source.indexOf(c,start)
       	if(p>0){
       		value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
       		el[index++] = {qName:attrName,value:value}
       		s = 6;
       	}else{
       		//reportError
       	}
       }else{
       	//reportError
       }
       
  2. Tony Lukasavage 2012-10-01

    Deciding to fork xmldom and use the latest error handling in it. All further work will be captured in ALOY-267.

JSON Source