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
0003575 [JEDI VCL] 00 JVCL Components crash always 2006-03-12 15:37 2006-04-05 14:59
Reporter Betalord View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0003575: JvCheckListBox crashes when removing last item in the list, if this item is checked
Description JvCheckListBox 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.
Additional Information
Tags No tags attached.
Attached Files zip file icon JvCheckListBox.zip [^] (118,397 bytes) 2006-03-14 03:22
zip file icon BugMovieBetalord.zip [^] (312,346 bytes) 2006-03-18 03:36
zip file icon JvCheckListBoxFixedSource.zip [^] (4,072 bytes) 2006-03-20 16:04

- Relationships

-  Notes
(0008660)
AHUser (developer)
2006-03-13 05:53

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.
(0008661)
Betalord (reporter)
2006-03-13 10:15

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)
(0008662)
AHUser (developer)
2006-03-14 03:23

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)
(0008689)
Betalord (reporter)
2006-03-18 03:39

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).
(0008693)
Kyle_Katarn (reporter)
2006-03-19 12:24

I confirm the issue.

Delphi 7 and JVCL 3.20
100% reproductible.
(0008699)
AHUser (developer)
2006-03-20 04:24

Fixed in CVS.

The captured LB_DELETESTRING invoked a refresh (=>CN_DRAWITEM) between the deletion of the Item-Wrapper and the string item.
(0008706)
Betalord (reporter)
2006-03-20 11:07

Could you perhaps attach the fixed file to this issue? I cannot access sourceforge's cvs repository (timeouts).
(0008707)
AHUser (developer)
2006-03-20 16:04

Attached.
(0008708)
Kyle_Katarn (reporter)
2006-03-21 00:28

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 !
(0008711)
AHUser (developer)
2006-03-21 11:40

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


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