It is crashing when you try to draw near the top edge, or bottom edge (EDIT: with water or acid). The fix is very simple, although adds some extra calculations..
--- particle.c (revision 9)
+++ particle.c (working copy)
@@ -22,11 +22,12 @@
#define PARTICLECANVAS_WIDTH...