Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003026 [JEDI VCL] 00 JVCL Components minor always 2005-06-10 04:14 2005-06-12 11:38
Reporter brethren70 View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0003026: JvDBGrid, JvDBUltimGrid cannot be created. Access violation occurs.
Description JvDBGrid, JvDBUltimGrid cannot be dropped to form in design time.
They also cannot be created in runtime due to access violation in TJvDBGrid.NotifyLayoutChange method.

  for I := 0 to FChangeLinks.Count-1 do
    TJvDBGridLayoutChangeLink(FChangeLinks[I]).DoChange(Self, Kind);

FChangeLinks is nil in my Delphi 2005, Delphi 7.

So, I added if statement like below.

  if FChangeLinks <> nil then
   for I := 0 to FChangeLinks.Count-1 do
      TJvDBGridLayoutChangeLink(FChangeLinks[I]).DoChange(Self, Kind);

Is it right?
Is there nobody has a same problem?
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0007425)
obones (administrator)
2005-06-11 09:33

I cannot reproduce that, FChangeLinks is set in the constructor. Just step into it and see why it is not set, there lies the real reason.
(0007434)
brethren70 (reporter)
2005-06-12 07:17

(1) Constructor TJvDBGrid.Create(AOwner: TComponent);
      .......
     Options := DefJvGridOptions; // <<<<< This call TCustomDBGrid.SetOptions;
     .........

(2) TCustomDBGrid.SetOptions(Value: TDBGridOptions);
      ........
      if ChangedOptions * LayoutOptions <> [] then LayoutChanged; <-- This Call procedure TJvDBGrid.NotifyLayoutChange
 
(3) Now, FChangeLinks is nil. FChangeLinks is created later "Options := DefJvGridOptions" statement.


another question
-------------------------
In TJvDBGrid constructor,

constructor TJvDBGrid.Create(AOwner: TComponent);
  FCharList :=
    ['A'..'Z', 'a'..'z', ' ', '-', '+', '0'..'9', '.', ',',
     '?, '?, '?, '?, '?, '?, '?, '?, '?, '?, '?, '?, Backspace]; <-- this statement is not compiled.

Do I have the corrupted source ?
(0007435)
obones (administrator)
2005-06-12 07:24

> (2) TCustomDBGrid.SetOptions(Value: TDBGridOptions);
> ........
> if ChangedOptions * LayoutOptions <> [] then LayoutChanged; <-- This
> Call procedure TJvDBGrid.NotifyLayoutChange

No, not here, it does not call it. What version of Delphi are you using?
But there indeed seems to be a potential problem here.


> Do I have the corrupted source ?

What local language are you using? The question marks are replacements for accented characters such as é, è, and ä.
(0007436)
brethren70 (reporter)
2005-06-12 07:30

my local language is Korean.
Delphi 7 Enterprise (Build 8.1)
Delphi 2005 Architecture Version 9.0.1882.30496
(0007438)
obones (administrator)
2005-06-12 08:41

Ok, then you can simply remove all the question marks values and get something like this instead:

['A'..'Z', 'a'..'z', ' ', '-', '+', '0'..'9', '.', ',', Backspace]

That should work.
(0007439)
brethren70 (reporter)
2005-06-12 09:33

Thanks obones.
What can I do for find the reason of AV in TJvDBGrid?
(because you can't reproduce this problem :)
(0007441)
obones (administrator)
2005-06-12 11:38

Well, there is a potential problem, so the solution is now in CVS (revision 1.111), FChangeLinks is created right after the inherited calls.
Thanks for your help, it is very much appreciated.

- Issue History
Date Modified Username Field Change
2005-06-10 04:14 brethren70 New Issue
2005-06-11 09:33 obones Note Added: 0007425
2005-06-11 09:33 obones Status new => feedback
2005-06-12 07:17 brethren70 Note Added: 0007434
2005-06-12 07:24 obones Note Added: 0007435
2005-06-12 07:30 brethren70 Note Added: 0007436
2005-06-12 08:41 obones Note Added: 0007438
2005-06-12 09:33 brethren70 Note Added: 0007439
2005-06-12 11:38 obones Status feedback => resolved
2005-06-12 11:38 obones Resolution open => fixed
2005-06-12 11:38 obones Assigned To => obones
2005-06-12 11:38 obones Note Added: 0007441


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker