0

After compiling the codes it says segmentation fault (core dumped) what is causing this segmentation fault and how can i fix it...enter image description here

1
  • what are the values of circle and rect? – Kareem Jul 1 '15 at 13:23
0

Since you didn't post all of your code but rather a code snippet, if I had to guess I would say you are trying to read a gobject that is NULL and for that reason you are getting the segmentation fault. Try running your code using valgrind line by line to see where the error occurs and adjust accordingly. To learn how to use valgrind whatch this.

4
  • rest is same as the default breakout programe – Matthew Jul 1 '15 at 9:25
  • On line 160 you use detectCollision(window, ball) but earlier instead of ball you use circle. – ChrisG Jul 1 '15 at 9:33
  • Thank U very much #Christos Gantidis ....... – Matthew Jul 1 '15 at 17:53
  • Did that solve the problem? If so you could mark the answer as correct. – ChrisG Jul 1 '15 at 17:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .