Passing of data

Requests regarding how to set up experiments in ARGoS.
Max
Posts: 20
Joined: Tue Mar 31, 2015 4:55 pm

Re: Passing of data

Postby Max » Sat Sep 19, 2015 4:24 am

hi carlo,

Thank you very much for the explanation. i have a clearer picture of how argos works, at the same time i will like to seek your advice on segmentation fault. I'm hitting this fault, the program was initialize with no problem but the moment i press the start button the program will exit and display "segmentation fault". no error during the compilation. any advice on this?

Thank you
Regards
Max

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Passing of data

Postby pincy » Sat Sep 19, 2015 4:22 pm

Hi Max,

Segmentation faults are the most common run-time errors when programming in C or C++. It means that you have errors with the management of the memory. It could be literally anything - from a pointer used without initialization, to more complex problems.

To debug a segfault you need to learn how to use a debugger. Depending on your platform, you would use gdb or lldb.

Also, you need to compile your code with debugging symbols. To do this, assuming you're using the ARGoS examples as a base, you should run the command

Code: Select all

$ cmake -DCMAKE_BUILD_TYPE=Debug .
in your build directory.

If you're a beginner, I strongly advice you to refer to a friend/colleague who can help you through the debugging process, at least the first time.

Cheers,
Carlo
I made ARGoS.

Max
Posts: 20
Joined: Tue Mar 31, 2015 4:55 pm

Re: Passing of data

Postby Max » Mon Sep 21, 2015 6:15 pm

Hi Carlo,

Found my problem that i forgot to initialize the array.

Thank you Carlo for the clear explanation on how to carried out debugging.

Cheers,
Max

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Passing of data

Postby pincy » Fri Sep 25, 2015 7:37 pm

Great news! :-)
I made ARGoS.


Return to “How to... ?”