tsmbios icon indicating copy to clipboard operation
tsmbios copied to clipboard

Access violoation in TSMBios.GetSMBiosTablesCount

Open GoogleCodeExporter opened this issue 10 years ago • 3 comments

What steps will reproduce the problem?

While trying out your cool lib I get some access violations using it in my code 
and also using the example projects.

function TSMBios.GetSMBiosTablesCount: Integer;
Var
  Index : DWORD;
  Header: TSmBiosTableHeader;
begin
  Result    := 0;
  Index     := 0;
  repeat
    {$IFDEF FPC}{$HINTS OFF}{$ENDIF}
    Move(FRawSMBIOSData.SMBIOSTableData^[Index], Header, SizeOf(Header));

--> Error occours here with an access violation because of 
FRawSMBIOSData.SMBIOSTableData is nil

    .
    .
    .


What version of the product are you using? On what operating system?
Revision 105, updated today by google code svn repository, running on Windows 
8.1 Pro, using Delphi XE 4

Please provide any additional information below.
If you need further information, please contact me, [email protected]

kind regard
Michael

Original issue reported on code.google.com by [email protected] on 19 Oct 2013 at 12:35

GoogleCodeExporter avatar Mar 14 '15 15:03 GoogleCodeExporter

I cannot reproduce your issue. Anyway maybe is related to the WMI Services or 
your permissions to access the MSSmBios_RawSMBiosTables WMI class ( The default 
mode to extract the SMBIOS info is using the WMI), you can switch to WinAPI 
just looking and commenting this line in the uSMBIOS unit {$DEFINE USEWMI} . 
Try that and let me know the results.

Original comment by [email protected] on 20 Oct 2013 at 1:10

GoogleCodeExporter avatar Mar 14 '15 15:03 GoogleCodeExporter

I see the same problem working with Lazarus 64Bit 1.0.12 on Ubuntu Precise 64 
Bit
running lazarus as root.
The same code runs without any problem compiled at Ubuntu Precise 32 Bit with 
Lazarus 32Bit (1.0.12)
The same code runs without any problem compiled at Windows7-x64 with Lazarus 
32Bit (1.0.12)
I did no tests with lazarus 64 Bit at Windows.
Is it a 32/64 Bit Problem ?


Original comment by [email protected] on 19 Feb 2014 at 4:36

GoogleCodeExporter avatar Mar 14 '15 15:03 GoogleCodeExporter

Additional observation:
running the 32bit linux binary (which works at 32bit linux) on a 64bit 
ms-surface pro with a 64 bit ubuntu) leads to an access violation too.

regards
d.oertel

Original comment by [email protected] on 19 Feb 2014 at 8:26

GoogleCodeExporter avatar Mar 14 '15 15:03 GoogleCodeExporter