View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006158 | JEDI VCL | 00 JVCL Components | public | 2013-07-02 15:18 | 2014-12-04 16:31 |
Reporter | surfer007 | Assigned To | obones | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | suspended | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0006158: JvDriveCtrls | ||||
Description | TJvFileListBox.DrawItem fires exception when directory is empty. List index out of bounds (0) | ||||
Tags | No tags attached. | ||||
2013-07-02 15:18
|
bug_filelistbox.bmp (2,896,794 bytes) |
|
What Delphi version do you use? I can't reproduce this with XE4 and the JVCL's master branch. |
|
It is D7. The bug happens only when i run the application and the folder is empty. |
|
which JVCL version u use ? is it really last git/daily? |
|
i just installed files from today, jcl-2.5.0.4877.7z and JVCL3-2013-07-08.zip and have still the error. By the way, the drive is mapped from a usb stick on the Fritz!Box to z: On Form.Create i set the directory: JvFileListBox.Directory := 'z:\images\new'; As talked, if the directory is empty the AV happens. Index is 0 and does not exists! Here is my workaround: procedure TJvFileListBox.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); var Offset: Integer; tmpR: TRect; ImageIndex: Integer; OverlayIndex: Integer; begin with Canvas do begin // FillRect(Rect); Offset := 2; tmpR := Rect; if ShowGlyphs then begin ImageIndex := Integer(Items.Objects[Index]); OverlayIndex := (ImageIndex shr 24) - 1; if OverlayIndex >= 0 then FImages.DrawOverlay(Canvas, Rect.Left + 2, (Rect.Top + Rect.Bottom - FImages.Height) div 2, ImageIndex and $00FFFFFF, OverlayIndex) else FImages.Draw(Canvas, Rect.Left + 2, (Rect.Top + Rect.Bottom - FImages.Height) div 2, ImageIndex); Offset := FImages.Width + 6; end; tmpR.Left := tmpR.Left + Offset - 2; //tmpR.Right := tmpR.Left + TextWidth(Items[Index]) + 4; if Items.Count > 0 then begin tmpR.Right := tmpR.Left + TextWidth(Items[Index]) + 4; end else begin tmpR.Right := tmpR.Left + 62; end; FillRect(tmpR); //TextOut(Rect.Left + Offset, Rect.Top, Items[Index]); if Items.Count > 0 then TextOut(Rect.Left + Offset, Rect.Top, Items[Index]); if odFocused in State then DrawFocusRect(tmpR); end; end; |
|
What si a callstack ? who does call TJvFileListBox.DrawItem(0,... on empty folders ? it just should not happen... |
|
We really need a sample application showing this |
|
No news, suspending the issue |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-07-02 15:18 | surfer007 | New Issue | |
2013-07-02 15:18 | surfer007 | File Added: bug_filelistbox.bmp | |
2013-07-04 17:25 | AHUser | Note Added: 0020553 | |
2013-07-04 17:25 | AHUser | Status | new => feedback |
2013-07-05 00:36 | surfer007 | Note Added: 0020556 | |
2013-07-08 11:40 | Arioch | Note Added: 0020562 | |
2013-07-08 13:17 | surfer007 | Note Added: 0020563 | |
2013-08-31 04:00 | Arioch | Note Added: 0020611 | |
2013-12-13 11:44 | obones | Note Added: 0020798 | |
2014-12-04 16:31 | obones | Note Added: 0021115 | |
2014-12-04 16:31 | obones | Status | feedback => resolved |
2014-12-04 16:31 | obones | Resolution | open => suspended |
2014-12-04 16:31 | obones | Assigned To | => obones |