Board index » delphi » Access violation in New Field Editor

Access violation in New Field Editor

I posted this in delphi.ide but got no answer. Perhaps someone here know
something about this problem:

Suddenly I can't open the New Field Editor without errors. Here are the
steps:

1) Dblclick on a table component.
2) Right click in Field Editor and chose "New Field...".
3) I get an "AV at address 400056FC in module 'rtl70.bpl'. Read of
adress 04ED2BF8."
4) I click OK and the New Field Editor opens.
5) I type one letter in the Name field and get the same error. OK.
6) I chose a field type. After that no more errors and the field is
added when I close the dialog with the OK button.
7) Same procedure every time I open the New Field Editor.

The project is huge with 500+ units and an exe size of 9 Mb. If I start
a new project, add a table component and invokes the New Field Editor
there is no problems.

Any idea what is going on and what I can do to get rid of the AV?

Gunnar Andersson

 

Re:Access violation in New Field Editor


Quote
Gunnar Andersson wrote:
> I posted this in delphi.ide but got no answer. Perhaps someone here
> know something about this problem:

> Suddenly I can't open the New Field Editor without errors. Here are
> the steps:

> 1) Dblclick on a table component.
> 2) Right click in Field Editor and chose "New Field...".
> 3) I get an "AV at address 400056FC in module 'rtl70.bpl'. Read of
> adress 04ED2BF8."

Strange that I didnt see it, because I was having exactly the same problem.
In any event, its more than likely a 3rd party package/expert. I just
haven't worked out which one I was using that was doing it. (It's not
GExperts, though)

--
Dave Nottage (TeamB)

Re:Access violation in New Field Editor


Quote
Dave Nottage (TeamB) wrote:
> In any event, its more than likely a 3rd party package/expert. I just
> haven't worked out which one I was using that was doing it. (It's not
> GExperts, though)

I googled groups for 'New Field Editor Bug Delphi' and found this
(written 2001-11-06 by Vitaliy Lyanchevskiy in vcl.components.writing):

"It's the bug of Delphi IDE in implementation of
DB.RegisterFieldsProc called during DB.RegisterFields.

RegisterFieldsProc is implemented by procedure RegFields
in \Source\Property Editors\DSDefine.pas

Short description of the BUG:
Field classes are always added to internal list but never removed.
So when having registered fields package are unloaded from IDE (or reloaded)
the list can contain "hanging" field references
what cause AV in 'Fields editor | New Field ...'.
AV happens only when package has been unloaded
or has been loaded into other address space
(e.g. Package have default {$IMAGEBASE $400000})."

I have unchecked all CLX, DevExpress and Bold packages in Project
Options. Could this be an explanation???

Gunnar Andersson

Re:Access violation in New Field Editor


Quote
> I googled groups for 'New Field Editor Bug Delphi' and found this
> (written 2001-11-06 by Vitaliy Lyanchevskiy in vcl.components.writing):

> "It's the bug of Delphi IDE in implementation of
> DB.RegisterFieldsProc called during DB.RegisterFields.

> RegisterFieldsProc is implemented by procedure RegFields
> in \Source\Property Editors\DSDefine.pas

> Short description of the BUG:
> Field classes are always added to internal list but never removed.
> So when having registered fields package are unloaded from IDE (or
reloaded)
> the list can contain "hanging" field references
> what cause AV in 'Fields editor | New Field ...'.
> AV happens only when package has been unloaded
> or has been loaded into other address space
> (e.g. Package have default {$IMAGEBASE $400000})."

> I have unchecked all CLX, DevExpress and Bold packages in Project
> Options. Could this be an explanation???

The problem is also present in Delphi 6.  The only reliable work-around I
have discovered is to restart Delphi.  Anything else can lead to data
corruption.

The QC report is 2659.  Feel free to rate it, vote for it, or provide
comments.  And, if you're a sysop, feel free to (finally) open it.

- Brian

Re:Access violation in New Field Editor


Quote
> Suddenly I can't open the New Field Editor without errors. Here are the
> steps:

I get the same thing.  All I can do at that point is close and re-start
Delphi.

Mike

Re:Access violation in New Field Editor


Quote
Brian Cook wrote:
> The QC report is 2659.  Feel free to rate it, vote for it, or provide
> comments.  And, if you're a sysop, feel free to (finally) open it.

He's receiving an AV, not a "Class not found" error.

--
Dave Nottage (TeamB)

Re:Access violation in New Field Editor


Quote
> > The QC report is 2659.  Feel free to rate it, vote for it, or provide
> > comments.  And, if you're a sysop, feel free to (finally) open it.

> He's receiving an AV, not a "Class not found" error.

Two things...

1. It's the same bug just a different symptom.

2. Please read the "steps".

- Brian

Re:Access violation in New Field Editor


Quote
> > Suddenly I can't open the New Field Editor without errors. Here are the
> > steps:

> I get the same thing.  All I can do at that point is close and re-start
> Delphi.

Which, for this particular bug, is very important.  Not restarting Delphi
could lead to data corruption (e.g. corrupt DFM).

- Brian

Re:Access violation in New Field Editor


Quote
>>>Suddenly I can't open the New Field Editor without errors. Here are the
>>>steps:

>>I get the same thing.  All I can do at that point is close and re-start
>>Delphi.

> Which, for this particular bug, is very important.  Not restarting Delphi
> could lead to data corruption (e.g. corrupt DFM).

Restart doesn't help me. As soon as I reopen my huge project the bug in
the New Field Editor hits me. So far I have not had any data corruption.

/Gunnar Andersson

Re:Access violation in New Field Editor


Quote
Brian Cook wrote:
>> He's receiving an AV, not a "Class not found" error.

> Two things...

> 1. It's the same bug just a different symptom.

If the steps can produce an AV at the same point, I'll agree with you that
it's probably the same bug.

Quote
> 2. Please read the "steps".

Did so. They don't say anything about an AV. When I have some time to look
at it, I'll check what happens.

--
Dave Nottage (TeamB)

Re:Access violation in New Field Editor


Quote
> Restart doesn't help me. As soon as I reopen my huge project the bug in
> the New Field Editor hits me.

Try this...

    - Start Delphi
    - Execute Project / Options
    - Navigate to the Packages tab
    - Make a list of all the packages that are not loaded (not checked)

    - Click Cancel to close the dialog
    - Open your project
    - Execute Project / Options
    - Navigate to the Packages tab

Are the two lists different?  Which packages are different?

Quote
> So far I have not had any data corruption.

I wish you continued good luck and I hope you get passed the access
violations, Brian

Re:Access violation in New Field Editor


Quote
> >> He's receiving an AV, not a "Class not found" error.

> > Two things...

> > 1. It's the same bug just a different symptom.

> If the steps can produce an AV at the same point, I'll agree with you that
> it's probably the same bug.

I know for a fact that it's the same bug described by Vitaliy Lyanchevskiy.
The symptoms are a bit different but the dangling reference is definately
the bug.

Quote
> > 2. Please read the "steps".

> Did so. They don't say anything about an AV. When I have some time to look
> at it, I'll check what happens.

Look again...

- An access violation should occur in rtl60.bpl

Brian

Re:Access violation in New Field Editor


Quote
Brian Cook wrote:
>> Did so. They don't say anything about an AV. When I have some time
>> to look at it, I'll check what happens.

> Look again...

> - An access violation should occur in rtl60.bpl

OK.. so it was hiding in there <g> Thanks for the correction.

As per above, I'll have a look at it, hopefully soon.

--
Dave Nottage (TeamB)

Re:Access violation in New Field Editor


Quote
> As per above, I'll have a look at it, hopefully soon.

Thanks.  Don't rush.  For me, it's annoying but I've learned to live with
it.  The report hasn't changed (no new ratings or votes or comments) so
Gunnar and Michael must not be that interested in getting the problem fixed.

- Brian

Re:Access violation in New Field Editor


Quote
Brian Cook wrote:
> Try this...
> Are the two lists different?  Which packages are different?

Thanks Brian! There where differences and when I removed them the New
Field Editor works without AV!

Here are the differences (unchecked bpl):

Delphi at startup           With my project loaded
======================      =======================
                             Borland ADO
Borland Decision Cube
                             Interbase updatebuilder

I unchecked Decision Cube in Delphi and checked Borland ADO and
Interbase updatebuilder in my project. Then the AV:s disappeared!

Gunnar Andersson

Go to page: [1] [2]

Other Threads