Bug 333860 NullPointerException in DocumentExtension using RunTask
Build Identifier: v20100915-1750 We are faced with a problem running one of our reports in our custom report viewer. Running the report using RunTask results in a NullPointerException. This error seems to be very rare but is always reproducible with the report. The root cause of the problem is DocumentExtension.add (line 117, 'latest' is null). RunAndRenderTask in contrast is working fine. Applies to Birt 2.6.1 Reproducible: Always Steps to Reproduce: 1. Run the report using RunTask
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/internal/document/DocumentExtension.java
{
	long index = -1;
	long parent = -1;
	long firstChild = -1;
	long lastChild = -1;
	long previous = -1;
	long next = -1;
	/**
	 * the content unique id.
	 */
	long contentId = -1;
	long firstChildId;
	long lastChildId;
	ExtensionSegment head = null;
	ExtensionSegment latest = null;
	public DocumentExtension( long index )
	{
		this.index = index;
	}
	public long getIndex( )
	{
		return index;
	}
	public void setIndex( long index )
	{
		this.index = index;
	}
	public long getFirstChild( )
	{
		return firstChild;