Application sometimes crashes when I using filter on SQLQuery lazarus / 31-LCL ---------------------------------------------------------------------- Milsa · 2020-02-03 10:42 I am using ServerFiltered property with parameters on SQL. Application crashes SOMETIME no always. If application does not crashes then heap is correct unallocated. If it crashes, I have this log. It is problem for bug tracker or? Please help me with this. ---------------------------------------------------------------------- rvk · 2020-02-03 10:45 Quote from: Milsa on February 03, 2020, 11:42:40 amIf it crashes, I have this log. It is problem for bug tracker or? The stacktrace isn't really useful at this moment. It only means you didn't catch an exception and a lot of things didn't get freed because of it. Maybe you can show the code where you set the ServerFiltered and put correct exception handling around it (so it will provide a useful message). Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i try  // do your thingexcept  on E: Exception do    Showmessage(E.Message);end; ---------------------------------------------------------------------- Milsa · 2020-02-20 06:27 I have active exception handler for stack trace: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TFormMain.CustomExceptionHandler(Sender: TObject; E: Exception);begin  DumpExceptionCallStack(E);end; But this doesn't create any file. Exception handler with try except doesn't catch any exception too. Application still crashes. Why? I think that application crashes because bug is in filter but I have not any log except this heap tracing. ---------------------------------------------------------------------- PascalDragon · 2020-02-20 08:04 DumpExceptionCallStack dumps the stack trace to StdOut. ---------------------------------------------------------------------- Milsa · 2020-02-20 09:00 Excuse me. It is my custom procedure. This is it: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure DumpExceptionCallStack(E: Exception);var  f: Text;  i: integer;  Frames: PPointer;  Message: string;  Report: string;begin  Message :=    E.Message + LineEnding + LineEnding +    'Stacktrace:' + LineEnding;  if E <> nil then  begin    Report :=      'Date and time: ' + DateTimeToStr(Now) + LineEnding +      'Exception class: ' + E.ClassName + LineEnding +      'Message: ' + E.Message + LineEnding;  end;  Report := Report + '1:' + BackTraceStrFunc(ExceptAddr);  Frames := ExceptFrames;  for i := 0 to ExceptFrameCount - 1 do    Report := Report + LineEnding +      IntToStr(i + 2) + ':' + BackTraceStrFunc(Frames[i]);  ShowMessage(Message + Report);   AssignFile(f, LogFilename);  if FileExists(LogFilename) then    Append(f)  else    Rewrite(f);  Report := Report + LineEnding + LineEnding + LineEnding;  Write(f, Report);  CloseFile(f);  //Halt;end; ---------------------------------------------------------------------- rvk · 2020-02-20 10:23 Quote from: Milsa on February 20, 2020, 10:00:28 amExcuse me. It is my custom procedure. This is it: You also have a ShowMessage in there so either you didn't set your Application.OnException or you are running in the IDE and didn't continue the program after the GDB (debugger) gave it's exception. If you run inside the IDE with debugging on, the GDB debugger first catches the exception and gives you a dialog. You need to click continue (or run again) to continue to your own exception handler. If you run outside the IDE only your own exception handler should fire. If all that doesn't work... did you set the Application.OnException correctly?