Board index » delphi » Re: Exception EAccessViolation in module at 00000000 -- Help

Re: Exception EAccessViolation in module at 00000000 -- Help


2003-10-07 04:45:42 PM
delphi159
Quote
I just went through a process of removing each glyph from each
button, one at a
time, then running the app after each removal. I removed all the
glyphs, and the
error was still there. I started removing buttons. After I removed
the second
button, it ran and exited fine. Keep in mind there is NO CODE
attached to these
buttons. They are standard TSpeedButtons on a TPanel on an the
mainform of an
MDI app. <aaarrrggg!>
Hi,
By adding/removing components you are changing the memory layout of
your
application. Certain configurations happen to highlight a bug
elsewhere in your
code which is overwriting a memory address. Somewhere in your code you
have an unitialised or destroyed object that is still being accessed
thus
overwriting memory which does not belong to it, or something else like
that.
This has happened to me as well.
What I'd suggest is to comment out huge chunks of your code
(remove
entire forms if you can) to try and narrow down where the bug is
originating
from.
It takes ages.
Good luck.
Cheers,
Chris
 
 

Re: Exception EAccessViolation in module at 00000000 -- Help

I was working on this until 1:30am this morning.
I narrowed it down, but still the error makes no sense. I have been trying to
track this for days now. The error is raised in the Destroy method of the main
form. Specifically in the "DoneApplication" method where it calls
DestroyComponents which then calls the form's Destroy method. The actual culprit
seems to be "GlobalNameSpace.EndWrite" (in SysUtils). that is where it seems to
blow.
I finally decided to suppress it, at least until I can find out what in the world
is causing it. I overrode the destroy method of the mainform, and placed a
try/except around it. At least now the error is suppressed when the app runs
outside the of the IDE, and the error doesn't interrupt the rest of the
finalization code the app needs to execute.
I don't use "AddExitProc" anywhere. For some reason I can not set a break point
anywhere in sysutils. When I
add the path $(DELPHI)\source\rtl\Sys and try to compile, it dies at {$L
FFMT.OBJ} and says it can not find the file. I searched for it, but I don't have
it anywhere.
I really appreciate everyone's help with this. This bug is killing me.
Here's the madExcept stack:
main thread ($3f0):
00000000 ???
0045945f TruckMgt.exe Controls 6628 TWinControl.WMNCDestroy
00454f7d TruckMgt.exe Controls 4227 TControl.WndProc
00457ac6 TruckMgt.exe Controls 5731 TWinControl.WndProc
00437ded TruckMgt.exe Classes 7499 TComponent.Destroy
004530e4 TruckMgt.exe Controls 2935 TControl.Destroy
00456117 TruckMgt.exe Controls 4900 TWinControl.Destroy
0048f7c4 TruckMgt.exe ComCtrls 12009 TCustomListView.Destroy
0049c3f5 TruckMgt.exe dcOutBar 1606 TCustomDCListViewEx.Destroy
0049cb8c TruckMgt.exe dcOutBar 1882 TDCVertListView.Destroy
004560e7 TruckMgt.exe Controls 4895 TWinControl.Destroy
0045bb55 TruckMgt.exe Controls 8192 TCustomControl.Destroy
0049fd76 TruckMgt.exe dcOutBar 3933 TDCOutBarGroup.Destroy
004038ac TruckMgt.exe System 3530 TObject.Free
004a04f0 TruckMgt.exe dcOutBar 4292 TCustomDCGroupBar.Destroy
004a2401 TruckMgt.exe dcOutBar 5425 TDCOutBar.Destroy
004560e7 TruckMgt.exe Controls 4895 TWinControl.Destroy
0045bb55 TruckMgt.exe Controls 8192 TCustomControl.Destroy
004aa21a TruckMgt.exe dcOutPanel 4005 TCustomDCSplitterPanel.Destroy
004560e7 TruckMgt.exe Controls 4895 TWinControl.Destroy
0046b0b4 TruckMgt.exe Forms 2065 TScrollingWinControl.Destroy
0046bd63 TruckMgt.exe Forms 2622 TCustomForm.Destroy
006aaaa2 TruckMgt.exe TruckMain 180 TfrmMain.Destroy
0043800a TruckMgt.exe Classes 7599 TComponent.DestroyComponents
00469e07 TruckMgt.exe Forms 1256 DoneApplication
004258ff TruckMgt.exe SysUtils 2242 DoExitProc
0040454b TruckMgt.exe System 5488 @Halt0
Regards,
-Steve-
 

Re: Exception EAccessViolation in module at 00000000 -- Help

I'm still not sure exactly where the problem was, but I pulled out the Dream
Outbar component since that appeared to be the culprit, and replaced it with the
Dev Express TdxSideBar. It seems like something the Dream Outbar is doing is not
compatible with the Express components. I have been using the Dream components for
well over a year without any problems. So this is still a mystery to me. But
either way, it looks like it is solved, no more errors.
Thanks everyone for all your help! And a special thanks to madshi for the use of
madExcept!
-Steve-
 

Re: Exception EAccessViolation in module at 00000000 -- Help

Quote
For some reason I can not set a break point anywhere in sysutils.
That works only if you compile your project with Debug DCUs (compiler
settings). I think this option was introduced with D5 or D6.
--
www.madshi.net
quality low level Delphi components
extended exception handling
API hooking, DLL injection
undocumented functionality
 

Re: Exception EAccessViolation in module at 00000000 -- Help

This is a shot in the dark but would you have created a manifest file for
your app at all?
I had similar problems that were being caused by the manifest file using the
newer common controls library. Deleting the manifest file solved it....
Just a thought...
Richard
"Steve" <XXXX@XXXXX.COM>writes
Quote
Sorry, but this is getting stranger by the minute.

I just went through a process of removing each glyph from each button, one
at a
time, then running the app after each removal. I removed all the glyphs,
and the
error was still there. I started removing buttons. After I removed the
second
button, it ran and exited fine. Keep in mind there is NO CODE attached to
these
buttons. They are standard TSpeedButtons on a TPanel on an the mainform
of an
MDI app. <aaarrrggg!>

-Steve-