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

Author Topic: "gdb.exe has stopped responding" codeblocks  (Read 18383 times)

0 Members and 2 Guests are viewing this topic.

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« on: June 15, 2010, 10:49:15 pm »
Hi all,

I've recently switched over to SFML from SDL, ive so far found it great. The documentation and OOP style has caught my attention and my performance tests have shown it's much faster than SDL.

However i've run into a big problem. Basically I've used the code from the first tutorial, it runs fine in release, but when debugging, vista gives me the following error:

"gdb.exe has stopped responding" ... and then it tells me its looking for a solution.

Strange however, is this error doesn't appear if I comment out the main body (excluding return 0;).

code:

Code: [Select]
#include <SFML/System.hpp>
#include <iostream>

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}


I have followed the tutorial closely and have installed the recommended MinGW and auto detected it in the toolchain executables setting in codeblocks.

Can anyone help me? It would mean alot!

Thanks

Aaron

System details:
Windows Vista Home Premium 32-bit
CodeBlocks 10.05
SFML 1.6

[/code]

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #1 on: June 15, 2010, 11:16:03 pm »
also heres the console messages:

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: C:\Users\Aaron\Documents\CodeBlocksProjects\ProjectB\
Adding source dir: C:\Users\Aaron\Documents\CodeBlocksProjects\ProjectB\
Adding file: bin\Debug\ProjectB.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.0.50.20100202
Child process PID: 444
Debugger finished with status 1

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #2 on: June 16, 2010, 12:07:02 am »
Well after installing every version of MinGW and GDB I could find, I found a link to TDM's GCC/MinGW32 build.

http://sourceforge.net/projects/tdm-gcc/files/

it was pretty good actually, I didn't go for the TDM build, but it offered the most recent stable MinGW (GCC 4.5), including the most uptodate GDB (7.1). This seems to be working now, hopefully I wont come across any other compiler/debugging problems...

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #3 on: June 16, 2010, 02:54:45 am »
Quote from: "gravityapple"
Well after installing every version of MinGW and GDB I could find, I found a link to TDM's GCC/MinGW32 build.

http://sourceforge.net/projects/tdm-gcc/files/

it was pretty good actually, I didn't go for the TDM build, but it offered the most recent stable MinGW (GCC 4.5), including the most uptodate GDB (7.1). This seems to be working now, hopefully I wont come across any other compiler/debugging problems...


I recommend using the prepackaged compiler on the SFML page if you are having problems.

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #4 on: June 16, 2010, 12:47:48 pm »
Quote
I recommend using the prepackaged compiler on the SFML page if you are having problems.


Are you referring to http://www.sfml-dev.org/tutorials/mingw-with-gcc-4.4.zip

This is what I tried first that was causing the error

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #5 on: June 22, 2010, 11:08:10 pm »
Ah its happening again. Its ok when creating a simple sf::Clock, but creating an sf::Window causes "gdb.exe has stopped working".

the code is as simple as:

Code: [Select]
#include <SFML/Window.hpp>
#include <iostream>

int main(int argc, char** argv)
{
    sf::Window window;

    return 0;
}

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #6 on: June 22, 2010, 11:11:08 pm »
Also this ONLY happens in debug mode (F8).

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #7 on: June 24, 2010, 10:15:39 am »
anyone? Its strange as nobody else (google searching) has this problem

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #8 on: June 24, 2010, 04:50:10 pm »
it debugs fine if I use the static libraries. However dynamic libraries in debug (F8) causes:
Debugger finished with status 1

Juanxo

  • Newbie
  • *
  • Posts: 21
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #9 on: June 24, 2010, 07:08:50 pm »
are you using debug SFML libraries?

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #10 on: June 25, 2010, 12:04:26 am »
Yup, im using -lsfml-system-d and have put the dll inside the project directory.

Ive tried it on another machine (windows xp) and have the same problem. I'm sure something is wrong with the dll.... The static works fine.

To reproduce:
1) Download and install the most latest code::blocks (10.05) without the MinGW bundle
2) Download the recommended MinGW from tutorial 1 and extract to C:/
3) Download SFML-1.6 and extract to C:/
4) Start codeblocks and create console project
5) Goto Settings -> compiler and debugger
6) Goto Search directories, add "C:\SFML-1.6\include" to Compiler and C:\SFML-1.6\lib to Linker
7) Goto Toolchain Executables and set "C:\MinGW32" as compiler install directory
8) Paste code from Tutorial 1 (the clock code)
9) Goto SFML-1.6 lib and copy sfml-system-d.dll and put inside the project directory
10) Goto project build options and make sure its on "debug" configuration
11) Paste "SFML_DYNAMIC" into #defines
12) add "-lsfml-system-d" to linker settings -> other linker options
13) Build debug build
14) Run and see that it works without debugger
15) press F8(debug) and watch as it fails to run and returns 1.

If anyone can do those steps, please confirm if it works for you.

Xenavar

  • Newbie
  • *
  • Posts: 40
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #11 on: October 07, 2010, 06:04:12 pm »
I am having the same problem.. I was using an older version of C:B as well as SFML 1.5  but since I upgraded to the latest C:B (10.05) and SFML 1.6 the debugger won't work.

Any clue as to what causes this?

gravityapple

  • Newbie
  • *
  • Posts: 10
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #12 on: October 07, 2010, 09:16:10 pm »
nope never got it solved. I use the static libraries for debugging now. They work fine.

wilbefast

  • Newbie
  • *
  • Posts: 31
    • View Profile
    • http://wilbefast.com
"gdb.exe has stopped responding" codeblocks
« Reply #13 on: December 12, 2010, 03:56:14 pm »
bump  :?

Exactly the same problem, both on XP virtual-machine and dual-booted Windows 7. I'm trying to port my game and can't debug the various problems that have come up, because the debugger won't run  :(

simAura

  • Newbie
  • *
  • Posts: 3
    • View Profile
"gdb.exe has stopped responding" codeblocks
« Reply #14 on: February 23, 2011, 10:22:44 am »
Bump.

I also have the same issue. With normal C++ code debugging works, but when I add an SFML element, it stops working if I'm using the dynamic libraries:
Code: [Select]
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: D:\Documents and Settings\admin\My Documents\C++\Projects\test1\
Adding source dir: D:\Documents and Settings\admin\My Documents\C++\Projects\test1\
Adding file: bin\Debug\test1.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.0.50.20100202
Child process PID: 3652
Debugger finished with status 1

E.g. the clock code fails (http://www.sfml-dev.org/tutorials/1.6/window-time.php).

I have tried using both the mingw package linked in the tutorial for Code::Blocks (the above output) as well as the newest version currently available through the mingw-get installer (GDB v. 7.2).

Running SFML 1.6, Windows XP Professional, Code::Blocks 10.05.

Edit: Debugging with static libraries works, I just messed up the linking.