Screen goes dark and phone goes unresponsive whenever I make/receive a call I changed the SIM card on my Samsung Galaxy Ace to another one. Now, whenever I make/receive a call, the screen goes dark and the phone goes unresponsive. 

Pressing buttons randomly eventually sets the phone free, but this takes a long time (a few minutes).

I have a rooted Samsung Galaxy Ace running Android 2.3.4 and a stock ROM, and the CPU speed is limited using SetCPU: can this be the cause of the problem? 

The problem on this question is similar: Screen goes off as soon I dial or receive a call. CyanogenMod 7.1- stable
Disabling the proximity sensor seems to have worked: after some testing, I got no freezes at all.