                     
                     // Try again by truncating at the beginning of the 
                     // preceding atom.
+                    var oldCharPosition:int = truncateAtCharPosition;
                     truncateAtCharPosition = getNextTruncationPosition(
-                    	truncLineIndex, truncateAtCharPosition);                         
+                    	Math.min(truncLineIndex, textLines.length - 1), truncateAtCharPosition);  
+                    // check to see if we've run out of chars
+                    if (oldCharPosition == truncateAtCharPosition)
+                        break;
                 }
                 while (true);
             }

        setIsTruncated(true);
    }
        
    /** 
	 *  @private
     *  Calculates the last line that fits in the given height and line count 

        			
		// For truncation, need to know if all lines have been composed.
        var createdAllLines:Boolean = false;
        // sometimes we need to create an extra line in order to compute
        // truncation
        var extraLine:Boolean;
        
		// Generate TextLines, stopping when we run out of text
		// or reach the bottom of the requested bounds.
