Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access violation error 1

Status
Not open for further replies.

tazforcenz

IS-IT--Management
Feb 28, 2002
7
0
0
NZ
I get an access violation error (full error below) when exiting the application.

Project BRM.exe raised exception class EAccessViolation with message 'Access violation at address 005F6F88. Read of address 0193FFDC'. Process stopped. Use Step or Run to continue.

This error only appears when I unselect 2 settings in the Project Options screen. I unselect 'Use dynamic RTL' and also unselect 'Build with runtime packages' so the client can use the application without the need for C++ Builder. When I select those 2 settings then the error doesn't appear when I exit the application.

Language: C++ Builder 6
Builder add-on: TeeChart Pro v5 VCL
OS: Windows 98 SE

Any help will be greatly appreciated. Thanks.

 
Display your code for the OnCreate, OnShow, OnClose, and OnDestroy for the main form. There may be something peculiar.

Chris
 
There are only three events in the main form. No code in OnClose, OnDestroy. In FormShow the code rearranges the main screen buttons and also loads a different background imaged based on the screen resolution of the user.

*********************

void __fastcall TSDIAppForm::FormCreate(TObject *Sender)
{
LoginTimes = 0;
}


void __fastcall TSDIAppForm::FormActivate(TObject *Sender)
{
SetFileMenu(User.GetRoleID());
}


void __fastcall TSDIAppForm::FormShow(TObject *Sender)
{
SplashForm->ShowModal();
int bottom;
TPoint p1,p2;
if (Screen->Height > 684)
{
p1.y = Screen->Height*438/768;
p2.y = Screen->Height*630/768;
}
else
{
p1.y = Screen->Height*324/600;
p2.y = Screen->Height*472/600;
}
bottom = Screen->Width/4;
imImport->Width = bottom-20;
imImport->Left = 10;
imPlanner->Left = bottom+10;
imProfile->Left = 2*bottom+10;
imExit->Left = 3*bottom+10;
bottom = p1.y+(p2.y-p1.y)/2;
imImport->Top = bottom-imImport->Height/2;
imPlanner->Top = imImport->Top;
imProfile->Top = imImport->Top;
imExit->Top = imImport->Top;
imPlanner->Width = imImport->Width;
imProfile->Width = imImport->Width;
imExit->Width = imImport->Width;
lblImport->SetBounds(imImport->Left,imImport->Top,imImport->Width-4,imImport->Height-4);
lblPlanner->SetBounds(imPlanner->Left,imPlanner->Top,imPlanner->Width-4,imPlanner->Height-4);
lblProfile->SetBounds(imProfile->Left,imProfile->Top,imProfile->Width-4,imProfile->Height-4);
lblExit->SetBounds(imExit->Left,imExit->Top,imExit->Width-4,imExit->Height-4);
}

 
I don't know what to tell you. Does it do it everytime you close? Even if you just opened the program and shut it down? I would suggest, if you haven't already, to create an OnClose handler for the form, then add some useless code (int x=1;) and put a breakpoint. See if it crashes before or after that. If it doesn't, just use F7 until it does. You might be able to see in the CPU window the last function it was running when it halted. But most the time, it's not going to help. Try deleting all your object files too...though that's cliche... I don't know! Another Borland bug perhaps.

Chris
 
Chris, the error does appear everytime I close. I then tried, on the Project Options screen, to select 'Use dynamic RTL' and kept unselected the 'Build with runtime packages' option. The application now doesn't have the error.

I will still try your suggestions and see how it goes. Just want to be sure. Thanks for you help.

Terry
 
Have you deleted all the precompiled headers, debug files, incremental link files, and object files and done a full build?
Sometimes when things get a little wonky, this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top