You wrote that you are using a custom master page as well as v4.master. Please switch to using an unmodified version of v4.master and trying again. If the error persists do the following to identify where the error is coming from:
- In Internet Explorer(IE), press F12 to open the developer tool
- Go the error line
Report back your results.
Co-Author, Beginning SharePoint Designer 2010