Where is the source file ?

Feb 27, 2009 at 7:14pm
I need help on this. I get an assertion failure while debugging which refers me to
"f:\dd\vctools\crt_bld\self_x86\crt\src\fprintf.c
Line:55
Expression:(str!=NULL)"
.

But I don't have this path on my PC. At the same time, math.h has been invoked and the 490-th line is highlighted as following:

1
2
489 inline double __CRTDECL pow(_In_ double _X, _In_ int _Y)
490        {return (_Pow_int(_X, _Y)); }


I have no idea what is happening. How can I locate the error? Thanks!
Feb 27, 2009 at 7:43pm
There's a problem in your own code that is triggering an error deeper in the call stack. Probably a call to printf() or fprintf(). Why don't you post your code and we'll tell you what we find?
Feb 28, 2009 at 11:03am
Hi, helios, I can't post the whole code because it is way too long. Here comes the part of the code which causes the problem:
1
2
3
fprintf(f_out_parms,"%15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %6i %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f %15.6f\n",
	    				  mu[i],kappa[i],theta[i],sigmav[i],rho[i],eta_v[i],muy[i],sigmay[i],lambda[i],eta_y[i],eta_lambda[i],muv[i],rhoj[i],kappa_q[i],theta_q[i],muy_q[i],lambda_q[i],
acceptparablock[i],precision_o[0][i], precision_o[1][i],precision_o[2][i],precision_o[3][i],rho_o[0][i],rho_o[1][i],rho_o[2][i],rho_o[3][i]);

All variables are double arrays except for acceptparablock[] which is an integer array. precision_o[][] and rho_o[][] are 2-dimensional arrays and they are good. i is the iterating index. This part must be the trouble maker because if I suppress it, no assertion failure happens but I don't get my result either.
Last edited on Feb 28, 2009 at 11:16am
Mar 1, 2009 at 3:08pm
If I know the new path of "f:\dd\vctools\crt_bld\self_x86\crt\src\fprintf.c
Line:55"
on my PC, I may be able to solve the problem. By the way, I am running a MSVC++ 2008 Express with SP1 on Vista. During the installation, I was not prompted to change path for any library. In the folder where MSVC++ is installed, I can't find any fprintf.c or printf.c. Any suggestion is welcome!
Mar 2, 2009 at 8:29am
Would someone pick up on this one? Every idea is welcome.
Mar 2, 2009 at 9:37am
closed account (z05DSL3A)
As Helios said, the problem is caused by your code.

The assertion failure is it the library code, "f:\dd\vctools\crt_bld\self_x86\crt\src\fprintf.c Line:55" is not on your computer so you will not find it.

I'm not familiar with the capabilities/restriction of VC Express but once your program asserts you should be able to view the call stack, this should show the part of your code that is calling the function and you can inspect the data being passed in.
Topic archived. No new replies allowed.