SIGSEGV wen running project with debugger lazarus / 12-Debugger ---------------------------------------------------------------------- Prime · 2011-12-23 19:10 Hi all, This is my setup : Windows XP SP3 (32bit), Lazarus 0.9.30.2, installed in D:\Lazarus. When I run my project by clicking the green > run button, if the debugger is enabled I get a message : "project.project1 raised an exception class "external: SIGSEGV' If I set the debugger to none, the project runs as it should, if I run the project's exe file from a console window it runs ok. I have tried this with a very simple test project : Code: [Select]unit Unit1; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls; type   { TForm1 }   TForm1 = class(TForm)     Button1: TButton;     procedure Button1Click(Sender: TObject);   private     { private declarations }   public     { public declarations }   end; var   Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject); begin   ShowMessage('Boo!'); end; end.              I created this by creating a new project dropping a button on it adding the ShowMessage to the onclick handler by clicking the button in the designer. Any idea how I can get the debugger working ? I did see a sugestion in another thread to replace gdb with a version from a previous version of Lazarus, any clues as to which one I should use ? Cheers. Phill. ---------------------------------------------------------------------- Martin_fr · 2011-12-23 19:35 If you have bitdefender or comodo, search the forum. Which antivirus do you have, have you tried "game mode" or disabling? Otherwise can you open the "debug output" window from "view" menu (befire  F9), yhen F9 and copy the output ---------------------------------------------------------------------- Prime · 2011-12-24 09:52 Quote from: Martin_fr on December 23, 2011, 08:35:37 pmIf you have bitdefender or comodo, search the forum. Nope have neither of those.... QuoteWhich antivirus do you have, have you tried "game mode" or disabling? Otherwise can you open the "debug output" window from "view" menu (befire  F9), yhen F9 and copy the output I'll add it as an attachment, was too big to include inline.... Cheers. Phill. ---------------------------------------------------------------------- Martin_fr · 2011-12-24 12:04 Ok some background first. There is a known issue that certain programs install dll, that are loaded with every program, including yours (actually a pretty normal thing on windows) Bitdefender and comodo (at least in various versions) are known to be such programms. There is no list on others, but I heard there are some printer drivers, a mouse pad driver, .... Those dll do not behave well together with GDB. Though it is not known if it is a fault in the dll, or in GDB. When an application (yours) is started, it loads those dll, and then a crash in the dll will happen. There is currently no workaround or configuration known to avoid that. uninstalling the dll seems the only known way... And yes the same dll behaves fine in other debuggers, such as the one that comes with delphi (but even if you have that, it can not read the debug info created by fpc (afaik)) In your case the dll that is involved in the crash (if it is only one) is   CMGxSrv.dll  You can google it to find which software it belongs to. (C-Media Electronics Inc.) *stopped,reason="signal-received",signal-name="SIGSEGV",signal- meaning="Segmentation fault",frame={addr="0x100097a3",func="CMGxSrv!?r emoveCOMHook@@YAHXZ",args=[],from="C:\\WINDOWS\\system\\CMGxSrv.dll"}, thread-id="1",stopped-threads="all" ---------------------------------------------------------------------- Prime · 2011-12-24 13:26 Quote from: Martin_fr on December 24, 2011, 01:04:29 pmIn your case the dll that is involved in the crash (if it is only one) is   CMGxSrv.dll  You can google it to find which software it belongs to. (C-Media Electronics Inc.) *stopped,reason="signal-received",signal-name="SIGSEGV",signal- meaning="Segmentation fault",frame={addr="0x100097a3",func="CMGxSrv!?r emoveCOMHook@@YAHXZ",args=[],from="C:\\WINDOWS\\system\\CMGxSrv.dll"}, thread-id="1",stopped-threads="all" Thanks, removing that dll has indeed made the debugger work, at least I'll know what to look for in the output log in future. And thanks for the speedy reply, much apreciated. Now I can get on with installing Indy, Zeos etc and trying to convert some of my Delphi projects, hoping to make them cross platform. Cheers. Phill.