Hi, I went through the changelog to get an idea what might have happened and I have a theory: 3.5.0 fixes a memory-management related bug in parallel search (which you seem to use, right?). And you seem to use Windows, which compiler, ...
What is a likely explanation is that this fixes triggers a potential bug in your code. Let me guess some more: you have implemented your own brancher. Does this brancher use some data structures (such as sharedarray etc?). Does the copy() function of the brancher take the Boolean share flag into account during cloning? If it is false the brancher must create an independent copy even for a shared data structure as it is going to be used in a different thread. Check also MPG about this. Could that be related? Otherwise, there is no change in memory management in Gecode. Another possible explanation might be that some allocation/deallocation is no happening in different DLLs which is not allowed on Windows (that's a well known bug in Windows). Could you test on Linux whether this happens on Linux as well? I could see that if you send me the brancher code. Cheers Christian -- Christian Schulte, www.ict.kth.se/~cschulte/ -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Maity, Ashis K Sent: Tuesday, June 14, 2011 11:59 PM To: [email protected]; [email protected] Subject: [gecode-users] Heap memory free error Hello, Recently I upgraded my Gecode from 3.4.2 to 3.5.0. I have been running my old problems to do sanity check. While many of the old problems do run fine in newer version, I am getting this strange error on some problems and can't figure out the reason. These problems still run fine when I use a server that is running old version of the Gecode. I tried cleaning, rebuilding, restarting, reloading etc. Any help is appreciated. -------------------------- HEAP[AutomatedScheduler++.exe]: Invalid Address specified to RtlFreeHeap( 00B90000, 015059B0 ) Windows has triggered a breakpoint in AutomatedScheduler++.exe. This may be due to a corruption of the heap, which indicates a bug in AutomatedScheduler++.exe or any of the DLLs it has loaded. This may also be due to the user pressing F12 while AutomatedScheduler++.exe has focus. The output window may have more diagnostic information. --- Here is the stack trace --- ntdll.dll!7c90120e() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!7c96ee31() ntdll.dll!7c96f26e() ntdll.dll!7c970456() ntdll.dll!7c94bafc() ntdll.dll!7c91a1ba() ntdll.dll!7c91a351() msvcr90.dll!78583c1b() > AutomatedScheduler++.exe!Gecode::Heap::rfree(void * p=0x015795e0) Line 332 + 0xc bytes C++ AutomatedScheduler++.exe!Gecode::Heap::free<Gecode::IntVar>(Gecode::IntVar * b=0x015795e0, unsigned long n=18) Line 385 C++ AutomatedScheduler++.exe!Gecode::Heap::free<Gecode::IntVar>(Gecode::IntVar * b=0x015795e0, int n=18) Line 402 C++ AutomatedScheduler++.exe!Gecode::ArgArrayBase<Gecode::IntVar>::~ArgArrayBase <Gecode::IntVar>() Line 1579 C++ AutomatedScheduler++.exe!Gecode::VarArgArray<Gecode::IntVar>::~VarArgArray<G ecode::IntVar>() + 0x58 bytes C++ AutomatedScheduler++.exe!Gecode::IntVarArgs::~IntVarArgs() + 0x58 bytes C++ AutomatedScheduler++.exe!Scheduler::postResourcePick() Line 213 + 0x5a bytes C++ AutomatedScheduler++.exe!Scheduler::afterResourcePick(Gecode::Space & home={...}) Line 108 C++ GecodeKernel-3-5-0-r-x86.dll!Gecode::FunctionBranch::commit() + 0xf bytes C++ GecodeKernel-3-5-0-r-x86.dll!Gecode::Space::_commit() + 0xf1 bytes C++ GecodeSearch-3-5-0-r-x86.dll!Gecode::Search::WorkerToEngine<Gecode::Search:: Sequential::BAB>::next() + 0x149 bytes C++ AutomatedScheduler++.exe!Gecode::BAB<Scheduler>::next() Line 57 + 0x20 bytes C++ AutomatedScheduler++.exe!threadFunction(void * a=0x00b965a8) Line 231 + 0xb bytes C++ AutomatedScheduler++.exe!ThreadWrapper<void *>::Execute() Line 321 + 0x18 bytes C++ AutomatedScheduler++.exe!ThreadWrapper<void *>::ThreadRoutingFunction(void * pParam=0x00b96558) Line 274 C++ msvcr90.dll!78543433() msvcr90.dll!785434c7() kernel32.dll!7c80b729() ---------------- Thanks, Ashis _______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
