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
0006168 [JEDI VCL] 00 JVCL Components crash always 2013-07-15 20:12 2013-12-13 14:38
Reporter x-raymike View Status public  
Assigned To obones
Priority normal Resolution no change required  
Status resolved   Product Version 3.47
Summary 0006168: crash inside TJvHidDeviceController.DeviceChange( ) internal worker function FillInList( )
Description crash inside TJvHidDeviceController.DeviceChange( ) internal worker function FillInList( ).

all that was required to cause the error was on an acer iconia W510 tablet.

  HidCtl:=TJvHidDeviceController.Create(nil);

inside FillInList( ), it calls TJvHidDevice.CtlCreate( ) which calls HidD_GetAttributes( ) which fails when it tries to get attributes for "HID Sensor Collection". i recreated the code and made it call RaiseLastOSError( ) when the function fails. here's the list of devices it retrieved (offending device in bold).

HID-compliant device
    \\?\hid#atml1000&col01#4&2101be6d&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=03EB PID=8400
HID-compliant device
    \\?\hid#atml1000&col02#4&2101be6d&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=03EB PID=8400
HID Keyboard Device
    \\?\hid#intcfd9&col01#3&2b7a34a4&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0000 PID=0000
HID-compliant consumer control device
    \\?\hid#intcfd9&col02#3&2b7a34a4&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0000 PID=0000
HID-compliant device
    \\?\hid#intcfd9&col03#3&2b7a34a4&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0000 PID=0000
HID Keyboard Device
    \\?\hid#msft1234&col01#4&149340ea&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0402 PID=0003
HID-compliant mouse
    \\?\hid#msft1234&col02#4&149340ea&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0402 PID=0003
HID Sensor Collection
    \\?\hid#smo91d0&col01#4&1d42b6ad&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
   error: System Error. Code: 50.
The request is not supported

HID-compliant consumer control device
    \\?\hid#msft1234&col03#4&149340ea&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0402 PID=0003
HID-compliant device
    \\?\hid#smo91d0&col02#4&1d42b6ad&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0483 PID=91D1
HID-compliant device
    \\?\hid#hid_device&col01#1&2d595ca7&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=1025 PID=075A
HID-compliant device
    \\?\hid#msft1234&col04#4&149340ea&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0402 PID=0003
HID Keyboard Device
    \\?\hid#hid_device&col02#1&2d595ca7&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=1025 PID=075A
HID-compliant device
    \\?\hid#msft1234&col05#4&149340ea&0&0004#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0402 PID=0003
HID-compliant device
    \\?\hid#msft1234&col06#4&149340ea&0&0005#{4d1e55b2-f16f-11cf-88cb-001111000030}
   VID=0402 PID=0003
 

my workaround has been to modify my JVCL source as follows:

procedure TJvHidDeviceController.DeviceChange;

<snip>

  procedure FillInList;
  <snip>
  begin
    <snip>
            begin
              // fill in PnPInfo of device
              PnPInfo := TJvHidPnPInfo.Create(PnPHandle, DevData, PChar(@FunctionClassDeviceData.DevicePath));

              try
                // create HID device object and add it to the device list
                HidDev := TJvHidDevice.CtlCreate(PnPInfo, Self);
                NewList.Add(HidDev);
              except
                // some devices give an error (Win8 acer iconia W510 tablet)
              end;


              Inc(Devn);
            end;
          finally
            FreeMem(FunctionClassDeviceData);
          end;
        end;
      end;
    until not Success;
    SetupDiDestroyDeviceInfoList(PnPHandle);
  end;
Additional Information
Tags No tags attached.
Attached Files

- Relationships
related to 0005894resolvedobones HID EControllerError: Device cannot be opened 

-  Notes
(0020572)
x-raymike (reporter)
2013-07-15 20:13

thank you for all your work on JVCL!
(0020819)
obones (administrator)
2013-12-13 14:38

This is already handled in the GIT/Daily versions
Use the OnDeviceCreateError event to silently ignore the error if needed

- Issue History
Date Modified Username Field Change
2013-07-15 20:12 x-raymike New Issue
2013-07-15 20:13 x-raymike Note Added: 0020572
2013-12-13 10:58 obones Status new => acknowledged
2013-12-13 14:37 obones Relationship added related to 0005894
2013-12-13 14:38 obones Note Added: 0020819
2013-12-13 14:38 obones Status acknowledged => resolved
2013-12-13 14:38 obones Resolution open => no change required
2013-12-13 14:38 obones Assigned To => obones


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