Menu

FindCourseNormal() memory problem

2016-01-15
2016-01-15
  • Marko Lindqvist

    Marko Lindqvist - 2016-01-15

    I've had a random crash with current development version, with what seems like corrupted course directory name (path) when trying to load files. This is what valgrind has to say about it:

    ==30305== Invalid read of size 8
    ==30305== at 0x410E9C: operator+<double> (vectors.h:141)
    ==30305== by 0x410E9C: CCourse::FindCourseNormal(double, double) const (course.cpp:962)
    ==30305== by 0x4401B9: CControl::Init() (physics.cpp:66)
    ==30305== by 0x432342: CIntro::Enter() (intro.cpp:73)
    ==30305== by 0x451B14: EnterNextState (states.cpp:52)
    ==30305== by 0x451B14: State::Manager::Run(State&) (states.cpp:39)
    ==30305== by 0x408E87: main (main.cpp:90)
    ==30305== Address 0x38 is not stack'd, malloc'd or (recently) free'd

     
  • Marko Lindqvist

    Marko Lindqvist - 2016-01-15

    This was because course loading had failed. The cause of the coruse load failure has been fixed, but not this crash in case of such failure (if some file is not found, for example)

     

Log in to post a comment.