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
0003845 [JEDI VCL] 00 JVCL Components crash always 2006-07-31 07:06 2006-08-22 07:33
Reporter marcgeldon View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0003845: Crash on JvDBDrid title button click in 3.30 - with bug fix
Description I found a bug in "JvDBGrid.pas" (fileversion: v 1.121 2006/02/20 18:49:01).

Create a column with a fieldname that does not exist (fieldname "xyz" for example). Set property TitleButtons to "True". Click on the title button in the column with the not-existing field. Please have a active dataset assigned.

You'll receive a
approx. line 1807

+++ OLD SOURCECODE (START) +++
  if AutoSort and not IndexFound then
  begin
    if SortedField = AField.FieldName then
    begin
      case Self.SortMarker of
        smUp:
[...]
+++ OLD SOURCECODE (END) +++

Here is the solution. Check if "AField" is assigned before we access it (AField.FieldName):

+++ NEW SOURCECODE (START) +++
  if AutoSort and not IndexFound then
  begin
    if Assigned(AField) then
    begin
      if SortedField = AField.FieldName then
      begin
        case Self.SortMarker of
          smUp:
            Self.SortMarker := smDown;
          smDown:
            Self.SortMarker := smUp;
        end;
      end
      else
      begin
        SortedField := AField.FieldName;
        Self.SortMarker := smUp;
      end;
    end;
  end;
+++ NEW SOURCECODE (END) +++
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0010003)
obones (administrator)
2006-08-22 07:33

This is now fixed in SVN

- Issue History
Date Modified Username Field Change
2006-07-31 07:06 marcgeldon New Issue
2006-08-22 07:33 obones Status new => resolved
2006-08-22 07:33 obones Fixed in Version => Daily / SVN
2006-08-22 07:33 obones Resolution open => fixed
2006-08-22 07:33 obones Assigned To => obones
2006-08-22 07:33 obones Note Added: 0010003


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