• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 51730
  • Last Modified:

Opening any application "access violation at address ... in module 'vcl70.bpl'. Write of address..."

Hi expert,

Something strange happening here. Out of the blue, it seems, "acces violation at address ... in module 'vcl70.bpl'.  Write of address..." appears whichever application I open that I am working on. The most recent change I made was add a line that called the ColorDialog from the VCL. Similar lines have been working fine for a long time in different units. The just added line also worked! However when I closed the session, the problem started. I also, less recently, replaced some directories for unused applications (backups). Putting them back did not solve it.

I noticed that vcl70.bpl is in the C:\windows\system32 directory, so that is pretty basic. Hope I do not have to re-install Delphi for I read somewhere here that de-installing can make the problem bigger... Plus, how could damage (access violation) extend thàt far from just adding a simple line.

BTW that line was:
if ColorDialog.Execute then LinkColor.Color := ColorDialog.Color;

Please help!

Thank you.
Ron dW
  • 23
  • 15
  • +1
2 Solutions
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Maybe you made some modification in a vcl that use vcl70.bpl and on IDE loading cause the exception (like a call to a nil or something else) or simplyhave installed some new bugged vcl, but with these infos it's hard to find a quick solution.
I suggest to you to use MadExcept ( http://www.madshi.net/ ) to have a full log for these exceptions and understand where it occurs....

F68 ;-)
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
--> how could damage (access violation) extend thàt far from just adding a simple line.
-->if ColorDialog.Execute then LinkColor.Color := ColorDialog.Color;

For example if ColorDialog is nil at the first call (on ide loading) calling this line gives an AV

Try changing the line to

If Assigned(ColorDialog) then
   if ColorDialog.Execute then LinkColor.Color := ColorDialog.Color;

I don't know about this LinkColor.I assume that it is your vcl so it's already assigned, but take care of this also

F68 ;-)
Ron_de_WeijzeAuthor Commented:
Thanks Ferrucio68, but I cannot even get that far, for loading the application (any one of them) doesn't even succeed. Starting Delphi 7 and opening the .dpr file (any) raises the errormessage. I am trying to apply MadExcept now but I hope it will intercept even that early.

Ron dW
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Ron_de_WeijzeAuthor Commented:
MadExcept says the error occurred in the IDE.
What should I make of the following report?

Madshi's Report:
date/time         : 2004-09-07 14:06
computer name     : TOSHIBA
user name         : Ron de Weijze
operating system  : Windows XP Service Pack 1 build 2600
system language   : English
system up time    : 1 hour 52 minutes
program up time   : 8 seconds
processor         : Mobile Intel(R) Pentium(R) 4 - M CPU 1.90GHz
physical memory   : 488/1023 MB (free/total)
free disk space   : (C:) 4.03 GB
display mode      : 1024x768, 16 bit
process id        : $734
executable        : delphi32.exe
madExcept version : 2.7c
exception class   : EAccessViolation
exception message : Access violation at address 0083ACF0 in module 'vcl70.bpl'. Write of address 00000018.

main thread ($3c0):
0083acf0 vcl70.bpl       Controls TDockTree.RemoveZone
0083ab53 vcl70.bpl       Controls TDockTree.RemoveControl
00835ffe vcl70.bpl       Controls TWinControl.CMUnDockClient
00831a98 vcl70.bpl       Controls TControl.WndProc
00834c97 vcl70.bpl       Controls TWinControl.WndProc
0084e87d vcl70.bpl       Forms    TCustomForm.WndProc
0083bc63 vcl70.bpl       Controls TDockTree.WindowProc
00d244ae borlndmm.dll    Borlndmm SysGetMem
0083bc63 vcl70.bpl       Controls TDockTree.WindowProc
00831868 vcl70.bpl       Controls TControl.Perform
00835cba vcl70.bpl       Controls TWinControl.DoUnDock
003565e2 designide70.bpl Basedock TBaseDockHostForm.DoUnDock
008314c5 vcl70.bpl       Controls TControl.ManualFloat
0083138d vcl70.bpl       Controls TControl.ManualDock
00356465 designide70.bpl Basedock DestroyDockHosts
0050896a coreide70.bpl   Desktop  TDesktopState.Load
005084cf coreide70.bpl   Desktop  TDesktopStates.LoadDesktop
00503d42 coreide70.bpl   Filehist TClosedFile.Open
00844986 vcl70.bpl       Menus    TMenuItem.Click
00845e33 vcl70.bpl       Menus    TMenu.DispatchCommand
00846d46 vcl70.bpl       Menus    TPopupList.WndProc
00834914 vcl70.bpl       Controls TWinControl.MainWndProc
00846c95 vcl70.bpl       Menus    TPopupList.MainWndProc
77d4436f user32.dll               DispatchMessageA
0085568b vcl70.bpl       Forms    TApplication.ProcessMessage
008556c2 vcl70.bpl       Forms    TApplication.HandleMessage
008558f2 vcl70.bpl       Forms    TApplication.Run

thread $e70: <priority:-1>
7ffe0304 ???                  
77f5c292 ntdll.dll            NtSetInformationThread
77e72683 kernel32.dll         SetThreadPriority
4003c32a rtl70.bpl    Classes TThread.SetPriority

thread $b48: <priority:15>
7ffe0304 ???          
77f5c522 ntdll.dll     NtWaitForMultipleObjects
77e75eda kernel32.dll  WaitForMultipleObjectsEx
77e75fa5 kernel32.dll  WaitForMultipleObjects

thread $ab8: <priority:2>
7ffe0304 ???        
77d443b0 user32.dll  GetMessageA

00320000 designide70.bpl         C:\Program Files\Borland\Delphi7\Bin
003c0000 BRCIDE.DLL         C:\Program Files\Borland\Delphi7\Bin
00400000 delphi32.exe         C:\Program Files\Borland\Delphi7\Bin
00490000 coreide70.bpl         C:\Program Files\Borland\Delphi7\Bin
007b0000 vcl70.bpl            C:\WINDOWS\System32
00910000 vclactnband70.bpl       C:\WINDOWS\System32
00960000 vclide70.bpl       C:\Program Files\Borland\Delphi7\Bin
00a20000 tlib70.bpl           C:\Program Files\Borland\Delphi7\Bin
00aa0000 dcc70.dll            C:\Program Files\Borland\Delphi7\Bin
00bf0000 delphide70.bpl       C:\Program Files\Borland\Delphi7\Bin
00d10000 inetdb70.bpl       C:\WINDOWS\System32
00d20000 borlndmm.dll       C:\Program Files\Borland\Delphi7\Bin
020f0000 htmlide70.bpl       c:\program files\borland\delphi7\Bin
02120000 webdsnap70.bpl       C:\WINDOWS\System32
02170000 xmlrtl70.bpl       C:\WINDOWS\System32
02250000 stride70.bpl       c:\program files\borland\delphi7\Bin
02270000 proide70.bpl       c:\program files\borland\delphi7\Bin
02350000 delphipro70.bpl       c:\program files\borland\delphi7\Bin
023b0000 designdgm70.bpl       c:\program files\borland\delphi7\Bin
02420000 delphient70.bpl       c:\program files\borland\delphi7\Bin
02440000 delphiclxide70.bpl       c:\program files\borland\delphi7\Bin
02470000 qtintf70.dll       C:\WINDOWS\System32
02860000 clxdesigner70.bpl       C:\Program Files\Borland\Delphi7\Bin
02cc0000 direct70.bpl       c:\program files\borland\delphi7\Bin
02ce0000 wininet.dll           6.0.2800.1405   C:\WINDOWS\system32
02d80000 delphivclide70.bpl       c:\program files\borland\delphi7\Bin
02db0000 vcldesigner70.bpl       C:\Program Files\Borland\Delphi7\Bin
02e30000 DFWEDIT.DLL                           C:\Program Files\Borland\Delphi7\Bin
033c0000 MMD7Expt.dll        C:\Program Files\ModelMakerTools\ModelMaker\6.2\bin
03660000 idl2paswizardpkg.bpl       c:\program files\borland\delphi7\Bin
038e0000 iteide70.bpl       C:\Program Files\Borland\Delphi7\Bin
038f0000 itecore70.bpl       C:\Program Files\Borland\Delphi7\Bin
04130000 dcldbxcds70.bpl       c:\program files\borland\delphi7\Bin
04190000 rc70.bpl           C:\Program Files\Borland\Delphi7\Bin
041c0000 indy70.bpl                            C:\Program Files\Borland\Delphi7\Bin
042c0000 dbexpress70.bpl         C:\WINDOWS\System32
042f0000 dcldb70.bpl          C:\Program Files\Borland\Delphi7\Bin
04330000 vcldb70.bpl          C:\WINDOWS\System32
04380000 dsnapcon70.bpl         C:\WINDOWS\System32
043a0000 soaprtl70.bpl       C:\WINDOWS\System32
04430000 VclSmp70.bpl       C:\WINDOWS\System32
04450000 dbxcds70.bpl       C:\WINDOWS\System32
04460000 DBWEBXPRT.BPL       c:\program files\borland\delphi7\Bin
04490000 DCLIB70.bpl        c:\program files\borland\delphi7\Bin
044d0000 gds32.dll           C:\WINDOWS\System32
04540000 teedb70.bpl        C:\WINDOWS\System32
04550000 dclclxstd70.bpl       C:\Program Files\Borland\Delphi7\Bin
045a0000 dclsmpedit70.bpl       c:\program files\borland\delphi7\Bin
045c0000 applet70.bpl       c:\program files\borland\delphi7\Bin
045e0000 dclmlwiz70.bpl       c:\program files\borland\delphi7\Bin
045f0000 ibevnt70.bpl       C:\WINDOWS\System32
04600000 dclshlctrls70.bpl         c:\program files\borland\delphi7\Bin
04610000 vclshlctrls70.bpl         C:\WINDOWS\System32
04630000 dclIntraweb_50_70.bpl         c:\program files\borland\delphi7\Bin
04660000 Intraweb_50_70.bpl         C:\WINDOWS\System32
046d0000 IntrawebDB_50_70.bpl         C:\WINDOWS\System32
046f0000 dclRave70.bpl                         c:\program files\borland\delphi7\bin
04710000 Rave50VCLBE70.bpl                     C:\WINDOWS\System32
047f0000 Rave50CLXBE70.bpl                     C:\WINDOWS\System32
048e0000 dclofficexp70.bpl       c:\program files\borland\delphi7\Bin
04b50000 Package1.bpl         c:\program files\borland\delphi7\Projects\Bpl
04b60000 MMtest.bpl           c:\program files\borland\delphi7\Projects\Bpl
27000000 MsgInfo70.bpl       c:\program files\borland\delphi7\Bin
40000000 rtl70.bpl            C:\WINDOWS\System32
40220000 vclx70.bpl         C:\WINDOWS\System32
40260000 vcljpg70.bpl       C:\WINDOWS\System32
40280000 vclie70.bpl        C:\WINDOWS\System32
402c0000 vclhie70.bpl       C:\Program Files\Borland\Delphi7\Bin
40330000 dbrtl70.bpl          C:\WINDOWS\System32
40450000 visualclx70.bpl                       C:\WINDOWS\System32
40590000 websnap70.bpl       C:\WINDOWS\System32
40650000 inet70.bpl         C:\WINDOWS\System32
406a0000 dsnap70.bpl          C:\WINDOWS\System32
40700000 adortl70.bpl         C:\WINDOWS\System32
40850000 bdertl70.bpl       C:\WINDOWS\System32
40890000 dbx70.bpl          C:\Program Files\Borland\Delphi7\Bin


Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
mmm... the AV comes at this line

0083acf0 vcl70.bpl       Controls TDockTree.RemoveZone

AFAIK the added line don't have nothing to do with this....

Seems that there's some error on IDE palette creating...what about your package? Are there docked forms or added menus to IDE or something else?

Note that could simply be a bpl corruption (maybe due to electrical failure or other unknowed matters)....
Ron_de_WeijzeAuthor Commented:
The VCL has not been changed and came with Delphi, no added menu's.
How to handle a bpl corruption? Reinstall Delphi?
Ron_de_WeijzeAuthor Commented:
Went ahead and started Repair which is on the install disks.
Ron_de_WeijzeAuthor Commented:
The repair module looked for corrupted files and did not find any, so intallation was complete right away. How can I see if a bpl file is corrupt? Or what else could be the problem...
Ron_de_WeijzeAuthor Commented:
Raised the points..
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Was busy on job....
Let's try by another way: what happens if you uninstall the last modified VCL? And what about if you remove the already mentioned line?
I have had that happen to me, but I usually just restart Delphi and fixes the problem, if not, rebooting the machine does it for sure...
Ron_de_WeijzeAuthor Commented:
Thanks I will look into that. Didn't know that it was possible to just un/reinstall the VCL. Though that the whole of Delphi had to be uninstalled to do that. And I did try the effect of removing the mentioned line but that didn't fix it.

I cold booted the machine but the problem returned in the exact same way.

Ron_de_WeijzeAuthor Commented:
Problem solved, the hard way however, by reinstalling Delphi as a whole (couldn't find out how to just reinstall VCL).

Of course, this may happen again, so if anybody knows what may have been another reason, please let us know!

Ferruccio and BlackTigerX, thank you guys, for your effort!

Ron dW

Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Glad to have helped you :)
Ron_de_WeijzeAuthor Commented:
For the record...

Just running what I had, produces the following exception:

Project raised exception class EInvalidOperation with message 'Cannot focus a disabled or invisible window'. Process stopped.
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
And what about madexcept log in this case?
Ron_de_WeijzeAuthor Commented:
Ferruccio, I don't know what's wrong but I get the Delphi help file all the time, not the madExcept report, since I reinstalled Delphi.
Ron_de_WeijzeAuthor Commented:
madExcept version : 2.7c
exception class   : EAccessViolation
exception message : Access violation at address 0082A534 in module 'vcl70.bpl'. Write of address 00000018.

main thread ($a60):
0082a534 vcl70.bpl       Controls           TDockTree.RemoveZone
0082a397 vcl70.bpl       Controls           TDockTree.RemoveControl

Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
that's the same that posted above, so the error is in the package containing your component....

If you want you can send to me the package source to my email (see my profile) tomorrow (here's 1.00 AM and i'm going to sleep) so i can try to debug it...

F68 ;-)
Ron_de_WeijzeAuthor Commented:
Thanks very much Ferruccio.

Just found out that the problem is directly caused by trying to use desktops I created. A series of them and they all worked fine until yesterday. In retrospect, I see that it must have been the latest one that I created just before hell broke loose yesterday. Now all of them are corrupted, but the application runs again.

Still investigating..
Ron_de_WeijzeAuthor Commented:
The problem is showing its ugly face again. This time I will not reinstall Delphi!!

It returned after running the program, and the program loading the (default file) data, got stuck in an endless loop and wasn't responding any more. CTRL-ALT-DEL was all I could do towards Delphi. Then, after loading Delphi, and the program (not running it), I saved the desktop. That is, saved it from the reinstalled environment, to overwrite the old one that directly caused the problem in the old one. Then, there the old devil reappeared.

Ron_de_WeijzeAuthor Commented:
Found a solution:

Comment from geobul
Date: 01/03/2002 12:27AM PST
Delphi IDE error messages can be ignored! Select 'Tools-Debugger Options' from main menu. Go to the 'Language exceptions' page and uncheck 'Stop on Delphi Exceptions'. Press 'OK' button. That's all.
Regards, Geo

Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
mmm...that's a work-around, not a solution :))
Doing so you'll ever have a stop on every exception, not just on ide exception....btw that's a good WA....:))
Ron_de_WeijzeAuthor Commented:
You're right, that's a workaround. So if you find a better way, please share!

Ron dW

Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Still looking for, be sure that if it's found it'll be shared :)

F68 ;-)
Ron_de_WeijzeAuthor Commented:
Error reports automatically generated and sent to Microsoft lead me to...

Downloading Windows XP Service Pack 2 (update 1 of 1)...

I am sure I already had installed this, but there seems to be a Service Pack recently released as well that is different from this one (doesn't carry the Windows XP prefix) so perhaps that was the one I installed. Pretty confusing! Looks like hiding serious bugs.
Ron_de_WeijzeAuthor Commented:
The problem is not solved. The workaround sometimes does and at other times does not work (uncheck Stop on Delphi exceptions). Re-installing Delphi does work however upon rebooting the old symptoms return.

I will re-open this problem under a new name 'Delphi IDE error' (new points) and redescribe it with the extra info I have now.

Ron dW
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Just re-reading the thread i'm looking on this:
--> Just running what I had, produces the following exception:

Project raised exception class EInvalidOperation with message 'Cannot focus a disabled or invisible window'. Process stopped.

This means that there's a try to focus something directly in onshow or oncreate....
So let's skip the bpl failure and let analize the project....
Maybe in one of your desktop there's a saved situation with an already created form, and a call from somewhere to it in design time. On restart the Desktop that come try to reproduce the situation but as it's just opening now that call fails as maybe the situation isn't anymore reproducible (some not available/visible form on opening), so the AV comes up.
Ron_de_WeijzeAuthor Commented:
I deleted the suspected desktops and saved the ones created in the new environment (windows update, reinstalled Delphi, updated Delphi, new session). That didn't help.. Perhaps deleting them is only visual but not real?
Ron_de_WeijzeAuthor Commented:
Hi Ferruccio,

I believe it cannot be a Delphi exception since the problem occurs immediately upon loading the program, before I can hit Run.

Let me tell you some more about the background. This program was developed professionally in 97-98, with the latest Delphi versions of those years. That means warnings regularly occur, like pointers that cannot really be trusted, yet no problems building, compiling and running until day before yesterday.

Obviously the code cannot be loaded. If it is true that the VCL is not upward compatible from Delphi 6 or so, Borland has a problem. Would you know anyone I could contact about this and how? The Borland site is very unfriendly.

Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
well, first read this comment from rllibby (one of the most appreciated delphi experts by me)

As to how the file got corrupted, its hard to say.

If and when it does get corrupted, it can cause a mess though. Many of the settings in there are for window locations/sizes, and those can cause items to appear off screen, or not appear at all. Worse even, some of the settings (those that end in "Data") are hexadecimal values used by the ide when the desktop file is loaded. If those values are incorrect, it can cause access violations, hanging of the ide on startup, etc...

It would *appear* that the ide does little, to no validation of the hex data before attempting to use it. For example, changing the BottomPanelData value for the EditWindow0 setting to include non hex characters caused my IDE to not appear at all. The few windows that did appear would not paint.

It doesn't happen often, but it does get corrupted from time to time. Most likely (in my case anyways) from forced shutdowns when debugging an application that ends up hanging the ide.

In my situation, I create a backup of my standard dst/dsk files so that if problems do arise, I can close the idea, restore the copies, and then its good to go.

Hope this helps,
Ron_de_WeijzeAuthor Commented:
Thanks Ferrucio!

I could use old hex data files that possibly have not changed or should not have changed. But the older versions do not load either. Nothing loads!

New fact:
Starting Delphi, starting New Project, *also* raises the AV!!

I purchased and run Delphi 7 Studio. I downloaded patch/upgrade Delphi 7 Enterprise because 'about' sayd that is what was installed in the first place (so I purchased Studio but got Enterprise). Perhaps the main module for Studio and Enterprise is the same, especially since the download patch/upgrade is equally big for both (11,179 kb). However, if they are not exactly the same, that could explain the problem.

Still, of course, this is unlikely for I have run the 'wrong' patch for a long time.

For the third time in two days now I will reinstall Delphi and run the patch/upgrade 7.1, this time the one for Studio, not for Enterprise.

There is nothing else I can do, is there?
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
For what we know until now seems that there's nothing else to do.
Your hypoth is quite realistic, but if this is the scenario well, peraphs there's something strange in Borland Stuff develepores mind (i hate how they've build Delphi 8 for .net)...

BTW a try posting a new Q. in Ex-Ex could give more chances....
Ron_de_WeijzeAuthor Commented:
Ferruccio68, I hope this did not take your points away, for you helped me and deserve what you already got. We didn't know the workaround would 'expire'.

Ron dW.
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
if you've asked it for me (as i'm the only participant) and you'd like to raise points for me, let me say that this is not needed.
If this is the case i thank you very much, but i repeat that it isn't needed...
You could give some feedback if you want, the raise isn't necessary :))

F68 ;-)
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Maybe i've misunderstood...

--> Ron_de_Weijze contacted me via eMail
and want to raise the points for this question

Maybe your intention was to re-open the Q. to let it be available for other Members suggestions.
If so please don't take care about my last comment...

F68 ;-)
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
--> Ferruccio68, I hope this did not take your points away
Of course, unaccepting an answer take points away...but don't worry, i don't care about this :)
Ron_de_WeijzeAuthor Commented:
Thank you Kretzmar,

No I did not install any component before the problem arose.

As mentioned before, even loading a new project instead of my own application (or one of its previous versions) caused the Access Violation problem.

Then, after closing Delphi, the errormessage became: "The instruction at .... referenced memory at .... The memory could not be "read". Click OK to terminate the program."

Since the problem occurs even before any program is loaded or remains after Delphi is closed, I started re-building the environment from scratch to find out as close as I can get, where the AV first rises.

For the record:

0. Installed latest Windows XP patches/updates
1. Deinstalled Delphi
2. Reinstalled Delphi in a non-default directory
3. Installed Delphi patch/upgrade 7.1 Architect
4. The program opens, no problem
5. Using the program: "Project projectname.exe raised exception class EInvalidOperation with message ‘Cannot focus a disabled or invisible window’. Process stopped. Use Step or Run to continue."
6. The debug setting "Stop on Delphi Exceptions".

So far so good.

(Do pray.)
>(Do pray.)
i do, good luck ;-)
Ron_de_WeijzeAuthor Commented:
Thank you for praying.
Here are your points back.
Don't know what did it, but is was solved.

Thanks all,
Ron dW
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 23
  • 15
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now