Forgetting the double-push. When you pop from the heap, you must push the current element again to maintain slope counts. Without this, your function breaks.
Using the wrong heap type. Non-decreasing arrays need max-heap. Non-increasing arrays need min-heap. The heap type determines which slope-change points you track.
Assuming convexity without checking. Slope Trick only works for convex functions. If your cost function isn't convex, the heap approach fails.