[galib] ga population - execution error...please help!!!

#SAWHNEY ADITI# aditi at pmail.ntu.edu.sg
Mon Aug 29 13:14:56 EDT 2005


hi!
I have an algorithm which uses galib. and teh algorithm work sfien for a small numeb rof genrations..till 10 n 4 memebrs of ecah population. Once i increase the number of populations i get an execution error whioch says " ACCESS violation" and when i open teh c++ debugger it  points to deconstructor of GAPopulation where we delete rind[i]. the specific machien code where the error is highlited below.
is this a memory alloctaion problem and has anyoene encountered thsi ebfore? pelase help me im depserate.
----------------------------------------------------------------------------------------------------------------------------
 GAPopulation::~GAPopulation(){
  for(unsigned int i=0; i<n; i++)
    delete rind[i];
  delete [] rind;
  delete [] sind;
  delete [] indDiv;
  delete sclscm;
  delete slct;
  delete evaldata;
}
 00433402   mov         ecx,dword ptr [this]
00433405   mov         edx,dword ptr [ecx+54h]
00433408   mov         eax,dword ptr [i]
0043340B   mov         ecx,dword ptr [edx+eax*4]
0043340E   mov         dword ptr [ebp-0Ch],ecx
00433411   mov         edx,dword ptr [ebp-0Ch]
00433414   mov         dword ptr [ebp-8],edx
00433417   cmp         dword ptr [ebp-8],0
0043341B   je          GAPopulation::~GAPopulation+5Ch (0043342f)
0043341D   push        1
0043341F   mov         eax,dword ptr [ebp-8]
00433422   mov         edx,dword ptr [eax]
00433424   mov         ecx,dword ptr [ebp-8]
00433427   call        dword ptr [edx+8]
0043342A   mov         dword ptr [ebp-38h],eax
0043342D   jmp         GAPopulation::~GAPopulation+63h (00433436)
0043342F   mov         dword ptr [ebp-38h],0

 
________________________________

From: galib-bounces at mit.edu on behalf of Jorge Seixal
Sent: Mon 8/29/2005 4:44 AM
To: galib at mit.edu
Subject: [galib] Compile GAlib with Mingw


   Hello!
 
   I tried to compile GAlib using a Mingw compiler on WinXP but I get the following errors:
 
D:/Temp/galib246/ga/GARealGenome.C:19: error: specialization of T GAAlleleSet<T>::allele() const [with T = float] after instantiation
D:/Temp/galib246/ga/GARealGenome.C:19: error: prototype for `T GAAlleleSet<T>::allele() const [with T = float]' does not match any in class `GAAlleleSet<float>'
D:/Temp/galib246/ga/GAAllele.C:231: error: candidates are: T GAAlleleSet<T>::allele(unsigned int) const [with T = float]
D:/Temp/galib246/ga/GAAllele.C:211: error:                 T GAAlleleSet<T>::allele() const [with T = float]
D:/Temp/galib246/ga/GARealGenome.C:19: error: `T GAAlleleSet<T>::allele() const [with T = float]' and `T GAAlleleSet<T>::allele() const [with T = float]' cannot be overloaded
D:/Temp/galib246/ga/GARealGenome.C:51: error: specialization of T GAAlleleSet<T>::allele(unsigned int) const [with T = float] after instantiation
D:/Temp/galib246/ga/GARealGenome.C:51: error: prototype for `T GAAlleleSet<T>::allele(unsigned int) const [with T = float]' does not match any in class `GAAlleleSet<float>'
D:/Temp/galib246/ga/GAAllele.C:231: error: candidates are: T GAAlleleSet<T>::allele(unsigned int) const [with T = float]
D:/Temp/galib246/ga/GAAllele.C:211: error:                 T GAAlleleSet<T>::allele() const [with T = float]
D:/Temp/galib246/ga/GARealGenome.C:51: error: `T GAAlleleSet<T>::allele(unsigned int) const [with T = float]' and `T GAAlleleSet<T>::allele(unsigned int) const [with T = float]' cannot be overloaded
 
   Does anyone know if there is a solution for these errors? Can GAlib be compiled using a Mingw compiler? I have limited knowledge of C++ or OO languages.
 
   Thanks for any replies.
Jorge.



More information about the galib mailing list