Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006050 [JEDI VCL] 99 Other minor always 2012-12-20 16:35 2014-12-04 16:33
Reporter davedelage View Status public  
Assigned To obones
Priority normal Resolution suspended Platform
Status resolved   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 3.45
  Target Version Product Build
Summary 0006050: Hid Demo reset crash
Description Device reset (reset button on the external device) of the active HID device causes crash.

This code in DevReader.pas
procedure TMainForm.DevListBoxClick(Sender: TObject);
var
  I: Integer;
  Dev: TJvHidDevice;
begin
  // stop reader thread
  if Assigned(CurrentDevice) then
    CurrentDevice.OnData := nil;
  CurrentDevice := nil;
  WriteBtn.Enabled := False;
   etc....

should be

procedure TMainForm.DevListBoxClick(Sender: TObject);
var
  I: Integer;
  Dev: TJvHidDevice;
begin
  // stop reader thread
  if Assigned(CurrentDevice) then
  begin
    CurrentDevice.OnData := nil;
    CurrentDevice := nil; //thus including this line in the if-then
  end;
  WriteBtn.Enabled := False;
   etc...

Steps To Reproduce
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0020335)
obones (administrator)
2013-01-15 14:59

Can you give a bit more details on the crash itself, ie where it occurs?
(0020393)
davedelage (reporter)
2013-01-15 18:31

I'm not sure what you are requesting but I will attempt to answer.

When operating the HidDemo board from CCS, all is well until I press the Reset button on the demo board which causes an immediate crash which occurs at line 154 of DevReader.pas which is in jvcl\examples\JvHIDController\ReadWriteDemo.

In my original issue I noted not only the code in the area of the error as supplied, but the simple code change that would (and did) fix the problem.

In lay speak, don't try to set a device nil when the device doesn't exist.

Hope this helps, please let me know if I didn't actually answer your question.
(0020838)
obones (administrator)
2013-12-13 16:51

Please try again with the current GIT/daily content, I'm not seeing this code at all
(0021119)
obones (administrator)
2014-12-04 16:33

No news, suspending the issue

- Issue History
Date Modified Username Field Change
2012-12-20 16:35 davedelage New Issue
2013-01-15 14:59 obones Note Added: 0020335
2013-01-15 14:59 obones Status new => feedback
2013-01-15 18:31 davedelage Note Added: 0020393
2013-12-13 11:38 obones Status feedback => acknowledged
2013-12-13 16:51 obones Note Added: 0020838
2013-12-13 16:51 obones Status acknowledged => feedback
2014-12-04 16:33 obones Note Added: 0021119
2014-12-04 16:33 obones Status feedback => resolved
2014-12-04 16:33 obones Resolution open => suspended
2014-12-04 16:33 obones Assigned To => obones


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