#1 2020-04-05 09:25:38

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,061
Website

TSynThread problem

I have a long-term problem - I randomly (the same situation as with SynDBOracle we already fix - small code changes what not related to thread termination fix it, another code changes - problem appears) can got an AV during THttpApiServer destruction - appears only under Windows+FPC64+THttpApiServer (not appears on windows with THttpServer with all other code the same). Something like this (line 59 of UB.lpr is `end.`):

20200405 06201919  1 EXCOS EExternalException (c0000005) [] at   $0000000100105121  DOTERMINATE,  line 6506 of libs/Synopse/SynCrtSock.pas
An unhandled exception occurred at $0000000100105121:
EAccessViolation: Access violation
  $0000000100105121  DOTERMINATE,  line 6506 of libs/Synopse/SynCrtSock.pas
  $0000000100080DA4
  $0000000100002126  main,  line 59 of UB.lpr

While fighting with it I found a confusing name TSynThread.fOnTerminate. TTread class already have FOnTerminate private property so I propose to rename TSynThread.fOnTerminate -> TSynThread.fOnThreadTerminate in #302
This not solve my AV problem, but helps to prevent confusing IMHO.

Last edited by mpv (2020-04-05 09:26:48)

Offline

Board footer

Powered by FluxBB