Jump to content

sp0987

Members
  • Content Count

    29
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. It means the path which contains all System.XXX.Pas files (C:\Delphi11\source)?
  2. I've heard on a few blogs that it's best to leave the sysutils.pas file interface alone. However, the issue is creating a new variable that needs to be utilized in several sysutils.pas routines.
  3. It didn't work. I have placed the folder path as first option in project search path. Is there any other areas i have to change i.e., library path in Delphi IDE-> Tools-> Options.
  4. Scenario 1: I moved the sysutils.pas file to a different location (I'm assuming it's a project folder), and I included the project's folder in the project search path. Then, during compilation, I received "[dcc32 Fatal Error] System.SysUtils.pas(35475): F2051 Unit System.Classes was compiled with a different version of System.SysUtils.FreeAndNil". Scenario 2: I placed the sysutils.pas in the base folder i.e., (C:\Delphi11\source\rtl\sys). Then, during compilation, I received a "Undeclared Identifier"
  5. The Path was right. The discussion was not about our project. It's about the working of sysutils.pas from Delphi 7 to Delphi 11.
  6. We have introduced a new variable to the interface part and a function to the implementation portion of the Delphi 11 System.Sysutils.pas, in accordance with project requirements. The freshly generated variable is not accessible to me, and when I try to access it, I get the "Undefined Identifier" error. In Delphi 7, the same procedure was effective.
  7. sp0987

    Indy HTTP server

    HTTPServer : Tidhttpserver with httpserver do begin HTTPServer.DefaultPort := 8080; HTTPServer.Bindings.Clear; HTTPServer.Bindings.Add.port := 8080; if active then stop else active. end procedure HTTPServerCommandGet(AContext: TIdContext; req: TIdHTTPRequestInfo; res: TIdHTTPResponseInfo); begin try res.SERVER := servername; res.ContentType := 'text/html;charset="UTF-8"'; res.ResponseNo := 200; log(req.httpcommand); --// If i remove this then am getting EInvalidPointer : Invalid pointer operation 17:01:23.675 - /images/RuleCOMPILEDSCRIPT.png : /images/RuleCOMPILEDSCRIPT.png for all types of files // if the req.documet is other than .png/.jpg Data := LoadDataFromFile(doc); res.ContentType := fMIMEMap.GetFileMIMEType(doc); res.ContentStream := TStringStream.Create(Data); // if the req.documet is .png/.jpg res.ContentType := fMIMEMap.GetFileMIMEType(doc); res.ContentStream := TFileStream.Create(doc, fmOpenRead or fmShareCompat); except on E: Exception do begin Log(req.URI + ' : ' + req.Document + sLineBreak + E.ClassName + ' : ' + E.Message); end; end; end Am getting EInvalidPointer : Invalid pointer operation while processing one get request to another get request. If the log(req.httpcommand) is used then am not getting any invalid pointer operation exception. Attached sample log file log - Copy.txt
  8. The problem was fixed. Objects that are created without initializing to Nil are the source of the issue. It provided AV in the most recent Delphi version, but it functioned in earlier versions. Thank you for your kind support.
  9. The destructor didn't hit before the client disconnect. When the server was opened , 4 clients were connected to the server . And when the server was idle for the keepalivetime sec's, then the clients will be disconnected using the highlighted LOC(FWSocketServer.Disconnect(Cli);). But for the last client the line will be skipped as the if condition fails and then it calls the "procedure TCustomWSocketServer.WMClientClosed(var msg: TMessage);" method using "procedure TCustomWSocketServer.WndProc(var MsgRec: TMessage);" Here when calling client.free, the AV appears. In this total execution, the client destructor wasn't called before the client disconnect.
  10. Am attaching the call stack. Hope so it serves to narrow down the issue Call Stack.docx
  11. Prior to that line, the client was not free, and I changed the strings to make them compatible. It didn't stop the AV, though. Any other suggestions?
  12. Long-term client connectivity was not my intention. The clients become disconnected in accordance with the design, and that is definitely not my problem. My issue is that "we are receiving AV when the last client disconnects, which causes a server disconnect."
  13. Ours is a webserver project developed using Delphi7. It's a service based project and we need internet components in order to meet our demand to connect to the web. We have utilized "Tsslhttpserver and TICSLogger" components in our project. According to the previous discussion, the server did not disconnect after the idle period; the clients that were connected when the server was opened did. Using our Delphi 7 project, we behave in the same way. We encountered AV when we moved our project from Delphi 7 to Delphi 11. As a result of AV, we observed that the server and client would also become disconnected. Thus, to address the problem, we considered employing The values of WebServerSSL.KeepAliveTimeSec and WebServerSSL.KeepAliveTimeXferSec are equal to zero. However, it didn't resolve our problem. One by one, the clients disconnect in the "TCustomWSocketServer.WMClientClosed" process. Eventually, the client ID sets to "0," freeing the client. AV in Delphi11 appears when the last client disconnects, the client ID is set to Zero'0', and we attempt to call client.free.
  14. Am not repeating , am just making things clear so that you can understand the issue. May I know the questions which I haven't answered you.
×