View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002889 | JEDI VCL | 00 JVCL Components | public | 2005-04-20 03:49 | 2006-06-07 03:46 |
Reporter | dbond | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0002889: Access Violation with JvNTEventLog | ||||
Description | The JvNTEventLog component repeatedly causes an access violation when used to access the local client 'System' Event log (see attached "JvNTEventLog-ScreenShot.gif"). The project used was the distributed example "JVCL\examples\JvNTEventLog\EventViewer.dpr". Error appears to be generated by line 510 of "JvNTEventLog.pas": " if LookupAccountSID(nil, SID, UserName, UserNameLen, DomainName, DomainNameLen, Use) then Result := string(DomainName) + '\' + string(UserName);" in "function TJvNTEventLogRecord.GetUsername: string;" Error Message = "Project EventViewer.exe raised exception class EAccessViolation with message 'Access violation address 77E7F912 in module 'RPCRT4.dll'. Read of address 00934000'. Process stopped. Use Step or Run to continue." RPCRT4.dll has file version "5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)" (Creation Date 10 December 2004). | ||||
Additional Information | Client/Build Operating System=Windows XP Pro (Build 2600: Service Pack 2) Compiler=Delphi 7.0 Enterprise (Build 8.1) JCL Build=JCL1.95-Build1848 (Clean Install) JVCL Build=JVCL300CompleteJCL195-Build1848 (Clean Install) | ||||
Tags | No tags attached. | ||||
2005-04-20 03:49
|
|
|
Same here, under WinXP SP1, I'm looking into it. |
|
This seems to be a big bug with the LookupAccountSID function as if you pass it 0 for the lenghts of the parameters, it does return False, but does not fill up the parameters with the required lengths. Further, it sometimes fails at item 263, then 1252... I'm not clear as to what I can do about this. |
|
Could you try again with a patched windows and the latest version of the JVCL? I tried here compiled with BDS2006 and I don't get an AV anymore. |
|
Hi there, tried with Windows XP SP2 fully patched, and JVCL 3.2 (still using Delphi Enterprise Version 7 Build 8.1) - problem still there. |
|
Hi, I SOLVED the problem: function TJvNTEventLogRecord.GetSID: PSID; begin if PEventLogRecord(FCurrentRecord)^.UserSidLength = 0 then Result := nil else Result := PSID( PChar(FCurrentRecord) + PEventLogRecord(FCurrentRecord)^.UserSidOffset); end; function TJvNTEventLogRecord.GetUsername: string; ... ... if SID = nil then // SID can be nil begin Result := 'N/A'; Exit; end; try if LookupAccountSID(nil, SID, UserName, UserNameLen, DomainName, DomainNameLen, Use) then Result := string(DomainName) + '\' + string(UserName); except result := '???'; end; end; Bye, Vor |
|
Reminder sent to: dbond, obones I solved 0002889 Bye |
|
Hi all, Yes, the fix from Vorxio fixed the problem - I managed to compile a couple of test programs looking at different logs with no issues. Many thanks to all involved (especially Vorxio) for all their hard work. Cheers, David |
|
This is now fixed in SVN |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-04-20 03:49 | dbond | New Issue | |
2005-04-20 03:49 | dbond | File Added: JvNTEventLog-ScreenShot.gif | |
2005-04-22 06:30 | obones | Note Added: 0007045 | |
2005-04-22 06:30 | obones | Status | new => confirmed |
2005-04-22 07:15 | obones | Note Added: 0007046 | |
2005-05-20 08:02 | obones | Relationship added | has duplicate 0002970 |
2005-05-20 08:03 | obones | Relationship deleted | has duplicate 0002970 |
2005-05-20 08:03 | obones | Relationship added | related to 0002970 |
2006-03-30 07:35 | obones | Note Added: 0008764 | |
2006-03-30 07:35 | obones | Status | confirmed => feedback |
2006-04-06 06:28 | dbond | Note Added: 0009008 | |
2006-05-10 09:22 | vorxio | Note Added: 0009270 | |
2006-05-10 09:26 | vorxio | Note Added: 0009271 | |
2006-05-10 10:47 | dbond | Note Added: 0009272 | |
2006-06-07 03:46 | obones | Status | feedback => resolved |
2006-06-07 03:46 | obones | Resolution | open => fixed |
2006-06-07 03:46 | obones | Assigned To | => obones |
2006-06-07 03:46 | obones | Note Added: 0009406 |