Here's a patch for the line case:

diff --git a/source/org/jfree/chart/renderer/xy/StackedXYAreaRenderer.java b/source/org/jfree/chart/renderer/xy/StackedXYAreaRenderer.java
index 0f52175..7398e6c 100644
--- a/source/org/jfree/chart/renderer/xy/StackedXYAreaRenderer.java
+++ b/source/org/jfree/chart/renderer/xy/StackedXYAreaRenderer.java
@@ -476,7 +476,9 @@ public class StackedXYAreaRenderer extends XYAreaRenderer
                     double transY0 = rangeAxis.valueToJava2D(y0 + ph0,
                             dataArea, plot.getRangeAxisEdge());

-                    if (orientation == PlotOrientation.VERTICAL) {
+                    if (Double.isNaN(y0) || nullPoint) {^M
+                        // do nothing^M
+                    } else if (orientation == PlotOrientation.VERTICAL) {^M
                         areaState.getLine().setLine(transX0, transY0, transX1,
                                 transY1);
                     }

What is the expected behaviour for areas? The area polygon has to be closed somehow …
Remark: XYAreaRenderer is also affected …