Author Topic: Segmentation fault (core dumped)  (Read 22672 times)

Offline cysign

  • Single posting newcomer
  • *
  • Posts: 5
Segmentation fault (core dumped)
« on: March 13, 2013, 08:57:02 am »
Hi,

while compiling and running my code codeblock tells me
Code
Segmentation fault (core dumped)

Process returned 139 (0x8B)  execution time: 0,124 s
Press ENTER to continue.

while Build log says:
Code
Executing: xterm -T j2k -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. /home/cysign/Dropbox/Teamwork/codeblocks/j2k/bin/Debug/j2k  (in /home/cysign/Dropbox/Teamwork/codeblocks/j2k/.)



Btw: How can I copy xterm-output? Is there any shortcut? And at "Logs & others" in C::B I'm only able to copy by right-click. Is there any shortcut as well?

Offline cysign

  • Single posting newcomer
  • *
  • Posts: 5
Re: Segmentation fault (core dumped)
« Reply #1 on: March 13, 2013, 09:53:55 am »
I found the solution of my problem.
In my fileio.c I forgot to add toh pointer (&) in line:
Code
fscanf(ip, "%lf %lf", &mpx[i], &mpy[i]);

Is there any solution I can make codeblocks detect such errors?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Segmentation fault (core dumped)
« Reply #2 on: March 13, 2013, 09:58:02 am »
It looks like your application crashs, nothing we can help here.

If you want to know how to copy from xterm-window, you should read the manual of xterm.

You can use other terminals if you prefer this (I use  gnome-terminal).
See "Settings -> Environment -> General settings" and http://forums.codeblocks.org/index.php/topic,17621.msg120701.html#msg12070 .

Be aware, that questions about compiling, linking and application errors are not allowed in our forum, just questions, that are directly related to C::B.
Such posts might get locked or even silently deleted.

Pleased reread the rules you have accepted when registering here: http://forums.codeblocks.org/index.php/topic,9996.0.html .

Offline cysign

  • Single posting newcomer
  • *
  • Posts: 5
Re: Segmentation fault (core dumped)
« Reply #3 on: March 13, 2013, 10:57:27 am »
All right, I should get deeper into codeblocks ;)
Thanks for your help - I'd prefer to use gnome terminal, so I'll give it a shot.