User forums > Using Code::Blocks

What might cause a program to SIGSEV in terminal but not in C::B?

(1/1)

msuaeronautics13:
I have a fairly large program developed using C::B on a Centos 6 distro.

When I compile and run the program in C::B, the program runs through to a normal end.

When I compile the program in C::B and run the binary in the terminal, the program will run but gives a segfault somewhere during execution.

My C::B environment is similar to the environment in the terminal. What else might be at play here?

stahta01:

--- Quote from: msuaeronautics13 on April 06, 2016, 03:50:42 am ---I have a fairly large program developed using C::B on a Centos 6 distro.

When I compile and run the program in C::B, the program runs through to a normal end.

When I compile the program in C::B and run the binary in the terminal, the program will run but gives a segfault somewhere during execution.

My C::B environment is similar to the environment in the terminal. What else might be at play here?

--- End quote ---

No idea about Linux; but, on windows the lib folders are added to the windows env. path. This helps the DLLs to be found.
So, I would check for missing libraries.
And, the working directory can be very different when ran inside Code::Blocks.

Tim S.

Jenna:
Do you work with files, if yes how are the paths build, and do you verify they are correctly opened before using them ?

msuaeronautics13:

--- Quote from: jens on April 06, 2016, 09:30:19 pm ---Do you work with files, if yes how are the paths build, and do you verify they are correctly opened before using them ?

--- End quote ---

I do work with files, which are selected by arguments.

I have since found that my program runs out of memory. But why is this managed much better within C::B (such that I don't get a segfault)?

Navigation

[0] Message Index

Go to full version