matplotlib/matplotlib — pull request #1999 by mdboom (2013-05-13 21:46:49+00:00)
Title: Setting dashes to (0,0) results in infinite loop for agg backends

Other backends may also be affected. I have not tested exhaustively.

It would be good to check in GraphicsContextBase.set_dashes that dash_list is not all 0's. Some backends (cairo and gdk) override set_dashes, so those may need to be modified as well.