I have a curve on a sphere and I'm trying to get a dashed line to follow the curve. I want distortion, so I used a nurbs path, scaled the nurbs path, added an array modifier to it, then a curve modifier to it. The array does indeed follow the curve, but not entirely, At a certain spot, it shoots off into the distance and I don't know how to fix it.
Your curve is separated in different parts. In this image, the selection shown in orange is one connected piece, this is the one the dashed line is following (and which ends where the dashed line continues straight on since it has no more curve to follow):
And then you have three separate pieces, the selected 2-vertices-piece in the front of this image, the longer selected piece in the back, and the unselected rest to the left, and the end vertices are overlapping each other:
Here I've taken the four parts of your curve apart to show them better:
If you delete overlapping vertices, then select two separate adjacent vertices and press F to join them, you will get a fully connected curve which shows the expected result (just make sure you get all separate pieces, otherwise the result might look better but still have some problems because the dashed line might "decide" to just follow the short piece):