WilsonBlr
Aerospace
- Jun 11, 2014
- 19
Visual Studio 2010 behaves in a weird manner.
I have a function to extract control points from a surface in which i use UF_MODL_ask_bsurf(). Sometimes VS executes past the code line and prints the control points on console. Some other times it stops at UF_MODL_ask_bsurf(). I cant figure out why? Anybody had this problem before ?
The function was running properly till yesterday. Now I see that it is crashing at UF_MODL_ask_bsurf() again. Is there something with the environment that needs to be set to get this working properly? .
This is an external NX application.
This is the error
====================================================
Failed to handle error condition correctly - exiting
General Fault Exception
====================================================
====================
Fatal error detected
====================
Below is the full code.
Code:
vector<MyPoints> MyLibrary::getNURBSSurfaceControlPoints(int surfTag)
{
double *ptr;
cout<< "In sub function : " << endl;
UF_MODL_bsurface_p_t t_struc_info;
UF_CALL(UF_MODL_ask_bsurf(surfTag, t_struc_info));
cout<< " ---- output ---- " << endl;
cout << " Is rational ?? : " << t_struc_info->is_rational << endl;
cout << " Num poles u : " << t_struc_info->num_poles_u << endl;
cout << " Num poles v : " << t_struc_info->num_poles_v << endl;
cout << " Order u : " << t_struc_info->order_u << endl;
cout << " Order v : " << t_struc_info->order_v << endl;
int d_num_poles_u = t_struc_info->num_poles_u;
int d_num_poles_v = t_struc_info->num_poles_v;
int d_order_u = t_struc_info->order_u;
int d_order_v = t_struc_info->order_v;
cout.flush();
cout << d_num_poles_u << " " << d_num_poles_v << endl;
double (*Values)[4] = t_struc_info->poles;
double* Xvalues;
double* Yvalues;
double* Zvalues;
double* Wvalues;
Xvalues = t_struc_info->poles[0];
Yvalues = t_struc_info->poles[1];
Zvalues = t_struc_info->poles[2];
Wvalues = t_struc_info->poles[3];
vector<MyPoints> PolesArray;
for (int i = 0; i<d_num_poles_u*d_num_poles_v; i++)
{
//cout <<"Point No: "<<i <<" ";
//cout << "X: " << Values[i][0] << " " ;
//cout << "Y: " << Values[i][1] << " " ;
//cout << "Z: " << Values[i][2] << " " ;
//cout << "W: " << Values[i][3] << " "<<endl ;
MyPoints Pt;
Pt.X = Values[i][0];
Pt.Y = Values[i][1];
Pt.Z = Values[i][2];
PolesArray.push_back(Pt);
}
return PolesArray;
}