Solved

VCL50.BPL !!! Is it possible to recompile? No? I need debug info!

Posted on 2002-05-29
34
1,339 Views
Last Modified: 2012-06-22
1st of all, I didn't ever think I'll get so depth into packages, but... The question is:

I have a big problems in debugging application compiled with my own packages. It occures upon apllication exits. When i try to compile applet without packages - everything is allright.
So, I need VCL packages COMPILED WITH debug information, in order to trace the Delphi code which raise an exception. Is this thing exists somewhere?

I mean, VCL50.DPK, VCLX50.DPK etc. in order to recompile the VCL/RTL by myself (btw, I have doubt on it. I think not all the files needed present in installation).

Or ready VCL BPLs/DPCs, compiled WITH DEBUG INFO!
0
Comment
Question by:_sunny_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 9
  • 6
  • +5
34 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7041841
?are for this not the debug-dcus somewhere in the subdirecrory
0
 

Author Comment

by:_sunny_
ID: 7041869
Huh?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7041896
well,
i've no delphi on hand yet,
also i'm not an owner of d6
nor have i the possibility to access
a d6 installation

but, as far i have in mind,
there is the directory under the lib
directory, where the dcu's are placed
with debug-information, which are packaged
in the vcl..pkb

the only think you must do,
is to set the debug-library path
in the delphi-enviroment

but i may wrong

meikl ;-)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:_sunny_
ID: 7041924
Look, the problem is absence in \lib\debug
VCL50.DPC and other DPCs, compiled WITH debug information.
Borland do not provides these. I don't know why.

And - I am talking about Delphi 5 after all.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7041936
>I am talking about Delphi 5 after all
was just irritated by CLX ;-)

well, which d5-edition do u use?
0
 

Author Comment

by:_sunny_
ID: 7041947
Enterprise
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7041966
well, ok, i will take a look
into my d5 installation
later at home


0
 
LVL 8

Expert Comment

by:TOndrej
ID: 7042067
It's impossible (due to missing units) and illegal for you to recompile the re-distributable standard runtime packages supplied by Borland.

For debugging purposes, rebuild without runtime packages using debug DCUs.

If the problem only occurs when built with runtime packages, take a look at the source code of any custom runtime packages used by your project.

What's the error you get? Perhaps I could take a guess at what to look for in your source code.
0
 

Author Comment

by:_sunny_
ID: 7042164
oh, its just AV :(
No additional information available :(

Project FDINVINP.exe raised exception class C0000005 with message 'access violation at 0x00000000: read of address 0x00000000'.

Not lot of information :)

The most interest thing, that, I build the application with ONLY runtime package VCL50 (no other our packages!) and get the same error! You see?
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 7042270
I don't really have an idea, I can only guess...
I assume that the error is consistent and reproducible.
C0000005 might be the EXCEPTION_ACCESS_VIOLATION Windows constant.
Read of address 0x00000000 might mean accessing a nil pointer.
It looks like a Windows OS exception raised outside of Delphi's exception handling code (which I think can happen before Delphi exception handling is initialized or after it's uninitialized).
Try to find some unusual/suspicious code in your project...
Perhaps take a look at your initialization/finalization sections.
If you're working with pointers in your code, try to review the code.
Good luck!
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7042349
hi tondrej,
thanks for clarifying
meikl ;-)
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 7042432
Hi kretzschmar,
you're joking, right? ;-)
But I couldn't be more specific, sorry.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7042466
no no,

after a recheck at my installation,
there is no package with debuginfo there

therefore this

>It's impossible (due to missing units) and illegal for
>you to recompile the re-distributable standard
>runtime packages supplied by Borland

clarifies, why the vcl50.bpl isn't recompileable

well, also i cannot more say as you, tondrej,
its a bit like digging in the dark

meikl ;-)
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 7042540
I see...
It kind of makes sense: the main purpose of Borland runtime packages is to be shared by Delphi/BCB applications (reducing deployed executable size). Imagine the BPL Hell if everybody compiled and distributed their own versions... ;-)
0
 

Author Comment

by:_sunny_
ID: 7043981
So we've started this hell, you meant, tondrej :)
I solved the problem with building my own VCL50Debug.BPL
It was unexpectedely easy thing to do.
I created new package, then did doubleclick on VCL50.DCP in it's "Requires", and - oh, man - it bring me new window called "Generated VCL50.DPK"!!!
I saved it to disk. Then I renamed it, changed search path to \LIB\DEBUG (!), compiled (just on my way I was forced to drop from it libintf.dcu and 2-3 other units due to absence of their DCUs) and I have it done!!

Now I have my own VCL50Deb.BPL WITH DEBUG INFO inside :)
And happily trying to catch this f#@$%ing bug :)

Thanks to all, but I think its me who won the points :)
0
 
LVL 9

Expert Comment

by:ITugay
ID: 7044021
seems it was meikl's idea to use units (packages) with debug info?
0
 

Author Comment

by:_sunny_
ID: 7044035
you mean to recompile vcl50.bpl?
look through the original question, ITugay...
meikl, just checked the bpl's with debugging is absent in his installation as well. imho, it was matter-of-course...

>I mean, VCL50.DPK, VCLX50.DPK etc. in order to recompile >the VCL/RTL by myself (btw, I have doubt on
>it. I think not all the files needed present in >installation).

so I just droped my doubt out :)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7044067
at least, you've solved the question byself

ask at community support to move the question
into paq and for refunding your points

meikl ;-)

0
 
LVL 8

Expert Comment

by:TOndrej
ID: 7044102
And what have you solved with this solution?
You still don't have vcl50.dcp with debug info, unless I'm missing something.
0
 

Author Comment

by:_sunny_
ID: 7044114
Yes, I do have!
The name doesn't matter (vcl50deb, vcl50...).
I've got exactly what I wanted. I've got vcl50 package (almost vcl50, of course) WITH POSSIBILITY to walk inside its code!

Actually, I already found what the bug was :)
I found, which exactly finalization raise exception. If it is interesting, it was a windows message (WM_ACTIVATE), which none waited for at this moment... all objects was freed till this moment.
0
 

Author Comment

by:_sunny_
ID: 7044117
Tondrej, I mean, I reassembled vcl50.bpl, but from DCUs not from \LIB nor from \LIB\DEBUG !
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 7044124
Cool! Congrats on your solution :-)
I knew you could generate .dpk from a required .dcp that way but I didn't think it would help.
I'll have to look at it again ;-)
0
 

Author Comment

by:_sunny_
ID: 7044142
Many thanks to all...
Somebody can tell me what should I do with this question?
Who wants the points? :))
Or I can just close it? How?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7044157
just to repeat

ask at community support to move the question
into paq and for refunding your points

meikl ;-)

0
 
LVL 9

Expert Comment

by:ITugay
ID: 7044163
May be I missed something, but there is another way documented in Delphi.

1. specify Debug DCU Path located in
 Tools | Debugger options | [General]

C:\Delphi5\lib\Debug



2. check "Use debug DCU" in
Project | Options | [Compiler]

<Delphi help>
Use Debug DCUs     Allows you to link in debug versions of the VCL. When checked, Delphi prepends the Debug DCU path (specified in Tools|Debugger Options on the General page) to the unit Search path specified in Project|Options ont he Directories/Conditionals page.
</Delphi help>



3. specify "Debug source path"
Project | Options | [Debug source path]

$(DELPHI)\Source\Rtl\Sys\;$(DELPHI)\Source\Vcl


<Delphi help>
Debug source path     Search path for the debugger. The debugger searches paths defined by the compiler by default. If the directory structure has changed since the last compile, a path can be entered here to include a file in the debugging session.
</Delphi help>

now the test code

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end. // set breakpoint here and then press F7 key when debugger stops here
// it will walk via system.pas,  forms.pas etc.
// and even ask for path to source code of some unit which path was not specified in "Debug source path"


-----
Igor


0
 

Author Comment

by:_sunny_
ID: 7044173
Igor, please, now check "Build with runtime packages" checkbox in Project Options...

Repeat your experiment.... :)

Got exciting? :)
0
 
LVL 9

Expert Comment

by:ITugay
ID: 7044197
Nothing exciting, but very predictedly.

I can't understand, are you trying to find a bug by easy way or produce as many problems as it is possible?

btw, have no time to continue discussion, so, I recommend you to ask community support to refund your points. Seems you really deserved it.

-----
Igor
0
 

Author Comment

by:_sunny_
ID: 7044214
it seems you wasn't attentive enough.
I sayed before: the bug occures ONLY when program built WITH PACKAGES. It not occures if one built WITHOUT.
0
 
LVL 9

Expert Comment

by:ITugay
ID: 7046398
agree, I missed it.
0
 

Expert Comment

by:RayNorrish
ID: 7178767
"Project FDINVINP.exe raised exception class C0000005 with message 'access violation at 0x00000000: read of address 0x00000000'"

In my experience, I find that this is nearly always caused by accessing / releasing an object that isn't instantiated - and should be easily tracked down, even without debug.

0
 
LVL 1

Expert Comment

by:pnh73
ID: 9010382
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ with refund

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 0 total points
ID: 9101740
Force accepted

** Mindphaser - Community Support Moderator **
0
 

Expert Comment

by:CleanupPing
ID: 9343200
_sunny_:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9343215
>Post your closing recommendations!  No comment means you don't care.

i am definitivly not able to post recommendations for 200+ cleanup-posts per day.

that means not, that i didn't care of it, if i post no recommendation there!!

even so on this q, i post this unseen of the q
0

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question