There are some numerical instabilities in my code. Theoretically the integrator I'm using (the RK4 [0]) should be a lot more accurate than the Euler's method that OP is using, but I probably have a poor choice of parameters and/or a bug somewhere.
In any case, when you max out the first scrollbar, then m_1/M_1 approaches zero. Then the denominators of the Lagrange equation will be close to zero when \theta_1 is close to \theta_2. Thus things become unstable.
Anyway, a symplectic integrator [1] would be more suitable for this problem, since it has the beautiful property of conserving energy.
I agree with the parent, I think you must have a bug somewhere. For many positions of the sliders the movement seems very erratic, the pendulums suddenly bounce back or accelerate without any apparent reason. Especially when you start moving the top slider to the right (though not necessarily all the way to the right).
Or maybe I just don't understand how double pendulums work...