我正在远程 linux 服务器上编译一个程序。程序编译。但是,当我运行它时,程序突然结束。所以我使用 DDT 调试了程序。它吐出以下错误:
Process 0:
Memory error detected in ClassName::function (filename.cpp:6462).
Thread 1 attempted to dereference a null pointer or execute an SSE instruction with an
incorrectly aligned memory address (the latter may sometimes occur spuriously if guard
pages are enabled)
Tip: Use the stack list and the local variables to explore your program's current
state and identify the source of the error.
谁能告诉我这个错误到底是什么意思?
程序停止的行如下所示:
SumUtility = ParaEst[0] + hhincome * ParaEst[71] + IsBlack * ParaEst[61] + IsBachAss * (ParaEst[55]);
这是在一个开关盒内。
这些是变量类型
vector<double> ParaEst;
double hhincome;
int IsBlack, Is BachAss;
谢谢您的帮助!