You also have to make sure the heightmap image is a png image with 1 layer ONLY. If something doesn't match what the game requires it will most of the time crash.
If you know you've done this above correctly, you can always convert the .png image you have into a .bmp, and then open the .bmp image just to save it to a .png again. This can solve problems at times.
If nothing of that helps you can probably check the tutorial section here on the boards, people make tuts on how to do these things very exact.
I'm not sure what your mask problem can be thu, but try to get the heightmap to work first. It's a good start.