Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Debug: Program received signal SIGSEGV, Segmentation fault  (Read 6898 times)

0 Members and 1 Guest are viewing this topic.

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
Debug: Program received signal SIGSEGV, Segmentation fault
« on: July 26, 2008, 10:47:56 am »
Hi,  :(

I get same strange problem with a my program so try to use debug and back-running go to try debug in samples of SFML.

I get error:
Quote
Program received signal SIGSEGV, Segmentation fault

in any programs when go to use debug function of CodeBlocks.

I see that problems begin when start to use graph with
Code: [Select]
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Pong");
Probably is only a case.. I'm not an expert din debug/codeblocks so..

someone can help me please?
I just spent a lot of time for this.

I work on windows with: SFML1.3 / Code::Blocks / Mingw / gdb.exe.

I don't get any problem with simply programs that don't use library:
Code: [Select]
for ( i=1; i<=3; i=i+1 ) { printf("i=%d ",i); }

I can't found documentation about this online.. only a similar problem:
http://forums.comodo.com/bug_reports/conflict_with_gdb_debugger-t21329.0.html;msg147164


Now I make an simple code: new project with this code:
Code: [Select]
#include <SFML/Graphics.hpp>
int main() {
    sf::RenderWindow AppGr;
    return EXIT_SUCCESS;
}
and
Code: [Select]

#include <SFML/Window.hpp>
int main() {
    sf::Window App(sf::VideoMode(640, 480, 32), "SFML Window");
    return EXIT_SUCCESS;
}


This 2 simple codes have the same problem:
starting debug with initialize variable as sf::RenderWindow or sf::Window
generate SigSegV
if I remove variable init line debug can run property

Now I try other library and found that I haven't any problem
with Sockets sample in debug mode. Any debug function go right.


Thanks for any suggestion.
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)

Puck

  • Newbie
  • *
  • Posts: 8
    • View Profile
Debug: Program received signal SIGSEGV, Segmentation fault
« Reply #1 on: July 28, 2008, 04:32:30 am »
If possible you might try downloading and installing SFML from scratch. There's no reason that I know of that code should be segfaulting. I'm using the exact same code on the exact same platform (Windows/MingW/Code::Blocks) without any problems, so my best guess is a corrupt library. :?

fixus971

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • http://www.fixweb.it
Debug: Program received signal SIGSEGV, Segmentation fault
« Reply #2 on: July 28, 2008, 08:28:33 am »
Hi Puck.

All SFML programs run well on my PC.
Only when try to use GDB debugger(breakpoints) I get SigSegV.
Do you use that?

Thanks
^_^=>Il calcolatore è straordinariamente veloce, accurato e stupido. Gli uomini sono incredibilmente lenti, imprecisi e creativi. L'insieme dei due costituisce una forza incalcolabile. (Albert Einstein)