Note: This website is archived. For up-to-date information about D projects and development, please visit

Ticket #31 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

parser.teqXML(521): Array index out of bounds

Reported by: od Assigned to:
Priority: major Milestone:
Component: Other Version:
Keywords: Cc:



module checkteq;

int main(char[][] args) 
	char[] url = ",5291,,00.xml";
	scope client = new HttpClient( HttpClient.Get, url );
	scope buffer =;
	scope (exit) client.close();
	if (client.isResponseOK) {
		scope reader  = new XMLReader!(char)( client.getResponseHeaders.getInt(HttpHeader.ContentLength, 102400) );
		scope handler = new DefaultSAXHandler!(char);
		reader.parse( buffer, handler );
	else {
		throw new Exception( url~": HttpClient client responded "~client.getResponse().toString(), __FILE__, __LINE__ );

	return 0;

using current (10.02.2008) mango trunk produces:

tango.core.Exception.ArrayBoundsException@mango.xml.sax.parser.teqXML(521): Array index out of bounds

System: Linux debian 2.6.22-3-amd64 #1 SMP Sun Nov 4 18:18:09 UTC 2007 x86_64 GNU/Linux

Compiler: Digital Mars D Compiler v1.025

Tango: Not completely sure but at least 0.99.4 or some trunk from 13.01.2008

Change History

02/10/08 20:41:09 changed by teqdruid

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in r1054. Looks like I wasn't handling numeric character references nor checking to make sure entity names existed. Both fixed now.