View Issue Details

IDProjectCategoryView StatusLast Update
0003845JEDI VCL00 JVCL Componentspublic2006-08-22 07:33
ReportermarcgeldonAssigned Toobones 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.30 
Summary0003845: Crash on JvDBDrid title button click in 3.30 - with bug fix
DescriptionI 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) +++
TagsNo tags attached.

Activities

obones

2006-08-22 07:33

administrator   ~0010003

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