There is nothing between "calling generatemap()" and "GenerateMap() begin" except the function call, and the latter message does not appear in the log, so it hangs right there.
By the way the problems appeared when I wrote a new mapgen (the old one was too complex for me, so I decided to make a simpler one) and moved it to a separate file. It still doesn't work if I have it all in the same file though.