View Issue Details

IDProjectCategoryView StatusLast Update
0003575JEDI VCL00 JVCL Componentspublic2006-04-05 14:59
ReporterBetalordAssigned ToAHUser 
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.30 
Summary0003575: JvCheckListBox crashes when removing last item in the list, if this item is checked
DescriptionJvCheckListBox crashes if you remove the last item in the list and if that item was checked. To reproduce it, put a component on the form and write OnUpKey event:

procedure TForm1.JvCheckListBox1KeyUp(Sender: TObject;
  var Key: Word; Shift: TShiftState);
begin
  if JvCheckListBox1.ItemIndex = -1 then Exit;

  if Key = VK_DELETE then
    JvCheckListBox1.Items.Delete(JvCheckListBox1.ItemIndex);
end;

Note that you have to click on the item to select it before deleting it, it is not enough if you click on the checked field and then hit delete, you have to first check it, then click on it (on the text, so that it gets selected although it is already selected when you checked it) and then hit delete.
TagsNo tags attached.

Activities

AHUser

2006-03-13 05:53

developer   ~0008660

I cannot reproduce this with:

1. Start application
2. Click on the checkbox of the last item
3. Select a different item
4. Select the last item by clicking on the text
5. Pressing the DELETE key.


1. Start application
2. Click on all checkboxes (last to first)
3. Select the last item by clicking on the text
5. Pressing the DELETE key.

Betalord

2006-03-13 10:15

reporter   ~0008661

Sorry I guess I wasn't clear enough - when I said last item I didn't mean last item out of n items, but the only item left in the list - so you have a list with 1 item only, which is checked, and then you try to remove that item (so the list becomes empty). This is when it crashes. (Item must be checked and selected)

2006-03-14 03:22

 

JvCheckListBox.zip (118,397 bytes)

AHUser

2006-03-14 03:23

developer   ~0008662

I still can't reproduce this. I have attached a screen capture video that shows that your bug does not happen to me.

(JCL and JVCL from CVS, BDS 2006)

2006-03-18 03:36

 

BugMovieBetalord.zip (312,346 bytes)

Betalord

2006-03-18 03:39

reporter   ~0008689

I've just installed the 3.20 version in Delphi 7 and I can still reproduce it. I've made two small movies to show you exactly how to reproduce it (file 100%Reproducable.exe) and how little difference it takes to avoid rasing the exception (TakesLongTimeToReproduce.exe). In order to reproduce it, you have to do exactly as shown in the first movie, that is to click on the text label, then check it, then press DELETE key (in OnKeyUp event you should add the code I've pasted in the first bug description).

Kyle_Katarn

2006-03-19 12:24

reporter   ~0008693

I confirm the issue.

Delphi 7 and JVCL 3.20
100% reproductible.

AHUser

2006-03-20 04:24

developer   ~0008699

Fixed in CVS.

The captured LB_DELETESTRING invoked a refresh (=>CN_DRAWITEM) between the deletion of the Item-Wrapper and the string item.

Betalord

2006-03-20 11:07

reporter   ~0008706

Could you perhaps attach the fixed file to this issue? I cannot access sourceforge's cvs repository (timeouts).

2006-03-20 16:04

 

JvCheckListBoxFixedSource.zip (4,072 bytes)

AHUser

2006-03-20 16:04

developer   ~0008707

Attached.

Kyle_Katarn

2006-03-21 00:28

reporter   ~0008708

How can we access to the latest version of files on the CVS ? The only copy i can find is more than 3 years old !

AHUser

2006-03-21 11:40

developer   ~0008711

http://homepages.borland.com/jedi/jvcl/cvs.htm

The module is dev/jvcl3

Issue History

Date Modified Username Field Change
2006-03-12 15:37 Betalord New Issue
2006-03-13 05:53 AHUser Note Added: 0008660
2006-03-13 05:53 AHUser Status new => feedback
2006-03-13 10:15 Betalord Note Added: 0008661
2006-03-14 03:22 AHUser File Added: JvCheckListBox.zip
2006-03-14 03:23 AHUser Note Added: 0008662
2006-03-18 03:36 Betalord File Added: BugMovieBetalord.zip
2006-03-18 03:39 Betalord Note Added: 0008689
2006-03-19 12:24 Kyle_Katarn Note Added: 0008693
2006-03-20 04:24 AHUser Status feedback => resolved
2006-03-20 04:24 AHUser Resolution open => fixed
2006-03-20 04:24 AHUser Assigned To => AHUser
2006-03-20 04:24 AHUser Note Added: 0008699
2006-03-20 11:07 Betalord Status resolved => feedback
2006-03-20 11:07 Betalord Resolution fixed => reopened
2006-03-20 11:07 Betalord Note Added: 0008706
2006-03-20 16:04 AHUser File Added: JvCheckListBoxFixedSource.zip
2006-03-20 16:04 AHUser Note Added: 0008707
2006-03-21 00:28 Kyle_Katarn Note Added: 0008708
2006-03-21 11:40 AHUser Note Added: 0008711
2006-04-05 14:59 AHUser Status feedback => resolved
2006-04-05 14:59 AHUser Resolution reopened => fixed