Hi, After not attracting any attention on this one I worked myself through the MemoryManager, which seems to cause all the problems. First, the part the compiler complains about doesn't make any sense to me at all. So I put the following lines in comments: memoryManager_int.h: //hmmmmmmmmmmm < this was not my comment; its not useful whatsoever size_t x = supremumValue<size_t>(); while (tmpSource != x){ tmpSource = source[tmpSource]; target[tmpTarget] = tmpSource; tmpTarget = target[tmpTarget]; } I also had to change a couple of lines above to prevent a bad memory access. Changed: target.lastValue = &target[length(source)-1]; to if (length(source) > 0) target.lastValue = &target[length(source)-1]; I also have the other bugfixes that I did submit to the bug-tracker (bug + fix) but unfortunately nobody has actually made the changes in the library so far. What I figured out: The SeedSet is instantiated as a local variable and then added to the map. That means everything is copied, at least it should, otherwise its lost when the program leaves the scope of the SeedSet. However, the memoryManager seems to recycle certain memory regions that contain seeds. At least I loose the seed data when I leave the scope. TMap map; { TSeedSet seedset(100, 0); TSeed seed(1, 2, 4); if (!addSeed(seedset, seed, Single())) ::std::cerr << "adding seed went wrong" << ::std::endl; insert(map, 0, seedset); // insert the seedset at key=0 printMap(map,-2,2); // Seeds still in map } printMap(map,-2,2); // Seeds gone from map Here, the second printMap() throws a memory access exception. The data for the seed are lost: first printMap(map,-2,2): -2 missed -1 missed 0 found 1 1-4 2-5 1 missed second printMap(map,-2,2): -2 missed -1 missed 0 found Current language: auto; currently c++ Program received signal: “EXC_BAD_ACCESS”. Any idea on how to fix this is very much appreciated since this bug proves himself a stopper. Thanks a lot! Cheers, Fabian Fabian Buske wrote: Hi, -- Fabian Buske Institute for Molecular Bioscience The University of Queensland Brisbane, Qld. 4072 Australia Phone: (61)-(7)-334-62608 |