Board index » cppbuilder » Again (UPDATE): access violation in RTL60.BPL when placing custom component onto form

Again (UPDATE): access violation in RTL60.BPL when placing custom component onto form

Hello all,

    I have some interesting updates concerning my problem.  Not sure if it
will do any good to post as I haven't had any responses to earlier posts;
but maybe it will help somebody else.

    I have a problem in BCB6 Pro where I have several component packages
that were initially developed under BCB5 and had been released to our users
with out a glitch.  We recently upgraded to BCB6 Pro and these packages
compiled and linked fine after letting Builder convert the projects and
after I changed a few header file names here and there.

    My hopes were high until I tried using these components in the IDE at
design time.  Whenever I place certain components on the form I get an
access violation in RTL60.BPL - joy!!

    The only components that exhibit this problem are ones that have
published properties that are class types defined and implemented in other
packages.  So... I wrote up a couple of test packages with very simple
components and tried it on 2 of our dev machines; the same problem occurs on
both.

    I have TComponent1 in Package1 and TComponent2 in Packages2.
TComponent2 has a published property of type TComponent1.  This causes the
problem.  The access vilation occurs in the TObject::InheritsFrom method in
RTL60.BPL.

    NOW THE UPDATE!!

    I finally broke down and rewrote TComponent1 and Package1 using Object
Pascal and compiled and linked it.  I rebuilt Package2 WITHOUT ANY CODE
CHANGES and now it works!!  Obviously I can't go and rewrite my entire suite
in Pascal, but these seems to indicate a deeper problem.

    Probably why there isn't more static about this problem is that most 3rd
party vendors are developing components for Delphi and C++ Builder and using
the same .pas units for both libraries.  If they are doing this then they
would never see this problem.  At this point after 4 weeks of struggles I am
certain there is a bug in BCB6 somewhere; either in the C++ compiler or
linker.

    Can somebody help me?  What does this all mean?  If I could just get
somebody to acknowledge this IS a problem then I would go away and work on
something else and wait for Borland to fix it.

Thank you,
Sean P. LeCrone

 

Re:Again (UPDATE): access violation in RTL60.BPL when placing custom component onto form


almost sounds like a visibility problem..
one is accessiing a class that is not yet loaded in memory..
something like the reason why you would use the class <Class name> before the
actual usage of it.
this would thus let the compiler know about it sooner..
 just a thought..
Quote
"Sean P. LeCrone" wrote:
> Hello all,

>     I have some interesting updates concerning my problem.  Not sure if it
> will do any good to post as I haven't had any responses to earlier posts;
> but maybe it will help somebody else.

>     I have a problem in BCB6 Pro where I have several component packages
> that were initially developed under BCB5 and had been released to our users
> with out a glitch.  We recently upgraded to BCB6 Pro and these packages
> compiled and linked fine after letting Builder convert the projects and
> after I changed a few header file names here and there.

>     My hopes were high until I tried using these components in the IDE at
> design time.  Whenever I place certain components on the form I get an
> access violation in RTL60.BPL - joy!!

>     The only components that exhibit this problem are ones that have
> published properties that are class types defined and implemented in other
> packages.  So... I wrote up a couple of test packages with very simple
> components and tried it on 2 of our dev machines; the same problem occurs on
> both.

>     I have TComponent1 in Package1 and TComponent2 in Packages2.
> TComponent2 has a published property of type TComponent1.  This causes the
> problem.  The access vilation occurs in the TObject::InheritsFrom method in
> RTL60.BPL.

>     NOW THE UPDATE!!

>     I finally broke down and rewrote TComponent1 and Package1 using Object
> Pascal and compiled and linked it.  I rebuilt Package2 WITHOUT ANY CODE
> CHANGES and now it works!!  Obviously I can't go and rewrite my entire suite
> in Pascal, but these seems to indicate a deeper problem.

>     Probably why there isn't more static about this problem is that most 3rd
> party vendors are developing components for Delphi and C++ Builder and using
> the same .pas units for both libraries.  If they are doing this then they
> would never see this problem.  At this point after 4 weeks of struggles I am
> certain there is a bug in BCB6 somewhere; either in the C++ compiler or
> linker.

>     Can somebody help me?  What does this all mean?  If I could just get
> somebody to acknowledge this IS a problem then I would go away and work on
> something else and wait for Borland to fix it.

> Thank you,
> Sean P. LeCrone

Other Threads