Coder Social home page Coder Social logo

Comments (8)

mattiat avatar mattiat commented on June 23, 2024

_ the provided input.xml file works in linux but not under windows
_ "something" happens at the level of Caller::xv_step() (but only once the code is compiled for windows??)
_ under windows, the error disappears if and extra "featureDescription" is added in the input.xml

from percolator.

mattiat avatar mattiat commented on June 23, 2024

_last bit of code that gets executed is ssl::CGLS() (line 323), right before releasing some dynamic memory. Seems to be a memory allocation problem

from percolator.

mattiat avatar mattiat commented on June 23, 2024

_ error occurs if input.xml if number of "featureDescription"<=9
_ (on cerr) FeatureNames::getNumFeatures reports the correct value

from percolator.

mattiat avatar mattiat commented on June 23, 2024

_ removing empty "FragmentSpecturmScan"s in input.xml has no effect

from percolator.

mattiat avatar mattiat commented on June 23, 2024

_ cross-debugging: minGW debugger + Wine (on Fedora): -G"Eclipse CDT4 - Unix Makefiles" flag combined with minGW toolchain generates an eclipse project with .exe binaries!

from percolator.

mattiat avatar mattiat commented on June 23, 2024

Reached Wine through remote debugging with gdbserver (http://mingw-cross.sourceforge.net/cross_debug.html). gdbserver.exe distributed with minGW for windows.
_ percolator.exe now crashes at the return 0 statement of Caller::run() (executable shows different behavior on windows and emulated under wine)

from percolator.

mattiat avatar mattiat commented on June 23, 2024

_ Memory allocated by in Caller::readFiles() line 489 by xercesc::XMLPlatformUtils::Initialize() was not being freed: added call to method xercesc::XMLPlatformUtils::Terminate() in destructor of Caller object! -> SOLVED 99% of memory leaks!
http://stackoverflow.com/questions/4680191/when-calling-xmlplatformutilsinitialize-on-xerces

from percolator.

mattiat avatar mattiat commented on June 23, 2024

SOLVED: after svn training, a check of correctness is performed by Caller::pCheck, an object of static type SanityCheck. It should purposively be instantiated according to type of file used in creating the pin file given in input to Percolator. Instead, it is always assigned an object of dynamic type SqtSanityCheck. As a consequence the following implementation of function getDefaultDirection is used which assumes an sqt file was used.

SqtSanityCheck::getDefaultDirection() {
// some code
for (unsigned int ix = 0; ix < numFeatures + 1; ++ix) {
    w[set][ix] = 0;
}
// some more code
w[set][10] = -0.156; // writing to uninitialized vector position

The problem is that the above instructions assume that the pin file contains at least 10 features (as any pin file generate from sqt would). If it does not, an uninitialized position of the std::vector w[set] is accessed and a memory fault might occur (it is up to the operating system to decide how to handle the basic data structure underlying a vector).

The solution I implemented adds a method to the class Caller that takes care of initializing its SanityCheck field to the appropriate value; it does this through a (potentially extendible series of) if statement(s) so that an object of the most suitable dynamic type is instantiated. I decided not to do this inside the SanityCheck class because the information that is needed to decide which subclass to instantiate is available at the level of the Caller object. In case nothing more specific seems to apply, I instantiate an object of base class SanityCheck().

void Caller::initializeSanityCheck() {
if(otherCall.find(SqtSanityCheck::fingerPrint)!= string::npos)
    pCheck = new SqtSanityCheck();
else // if (SomeOtherSanityCheck) 
      // {pCheck = new SomeOtherSanityCheck();} else
    pCheck = new SanityCheck();
}

Resolved with commit 2b79177

EDIT: eventually moved initialization logic inside SanityCheck, commit aac5107

from percolator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.