an Error message appears after mem-leaks message lazarus / 12-Debugger ---------------------------------------------------------------------- tambok · 2018-10-14 08:03 Hallo everyone and master, I tried to create a project, but found an error after the memory check message appeared less than 1 minute. then I tried to make one simple test. 1 stringgrid, 1 button and 1 opendialog. i just make  procedure: procedure TForm1.Button1Click(Sender: TObject); var   filename:String; begin   if OpenDialog1.Execute then    begin      filename:=OpenDialog1.FileName;      StringGrid1.LoadFromCSVFile(filename,',',True,0,True);    end; end; and the error still exist. Does anyone know why this error message appears? thanks tbk ---------------------------------------------------------------------- Thaddy · 2018-10-14 08:26 That code should not cause that. Try to compile with line info on as well (same page as heaptrc.) ---------------------------------------------------------------------- ASerge · 2018-10-14 08:32 Quote from: tambok on October 14, 2018, 10:03:19 amI tried to make one simple test. 1 stringgrid, 1 button and 1 opendialog. i just make  procedure: ... and the error still exist. Does anyone know why this error message appears? I did the same and there's no mistake. So either the data is unusual, or you showed us not all the source code, and the error is somewhere out there. ---------------------------------------------------------------------- tambok · 2018-10-14 11:07 Quote from: ASerge on October 14, 2018, 10:32:50 amI did the same and there's no mistake. So either the data is unusual, or you showed us not all the source code, and the error is somewhere out there. Hi ASerge, i dont know, i only created one procedure as a test and simply waited it about 1 minute. Quote from: Thaddy on October 14, 2018, 10:26:00 amThat code should not cause that. Try to compile with line info on as well (same page as heaptrc.) Hi Taddy, thank you. with line info, how to do that? tbk ---------------------------------------------------------------------- Thaddy · 2018-10-14 11:22 In lazarus: Project options --> Compiler Options -->Debugging-->Display line numbers in runtime-error backtracing (-gl) ---------------------------------------------------------------------- ASerge · 2018-10-14 11:25 Quote from: tambok on October 14, 2018, 01:07:45 pmi dont know, i only created one procedure as a test and simply waited it about 1 minute. Show the whole source code. ---------------------------------------------------------------------- Martin_fr · 2018-10-14 11:44 Do you also get the error, if you run that test app outside the IDE? (or in the IDE, using "run without debugger"?) ---------------------------------------------------------------------- tambok · 2018-10-14 12:05 Quote from: Thaddy on October 14, 2018, 01:22:43 pmIn lazarus: Project options --> Compiler Options -->Debugging-->Display line numbers in runtime-error backtracing (-gl) yes, i did that too. Quote from: ASerge on October 14, 2018, 01:25:12 pmShow the whole source code. i tried to upload File, but rejected by restrictions. But i try to upload it again. Quote from: Martin_fr on October 14, 2018, 01:44:23 pmDo you also get the error, if you run that test app outside the IDE? (or in the IDE, using "run without debugger"?) Hi Martin, thanks. i just run it inside the IDE. unfortunately, if outside the IDE, the result is not appear. tbk ---------------------------------------------------------------------- tambok · 2018-10-14 12:14 its failed again. this codes produces same error. ------------------------------ unit Unit1; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Grids,   StdCtrls; type   { TForm1 }   TForm1 = class(TForm)     Button1: TButton;     OpenDialog1: TOpenDialog;     StringGrid1: TStringGrid;     procedure Button1Click(Sender: TObject);   private   public   end; var   Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject); var   filename:String; begin   if OpenDialog1.Execute then    begin      filename:=OpenDialog1.FileName;      StringGrid1.LoadFromCSVFile(filename,',',True,0,True);    end; end; end. ..................... ---------------------------------------------------------------------- Martin_fr · 2018-10-14 12:27 Quote from: tambok on October 14, 2018, 02:05:21 pmQuote from: Martin_fr on October 14, 2018, 01:44:23 pmDo you also get the error, if you run that test app outside the IDE? (or in the IDE, using "run without debugger"?) i just run it inside the IDE. unfortunately, if outside the IDE, the result is not appear. Then there may be an explanation. Some programs (can be any program, text-processing, pdf, zip, ...) install libraries that can cause crashes such as the one you got. This happens if the install hooks into the window explorer. I.e., they add entries (for certain filetypes) to the explorer context menu, or icons, or other handlers. As soon as your app uses a file-dialog, those dll will be loaded into the context of your app (because in the open file dialog, you see the files, with icons, and context menu, etc). Some of those libraries behave different (crash) if they are loaded in an app that is being debugged. Those crashes can happen at different times (after the dialog, at program termination, ...). See http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#On_Windows_Op en.2FSave.2FFile_or_System_Dialog_cause_gdb_to_crash (the description is a bit similar, but it is related) Try to set  "DisableLoadSymbolsForLibraries" to "True"  (this will sometimes prevent the issue / not always) ---------------------------------------------------------------------- tambok · 2018-10-14 13:18 Quote from: Martin_fr on October 14, 2018, 02:27:42 pmThen there may be an explanation. Some programs (can be any program, text-processing, pdf, zip, ...) install libraries that can cause crashes such as the one you got. This happens if the install hooks into the window explorer. I.e., they add entries (for certain filetypes) to the explorer context menu, or icons, or other handlers. As soon as your app uses a file-dialog, those dll will be loaded into the context of your app (because in the open file dialog, you see the files, with icons, and context menu, etc). Some of those libraries behave different (crash) if they are loaded in an app that is being debugged. Those crashes can happen at different times (after the dialog, at program termination, ...). See http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#On_Windows_Op en.2FSave.2FFile_or_System_Dialog_cause_gdb_to_crash (the description is a bit similar, but it is related) Try to set  "DisableLoadSymbolsForLibraries" to "True"  (this will sometimes prevent the issue / not always) i have set it, and the result is same. Any way thank you Martin. tbk ---------------------------------------------------------------------- Thaddy · 2018-10-14 14:36 In this case it may even be the debugger, since the pascal seems to end normally. Try running the compiled program outside the IDE. It should not SIGSEV in that case.