View Issue Details

IDProjectCategoryView StatusLast Update
0002349JEDI VCL00 JVCL Componentspublic2005-01-01 08:56
ReporteranonymousAssigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
Product Version3.00 BETA 2 
Target VersionFixed in Version 
Summary0002349: JvDriveCombo - Index error if no removable Drive present
DescriptionIf a PC has no removable drive and drivetype is set to [dtremove] then there will be an error message (free translatet):

"Error reading JvDriveCombo1.ImageSize: list index exceeds maximum(0)".
Additional InformationNew laptops doesnt have a disk drive and only sometimes a card reader.
TagsNo tags attached.

Activities

user72

2004-11-30 12:33

  ~0005794

Is this with the latest version from CVS (v 1.40 in file header)?

anonymous

2004-12-01 22:36

viewer   ~0005802

The Version is:
// $Id: JvDriveCtrls.pas,v 1.40 2004/09/01 15:06:38 ahuser Exp $

user72

2004-12-02 12:11

  ~0005807

I can't reproduce this and it's very weird that it says "ImageSize: list index exceeds maximum", 'cause ImageSize is not a list, it is an enum...

anonymous

2004-12-04 00:16

viewer   ~0005823

Yes, you are right. I looked into the source code and could not find a reason. The german error message is:
"Fehler beim Lesen von TransferDrive.ImageSize: Listenindex überschreitet das Maximum(0)"
where TransferDrive is the name of the component on the form.

Could it be that the image for the first selected drive should be displayed, but there is no drive in the list (because no removable drive is in the pc) and the itemindex for the system icon image list is -1?
In the code of DriveCombo the selected drivetypes ist set to [dtfixed] if no drive is selected (at designtime). But the error is at runtime on a second pc (so there is no drive in the selectlist at runtime) which does not have a removable drive.

user72

2004-12-04 05:51

  ~0005828

> Could it be that the image for the first selected drive should be displayed,
> but there is no drive in the list (because no removable drive is in the pc)
> and the itemindex for the system icon image list is -1?
I don't think so. Even if the index is -1, the only place the image index is accessed is in the FImages.Draw call in DrawItem() and if the index is invalid, the result should be no image drawn. Besides the DrawItem never access the ImageSize property: that is only done when the imagelist is created.

Could you try creating the JvComboBox in code and see if that helps?

My problem is that I do have a removable drive (floppy), so I am trying to simulate an invalid state by setting DriveTypes to dtRamDisk (which I donät have), but I am not able to generate any error: the only thing that happens is that the combobox is empty (as it should be).

2004-12-04 10:16

 

Bild1.jpg (12,917 bytes)
Bild1.jpg (12,917 bytes)

anonymous

2004-12-04 10:17

viewer   ~0005830

Ok, i will make a test app with DriveCombo generated in code.

robert_marquardt

2004-12-26 22:37

developer   ~0006018

I have checked with floppy disabled in BIOS and got an empty list without any errors (v 1.40).
I have added dynamic drive detection to react to plugs of USB sticks etc.

anonymous

2004-12-30 12:31

viewer   ~0006041

I made a little test programm and send it to my friend with the laptop without removable drive. I set the Drivetype to [dtfixed]. My freind tried all combinations of DriveType (which he can set at runtime with checkboxes), but can not reproduce the problem with the testprogramm.
So i will try to recompile my application and sent it to my friend once again.
I am very tieredthat i can not reproduce it on my own pc, because i have at least a build in memory stick drive (it's not a trick...).
Ok, so lets close this thread until i will clearly see the problem (perhaps there is a problem with another component in combination with JvDriveCombo).

Issue History

Date Modified Username Field Change
2004-11-30 02:16 anonymous New Issue
2004-11-30 12:33 user72 Note Added: 0005794
2004-11-30 12:33 user72 Status new => feedback
2004-12-01 22:36 anonymous Note Added: 0005802
2004-12-02 12:11 user72 Note Added: 0005807
2004-12-04 00:16 anonymous Note Added: 0005823
2004-12-04 05:51 user72 Note Added: 0005828
2004-12-04 10:16 anonymous File Added: Bild1.jpg
2004-12-04 10:17 anonymous Note Added: 0005830
2004-12-26 22:37 robert_marquardt Note Added: 0006018
2004-12-30 12:31 anonymous Note Added: 0006041
2005-01-01 08:56 obones Status feedback => closed