as beso says, probably hot water inlet valve gone faulty.
If it has then the machine will not fill with cold water and heat it as it will be trying to take water in from the hot pipe and won't get any, so it will just sit there doing nothing.
it's fairly easy to check if it is the inlet valve, first thing to do would be pull the machine out, turn the hot water tap off where the pipe to the machine connects, then turn the tap on and see if water comes out the pipe. if it does then it's not the supply.
The next step requires a electrical meter, take the top of the machine set it on a hot program and test to see if there is power going to the valve, if there is power to the valve but it's not letting water in then the valve is faulty (WARNING! it is mains voltage on the valve so be very careful, if you are not sure or do not have the correct equipment to test it do not do this yourself!)
Just to address your last point of "b) it's expensive to heat cold water with electric instead of using gas-heated water"
This is not true. it's cheaper and more efficient to heat the water in the machine, that is why all new machines are cold fill only.