I ran into the same problem here. There were "nan" values inserted in the .asc file by QGIS. In my case, i solved it by substituting "nan" by 0 in a text editor.