Error SIGSEGV, on dblookup.inc line 158 lazarus / 8-Other ---------------------------------------------------------------------- souppatin · 2011-11-22 05:18 Greeting, i use lazarus lazarus-0.9.30-fpc-2.4.2-win32.exe and make an application. I use ZEOS for connecting to mysql database. If i run my program, sometimes i got an error External SIGSEGV on DB*component(DBEdit, DBMemo) when i hit BACKSPACE button. The debugger say error on dblookup.inc line 158. Then i upgrade my lazarus to http://sourceforge.net/projects/lazarus/f iles/Lazarus%20Windows%2032%20bits/Lazarus%200.9.30.2/lazarus- 0.9.30.2-fpc-2.4.4-win32.exe/download, but the error still exist. Does this related to this issue : http://62.166.198.202/bug_view_advanced_page.php?bug_id=19164 any idea ? thanks --------------------- EDIT : wrong error message ---------------------------------------------------------------------- BigChimp · 2011-11-22 06:22 The bug was solved in 2011-04-17 according to the bug report http://www.lazarus.freepascal.org/index.php/topic,13214.0.html, in May, mentions FPC 2.4.4 is released So if I am correct the bug should be fixed in that version. Whether it is completely fixed or whether your problem is something else is another thing, of course. An obvious thing you could try is use the built in sqldb components instead of ZEOS for a test application and see if the same bug happens there. In case nobody else has an idea, try writing a minimal test case and uploading it to the bug tracker. You can also note you suspect it is related to that other bug. Good luck ---------------------------------------------------------------------- souppatin · 2011-11-22 07:51 thank for your reply, in http://bugs.freepascal.org/changelog_page.php there is an explanation : Quote- 0019164: [IDE] TDBLookup missing call to RemoveOnKeyDownBeforeHandler in destructor (Luiz Americo) - resolved. but i can't find  RemoveOnKeyDown on destructor ---------------------------------------------------------------------- BigChimp · 2011-11-22 09:35 Oops... just now saw it seems to be a Lazarus bug, not an FPC bug... going to edit my earlier post. You can either fix it in your Lazarus sources and recompile Lazarus (Tools/Build Lazarus) or use e.g. a recent snapshot (see Daily Snapshots to the left). You can, if you want to, run multiple sets of FreePascal/Lazarus independently as long as you call lazarus with the --primary-config- path set to a separate directory that stores your Lazarus config. Edited: primary config path etc explained in wiki: http://wiki.lazarus.freepascal.org/Multiple_Lazarus For the second install you might make a shortcut (on Windows) like: Code: [Select]C:\Development\Lazarus\lazarus.exe --primary-config- path=C:\Users\\AppData\Local\lazarusdev\ You would have to set up compiler paths etc as well, but it's handy that you can just delete your development copy and download another version while being sure you always have a version of Lazarus available. If you have to recompile the Lazarus sources to fix the bug, could you upload the patch to the bug tracker as a new bug (or upload it here and I will submit it). Thanks & good luck ---------------------------------------------------------------------- BigChimp · 2011-11-22 09:49 Quote from: souppatin on November 22, 2011, 08:51:06 amthank for your reply, in http://bugs.freepascal.org/changelog_page.php there is an explanation : Quote- 0019164: [IDE] TDBLookup missing call to RemoveOnKeyDownBeforeHandler in destructor (Luiz Americo) - resolved. but i can't find  RemoveOnKeyDown on destructor I had a look at dblookup.inc (SVN fixes_2_6). If I looked at the right code: you're right there isn't any RemoveOnKeyDown. But there doesn't seem to be any Application.AddOnKeyDownBeforeHandler either, so apparently it's not needed anymore. I'm hoping somebody with some more knowledge will step in here... If you want to, you can always file a bug report, which has a higher chance of the developers looking at it (if you include a patch, those chances will increase  ) Code: [Select]constructor TDBLookup.Create(AOwner: TComponent); begin   inherited;   FDataFields := TList.Create;   FKeyFields := TList.Create;   FListLink:= TFieldDataLink.Create;   FListLink.DataSource := TDataSource.Create(Self);   FListLink.Control := Self;   FListLink.OnActiveChange := @ActiveChange;   FListLink.OnEditingChange:=@EditingChange;   //FHasLookUpField:= False;   //FListLinkTmpSetActive := False;   //FLookupCache := False; end; destructor TDBLookup.Destroy; begin   FDataFields.Destroy;   FKeyFields.Destroy;   FListLink.Destroy;   FLookupList.Free;   inherited Destroy; end; ---------------------------------------------------------------------- souppatin · 2011-11-23 04:58 i've downloaded : ftp://ftp.hu.freepascal.org/pub/lazarus/snapshots/la zarus-0.9.31-33705-20111123-src.zip, and yes there is different on dblookup.inc. i copy the new dblookup to replace the old one (http://s ourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/La zarus%200.9.30.2/lazarus-0.9.30.2-fpc-2.4.4-win32.exe/download), rebuild lazarus. will report it soon ---------------------------------------------------------------------- souppatin · 2011-11-23 06:27 REPORT: ----------- i replaced the following file : dbcalendar.inc dbcheckbox.inc dbcombobox.inc dbcustomnavigator.inc dbedit.inc dbgroupbox.inc dbimage.inc dblistbox.inc dblookup.inc dblookupcombobox.inc dblookuplistbox.inc dbmemo.inc dbradiogroup.inc dbtext.inc but the error still exist, if the application idle for sometime,,,, any idea ? ---------------------------------------------------------------------- BigChimp · 2011-11-23 07:43 If I were you, I would download the latest Lazarus snapshot, possibly in a virtual/spare machine, or using the side by side install mentioned in my post above. That or download the latest Lazarus source using SVN and FPC fixes_2_6 (from http://svn.freepascal.org/svn/fpc/branches/fixes_2_6, as using FPC trunk is not reliable at the moment for using Lazarus due to massive changes, run it side by side with your regular Lazarus copy (see post above). Write a minimal test program that still shows the error. Check if it occurs on your newer version as well. If so, upload the program with your bug description on the bug tracker. Seems like a lot of work, but after setting up the test environment, it's not so bad  Perhaps an obvious suggestion, but maybe the people at the ZEOS forum have a resolution for this issue?