View Issue Details

IDProjectCategoryView StatusLast Update
0004626JEDI VCL00 JVCL Componentspublic2008-12-23 01:10
ReporterdeboseAssigned Toobones 
PrioritynormalSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.36 
Summary0004626: Shift+Click on TJvDbGrid with multiselect hangs up the application(endless loop)
DescriptionHow to repeat:
1) Place new TJvDbGrid on form
2) Connect it to active dataset with data
3) Set multiselect to True
4) Place cursor on first record
5) Hold down shift and click on second record
6) Application will hang
Additional InformationI have located the problem place:
endless loop is in
procedure TJvDBGrid.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

in code:

while not (CurrentRowSelected and (Bookmark = lNewSelected)) do // this check will never be true
begin
  CurrentRowSelected := True;
  Next;
end;
TagsNo tags attached.

Activities

obones

2008-12-19 01:04

administrator   ~0015112

Please provide the zipped sources of a sample application showing this.

2008-12-20 15:45

 

JvDbGridMultiSelectBug(ID_0004626).zip (4,244 bytes)

debose

2008-12-20 15:46

reporter   ~0015117

Here it is.

p.s. i am using Delphi 2009.

obones

2008-12-22 06:15

administrator   ~0015166

Must be a D2009 issue as I'm not seeing it under D2006

debose

2008-12-22 15:49

reporter   ~0015176

seems like that.
i suppose, it happens because of in D2009, TBookmark = TBytes. But comparing 2 arrays(TBytes) via equal(=) is always false
(Bookmark = lNewSelected) -> always false

for now, i fixed this by replacing (Bookmark = lNewSelected)
with (CompareBookmarks(Bookmark, lNewSelected)=0)

obones

2008-12-23 01:10

administrator   ~0015179

Thanks, this is now fixed in SVN.

Issue History

Date Modified Username Field Change
2008-12-17 16:28 debose New Issue
2008-12-19 01:04 obones Note Added: 0015112
2008-12-19 01:04 obones Status new => feedback
2008-12-20 15:45 debose File Added: JvDbGridMultiSelectBug(ID_0004626).zip
2008-12-20 15:46 debose Note Added: 0015117
2008-12-22 06:15 obones Note Added: 0015166
2008-12-22 06:15 obones Status feedback => acknowledged
2008-12-22 15:49 debose Note Added: 0015176
2008-12-23 01:10 obones Note Added: 0015179
2008-12-23 01:10 obones Status acknowledged => resolved
2008-12-23 01:10 obones Fixed in Version => Daily / SVN
2008-12-23 01:10 obones Resolution open => fixed
2008-12-23 01:10 obones Assigned To => obones