Maybe it's atof() that fails? You're getting an assertion - you might want to check, where exactly it occurs by running your app under a debugger and displaying the strack trace when it asserts.