In the same way as a previous post (due to reinstallation of Delphi 11.2 to update from 11.1) and reinstall all TMS components.
I had a pb with TMS Logger.
Now from my project (exactly the same as before the installation), I received this exception :
GExperts Debugger Exception Notification
Project Bagueur.exe raised exception class EAccessViolation with message 'Access violation at address 00007FFA3C1F895E. Read of address FFFFFFFF94ECEE80'.
[&Filter ...] [Ignore &All this Session] [Break] [Additional &Info] [Continue]
ThreadId=14260
ProcessId=1
ThreadName=""
ExceptionMessage="Access violation at address 00007FFA3C1F895E. Read of address FFFFFFFF94ECEE80"
ExceptionName="EAccessViolation"
ExceptionDisplayName="$C0000005"
ExceptionAddress=7FFA3C1F895E
FileName=
LineNumber=
I made a new project with the "wrong part", but the exception doesn't exist anymore
Do I understand correctly that the same code works in a new project, but doesn't work in your existing project? If yes, I have some initial questions to try to help you:
What is the full call stack at the moment of the error?
Can you check if TMSLogger is nil right before the line that the error occurs?
I understand you could reproduce the problem in a separate, simple project. Can you then send us the sample project reproducing the issue, so we can debug and fix the issue at our side? Thank you.
Unfortunately I couldn't reproduce the issue. Should I just run the project for Win64 platform and the error should appear?
I'm not using 11.2, however. I'm using 11.1. Do you by chance has a way to test it in another Delphi version (11.1 or lower) to see if the problem still occur?
I don't see such Access Violation related to advapi32.dll. Everything just works fine here.
We also don't keep previous version installers. But what was the exact version you were using with 11.1? If it's a recent one, there weren't many changes.
Otherwise, I will try to test it when 11.2 is installed here, shouldn't take long.
do you have any advice because it is very punishing? I had to disable the logger activity.
I used Windows 10 (Version 10.0.19044 Build 19044)
I tried to go into more detail, the problem occurs into Unit TMSLoggingEventLogOutputHandler at line 133 in bold) into procedure TTMSLoggerEventLogOutputHandler.LogOutput :
{$IFDEF MSWINDOWS}
P := PWideChar(msg);
if Length(Server) = 0 then EventLog := RegisterEventSource(nil, PWideChar(Source))
else
EventLog := RegisterEventSource(PWideChar(Server), PWideChar(Source));
Follow goes to Unit System :( (line 30446)
function _UStrToPWChar(const S: UnicodeString): PWideChar;
begin
Result := Pointer(S); // Result = 'Project4.exe'
if Result = nil then
Result := @(PEmptyString(Pointer(EmptyStringW))^.Nul);
end;
goes to WinApi.Windows (line 39348) and crash
function RegisterEventSource; external advapi32 name 'RegisterEventSourceW';
and the call stack is
After this crash, and exception occurs (of course). Here the screenshot of this exception :