Jump to content

c0d3r

Members
  • Content Count

    122
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by c0d3r

  1. During last whole week, I tried to find what could be possible to cause my Windows service timeout while calling TidTCPServer.Active := False, I'm using Delphi 10.4.1, codes were working fine in Delphi 2007 with Indy 9+ until we migrated to 10.4.1: procedure TMyService.OnStop(...) begin TransportServer.Close ; <-- Error 1053 occurs. end; TransportServer is a type of TkbmMWTCPIPIndyServerTransport, the Close method internally was just calling TidTCPServer.Active := False; I can't figure it out because if i don't stop the service, it would serves the client requests/responses without any issue for weeks until at the point the users want to stop the service.
  2. @Remy LebeauAlthough we still can't figure it out after weeks (we don't deal with any TCP/IP socket codes), we found a workaround: kbmMW's Server component has a property called 'DisconnectAfterResponse'. By setting it to True, Most of our clinic customers don't have any TCP/IP socket close freezing issues, however few were still having the problem, they were the large and busiest clinics. We are planning to use Indy Github version to see if it helps, I'm just wondering whats difference between GitHub version and the one comes with Sydeny?
  3. c0d3r

    [firebird] Converting DB from one charset to other

    Here you go, this is how I did exactly what you wanted: https://github.com/zedalaye/fbclone
  4. Anyone has the same problem? Delphi 10.4.2, Press Ctrl+Shift+F on any word, Find in Files screen pops up, After a bit frozne, crashed the IDE. The workaround I can only found is that: It works fine after disabling Refactor menu.
  5. c0d3r

    I will be less active for a few weeks

    Feel better!
  6. c0d3r

    Delphi 10.4.2 first impressions

    Another problem (Error Insight): ds is inherited from TDataset. The wave warning: 'Txxxxxxx does not contain a member named: 'FieldByName'/'Open'/'Free'.
  7. c0d3r

    Annoying IDE behavior changes in 10.4.2

    I can confirm all as well, went back to Classic, don't see why I should use LSP.
  8. c0d3r

    Object Inspector issue in 10.4.2??

    No issue on VMWare 16.1.0, Win10, 4K, 100%, Delphi 10.4.2
  9. c0d3r

    Delphi 10.4.2 first impressions

    It said the problem would occurs when using offline installer, but I was using web installer, still my 64bit LIBRARY (Windows) paths were wiped out.
  10. c0d3r

    WM_CHANGEUISTATE

    I saw the code in Delphi 10.4.2, but I don't see any forms flickering in Window 10.
  11. Yeah, all my win64 component paths were wiped out. Luckily, I had backup the registry before upgrade, so re-import the registry solves.
  12. @Remy Lebeau I would like to give the codes, but I'm not allow to, they are kbmMW codes, all socket threads related things are done by kbmMW components internally. What we did was just wrote codes in one of its OnRequest event handler to deal with client request by the given request name, and set the return Result. For each request, We made 100% sure to have try--finally--end blocks to have objects created get freed properly, each LockList to has a matched UnlockList to access thread string lists, ..., etc. Anyway, Thanks for your time to anwser all my questions, really appreciated! The codes in ProcessRequest event: @ServiceMethod := MethodAddress(AClientRequestName); if Assigned(ServiceMethod) then begin Result := ServiceMethod(Self, ClientIdent, Args); Handled := True; end; This one of the request codes we wrote (in published section): function TMyService.GetSequenceValue(const ClientIdent: TkbmMWClientIdentity; const Args: array of Variant): Variant; var ds: TkbmMWDataset; SeqName, Step: string; SeqList: TStringList; i: Integer; begin Result := -1; if not PrepareQuery(SEQUENCE_GETVALUE, ds) then Exit; try SeqName := VarToStr(Args[0]); Step := VarToStr(Args[1]); SeqList := FSequences.LockList; try i := SeqList.IndexOfName(SeqName); if i < 0 then Exit; SeqName := SeqList.ValueFromIndex[i]; finally FSequences.UnlockList; end; ds.Query.Text := Format(ds.Query.Text, [SeqName, Step]); ds.Open; if not ds.Eof then Result := ds.FieldByName('ID').AsInteger; finally ds.Free; end; end;
  13. @Remy Lebeau Thanks, I totally agree it. just not sure how to find. Any workarounds we can do? Is there any properties/methods in TidTCPServer that can let all these socket threads being terminated gracefully before calling FSocket.Active := False;
  14. Sorry, I didn't make it clear. its the kbmMWTCPIPIndyServerTransport that use its FSocket: TidTCPServer, to handle everything using some private/protected/public methods, including Execute event. e.g. TransportServer.Listen -> FSocket.Active := True; TransportServer.Close -> FSocket.Active := False;
  15. No Disconnect/StopListen method, only Listen and Close, and the codes were there for 10+ years since 2007, people who use our old app (built with Delphi 2007, Indy 9) are still working great. Its those people who upgraded to our new app (built with Delphi 10.4.1, Indy 10) are having the issue.
  16. As usual I sent email to Kim last week, no response. Wish me luck if I get response. Try registrating to its forum to ask questions, nope, my work email was used and can't register, try 'Forgot/Lost Password' link, Oops, your email doesn't exist. I sent email to Kim about registration issue on Sunday, lets see when I would get the response, so far no any response. EDIT: Oh, Oh, the only email I can always get from him was the email that asking me to pay the annual subscription fee on due date.
  17. Here was what I found tonight on one of our customers server: While stopping the service and timeout, there was a remote connection to the port that having FIN_WAIT_1 status (using netstat -a), What was that?
  18. @Remy Lebeau Thanks for the answers. Much appreciated. We didn't write any codes for any TidTCPServer event handlers. The TransportServer is a TkbmMWTCPIPIndyServerTransport object, it uses TIdTCPServer internally as its Socket instance. What we did was that in OnServiceStartEvent, calling TransportServer.Listen (which calls TidTCPServer.Active := True), and in OnServiceStopEvent, calling TransportServer.Close (which calls TidTCPServer.Active := False), kbmMW handles everything else underneath (dealing with client side requests/server side responses). As for TerminateWaitTime property default to 5 seconds, we never set or change it by any chance, I thought Windows service timeout was set way longer (at least 30 seconds, we tested 90 seconds in the past) than TerminateWaitTime. The hard part was that we can't reproduce on our development machines. Only some of our customers who were heavily using the servers were having the issue. We don't know how to debug at this point and where we should look at from.
  19. Yes. you can as long as fbclient.dll is the right one.
  20. Could anyone help what the warning was about, Codes was fine in Delphi2007, but not in Delphi 10.4.1: ServiceMethod: TServiceMethod; which is a type of function (Sender: TObject, ...): variant of object;
  21. c0d3r

    variable might not have been intialized?

    Figured it out, the type should be a type of function, not object function.
×