|
모든 함수를 다 수행하고 access violation이 일어 납니다.
void __fastcall TfrmData::pListDblClick(TObject *Sender)
{
if (pList->ItemIndex < 0)
return;
FILE* fp = fopen("VP.txt","w");
fclose(fp);
char target[50];
memset(target,NULL,sizeof(target));
strcpy(target, pList->Items->Strings[pList->ItemIndex].c_str());
tempfunction(target);
resMemo->Lines->Clear();
resMemo->Lines->LoadFromFile("KorSen.rst");
textout->Lines->LoadFromFile("VP.txt");
debugMemo->Lines->LoadFromFile("DM.txt");
} ------ 1.
listbox에서 한 item을 click하면 실행되는 함수인데,
1번 line을 넘어 가지 못하고 access violation이 일어나거든요.
view CPU해서 따라 가보면, mouseclick과 관련된 부분에서 violation이 나는 것으로 확인이 되는데,아무래도 이해할수가 없어서요.
아마도 tempfunction 내에서의 어떤 오류가 여기에 영향을 끼치지 않았나 싶은데..
어떤경우에 이런 문제가 발생할 수 있나요?
|