You are not logged in.
We have a service application which contains two WebSocket servers.
This morning the service didn't start and the following windows event log was logged:
TSynLog.AutoTable VMT entry already set
So that only gets raised in
class function TSynLog.FamilyCreate: TSynLogFamily;
...
if PPointer(PVMT)^<>nil then
raise ESynException.CreateUTF8('%.AutoTable VMT entry already set',[self]);
We can not reproduce the problem locally and from looking at the code I can't figure out how can it possibly happen, except if both services access TSynLog.Family at the same time.
Do you have any pointers/suggestions as to what could be the problem or how to avoid it ?
We have since added the following as first code in DPR file
begin
TSynLog.Family.Level := [sllException, sllExceptionOS];
TSynLog.Family.AutoFlushTimeOut := 10;
Will that perhaps indirectly fix the problem by ensuring Family is created as first thing the app does ?
Thanks for your time.
Offline
Yes, calling TSynLog.Family in one of your early initialization section would do the trick.
For a full fix, please try https://synopse.info/fossil/info/59ca8ded8f
Offline
Excellent, thanks for the help and quick reply.
Offline