Version: unspecified OS: MS Windows When compiling marble on windows using MSVC2008 you get this warning ..\src\lib\marblewidget.cpp(60) : warning C4717: 'Marble::sqrt' : recursive on all control paths, function will cause runtime stack overflow This appears to be exactly what happens when you pan the map by clicking on the widget edges since that causes Marble::moveStep() to get called which uses the sqrt() function. The same thing appears to happen when using the 1.1.0 binary release for windows. Reproducible: Didn't try
Seems to be this one: #ifdef Q_CC_MSVC # ifndef KDEWIN_MATH_H static long double sqrt( int a ) { return sqrt( (long double)a ); } # endif #endif Looks like a wrong attempt to fix a compiler error to me. I'll CC everyone who "git blame" thinks touched that part. I don't have a MSVC system around atm.
From what I can tell MSVC2008 seems to work fine without that bit of code. Perhaps it was added to address a bug in an older version of the compiler. What's a little puzzling is that the compiler chooses to use that sqrt function instead of one of the versions in cmath which are a better match. Adding 'std::' here to the sqrt call seems to work as well but I'm not sure how an older version of the compiler would behave. #ifdef Q_CC_MSVC # ifndef KDEWIN_MATH_H static long double sqrt( int a ) { return std::sqrt( (long double)a ); } # endif #endif
Fixed in master by commit https://projects.kde.org/projects/kde/kdeedu/marble/repository/revisions/6f59f145a2931718a8c4adb507e1dcc83f1f4d75