QB64 adds extra one line at the end of the file and this line just contain CRLF. Due to this, EOF(1) still give 0. Now, since EOF(1) is still false or 0,
input #1,.... is again executed but there are no data due to which "input past end of file" occur.