[galib] segfault with galib

Acero Fernandez Alicia alicia.acero at ciemat.es
Wed May 18 11:11:48 EDT 2011


Hello,

 

I have to call a function from the objective function and something extrange happens because when I call this function the error appears and it disappears when I take out the function.

 

Could anyone help me, please?

 

Regards

 

 

________________________________

De: galib-bounces at mit.edu [mailto:galib-bounces at mit.edu] En nombre de Acero Fernandez Alicia
Enviado el: miércoles, 18 de mayo de 2011 16:09
Para: galib at mit.edu
Asunto: [galib] segfault with galib

 

 

Hello,

Could anyone help me? I am trying to use galib with a c++ code but I only get a segfault. I tried to analyse it with valgrind and I can see the following:

 

==5419== Use of uninitialised value of size 8

==5419==    at 0x41D112: ClusterSimulator::simulate(std::vector<unsigned int, std::allocator<unsigned int> > const&) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==    by 0x42E0FF: Objective(GAGenome&) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==    by 0x4417A3: GAGenome::evaluate(_GABoolean) const (GAGenome.C:83)

==5419==    by 0x43DFC8: GAPopulation::DefaultEvaluator(GAPopulation&) (GAPopulation.C:38)

==5419==    by 0x43D180: GAPopulation::evaluate(_GABoolean) (GAPopulation.h:123)

==5419==    by 0x43C500: GASimpleGA::initialize(unsigned int) (GASimpleGA.C:148)

==5419==    by 0x434A5B: GAGeneticAlgorithm::evolve(unsigned int) (GABaseGA.h:136)

==5419==    by 0x42E3D3: pruebas(std::vector<unsigned int, std::allocator<unsigned int> > const&) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==    by 0x42EB1B: main (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==

==5419== Invalid read of size 8

==5419==    at 0x41D112: ClusterSimulator::simulate(std::vector<unsigned int, std::allocator<unsigned int> > const&) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==    by 0x42E0FF: Objective(GAGenome&) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==    by 0x4417A3: GAGenome::evaluate(_GABoolean) const (GAGenome.C:83)

==5419==    by 0x43DFC8: GAPopulation::DefaultEvaluator(GAPopulation&) (GAPopulation.C:38)

==5419==    by 0x43D180: GAPopulation::evaluate(_GABoolean) (GAPopulation.h:123)

==5419==    by 0x43C500: GASimpleGA::initialize(unsigned int) (GASimpleGA.C:148)

==5419==    by 0x434A5B: GAGeneticAlgorithm::evolve(unsigned int) (GABaseGA.h:136)

==5419==    by 0x42E3D3: pruebas(std::vector<unsigned int, std::allocator<unsigned int> > const&) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==    by 0x42EB1B: main (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==  Address 0x141 is not stack'd, malloc'd or (recently) free'd

==5419==

==5419==

==5419== Process terminating with default action of signal 11 (SIGSEGV)

==5419==  Access not within mapped region at address 0x141

==5419==    at 0x41D112: ClusterSimulator::simulate(std::vector<unsigned int, std::allocator<unsigned int> > const&) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==    by 0x42E0FF: Objective(GAGenome&) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==    by 0x4417A3: GAGenome::evaluate(_GABoolean) const (GAGenome.C:83)

==5419==    by 0x43DFC8: GAPopulation::DefaultEvaluator(GAPopulation&) (GAPopulation.C:38)

==5419==    by 0x43D180: GAPopulation::evaluate(_GABoolean) (GAPopulation.h:123)

==5419==    by 0x43C500: GASimpleGA::initialize(unsigned int) (GASimpleGA.C:148)

==5419==    by 0x434A5B: GAGeneticAlgorithm::evolve(unsigned int) (GABaseGA.h:136)

==5419==    by 0x42E3D3: pruebas(std::vector<unsigned int, std::allocator<unsigned int> > const&) (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

==5419==    by 0x42EB1B: main (in /home/u5077/simulador/Scheduling/Simulator/schedulers)

---------------------------- Confidencialidad: Este mensaje y sus ficheros adjuntos se dirige exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente respondiendo al mensaje y proceda a su destrucción. Disclaimer: This message and its attached files is intended exclusively for its recipients and may contain confidential information. If you received this e-mail in error you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited and may be unlawful. In this case, please notify us by a reply and delete this email and its contents immediately. ---------------------------- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/galib/attachments/20110518/6013b7a2/attachment.htm


More information about the galib mailing list