Author Topic: SIGSEGV Error when debugging - suddenly appeared [solved]  (Read 14263 times)

Offline recobb

  • Multiple posting newcomer
  • *
  • Posts: 30
SIGSEGV Error when debugging - suddenly appeared [solved]
« on: November 12, 2010, 03:35:50 pm »
I'm using 10.05 on a 64bit XP machine, doing simple (single file) console programs.  CB has been working great, including the debugger.  Something has changed, and I can't figure it out.  Now, almost every program I have written cannot be debugged.  Even trying to run to the first line of code results in:

Error while mapping shared library sections:
Program received signal SIGSEGV, Segmentation fault.
In ?? () (C:\WINDOWS\SysWOW64\guard32.dll)


Yet these programs (many unchanged) had no problems on this machine last week.  And I've been running them in the debugger on another machine (at the office) with identical hardware/software.  I can run them, inside of CB or outside, with no errors, so long as I don't try to debug them.  I have been able to open the 'hello world' main.c default project within the debugger, but nothing more complex (so, at least the debugger still seems to be there and linked to CB).

I have created new projects and then attached the code files to them, and I even reinstalled the Codeblocks Mingw package.  I've looked through the Settings and Project options and don't see anything there other than the default values that have been there all along.  I've also completely turned off my virus/firewall (Commodo), but no joy.

What happened?

Thanks,

Richard C
« Last Edit: November 27, 2010, 02:34:52 am by recobb »

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: SIGSEGV Error when debugging - suddenly appeared
« Reply #1 on: November 12, 2010, 04:28:11 pm »
That seemed like the problem of Comodo and the windows DEP. (http://forums.comodo.com/bug-reports/mingwgdb-error-5-t25287.0.html)
Could you try to disable windows DEP?
Regards,
xunxun

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SIGSEGV Error when debugging - suddenly appeared
« Reply #2 on: November 12, 2010, 04:33:24 pm »
Can you try to debug you program with Gdb in a console?
Does that work?
If yes it is a C::B problem if not it is Gdb/System setup problem.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline recobb

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: SIGSEGV Error when debugging - suddenly appeared
« Reply #3 on: November 13, 2010, 02:19:27 am »
I guess this lets code::blocks off the hook:

(gdb) start
Breakpoint 1 at 0x403480:  line 814
Starting program: E:\Analysis\wxproj\shockspec/shockspecbatchops.exe
[New thread 4060.0x75c]
Error: dll starting at 0x77d40000 not found.
Error while mapping shared library sections:
NOT_AN_IMAGE: No such file or directory.
Error while mapping shared library sections:
C:\WINDOWS\SysWOW64\ntdll32.dll: No such file or directory.
Error: dll starting at 0x77d40000 not found.
Error: dll starting at 0x77c20000 not found.

Program received signal SIGSEGV, Segmentation fault.
0x100127d3 in ?? () from C:\WINDOWS\SysWOW64\guard32.dll


Now to go try a reboot with guard32.dll turned off in autoruns.

Offline recobb

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: SIGSEGV Error when debugging - suddenly appeared
« Reply #4 on: November 13, 2010, 02:47:10 am »
That seemed like the problem of Comodo and the windows DEP. (http://forums.comodo.com/bug-reports/mingwgdb-error-5-t25287.0.html)
Could you try to disable windows DEP?

Bingo.  I tried oBFusCATed's suggestion of running the debugger in the console - same error.  Then I disabled guard32.dll in autoruns, as suggested in the post you linked.  Still no joy.  So I combined that with Commodo's option to "Disable Defense+ Permanently (requires reboot)".  Then the debugger ran as normal.  Perhaps they updated more than the virus definitions in the past week.

Thanks to everyone for the help.  Time to talk to Commodo.

Offline recobb

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: SIGSEGV Error when debugging - suddenly appeared
« Reply #5 on: November 13, 2010, 03:10:16 am »
Found this on the Commodo forums:

http://forums.comodo.com/empty-t47299.0.html

Quote
I have found a way of making gdb run without disabling guard.dll.

You have to add gdb to the Image Execution Control exclusion list.

You do this Comodo->Defense+->Advanced->Image Execution Control Settings->Exclusions->Add->Browse...
Select gdb.exe and your problems are gone. GDB should now work perfectly...

I've tried it on a couple of programs, and so far, it seems to have fixed it.