diff --git a/indexer/feature.cpp b/indexer/feature.cpp index 259ace4c20..03666861de 100644 --- a/indexer/feature.cpp +++ b/indexer/feature.cpp @@ -869,6 +869,9 @@ void FeatureType::ReadOffsets(ArrayByteSource & src, uint8_t mask, offsets_t & o offsets[index++] = (mask & 0x01) ? ReadVarUint(src) : kInvalidOffset; mask = mask >> 1; } + + while (index < offsets.size()) + offsets[index++] = kInvalidOffset; } void FeatureType::ParseAll(int scale) const diff --git a/map/framework.cpp b/map/framework.cpp index 0b43e6fc54..924f5ebf6d 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1081,6 +1081,7 @@ void FrameWork::AddRedrawCommandSure() void FrameWork::Search(string const & text, SearchCallbackT callback) const { threads::MutexGuard lock(m_modelSyn); + SearchProcessor doClass(text, callback); m_model.ForEachFeatureWithScale(m2::RectD(MercatorBounds::minX, MercatorBounds::minY, diff --git a/map/map_tests/debug_features_test.cpp b/map/map_tests/debug_features_test.cpp new file mode 100644 index 0000000000..3460aaa061 --- /dev/null +++ b/map/map_tests/debug_features_test.cpp @@ -0,0 +1,19 @@ +#include "../../base/SRC_FIRST.hpp" + +#include "../../testing/testing.hpp" + +#include "../../indexer/features_vector.hpp" + +#include "../../platform/platform.hpp" + + +UNIT_TEST(DebugFeaturesTest_World_6941024) +{ + FilesContainerR rCont(GetPlatform().ReadPathForFile("World.mwm")); + FeaturesVector vec(rCont); + + FeatureType f; + vec.Get(6941024, f); + + f.GetLimitRect(-1); +} diff --git a/map/map_tests/map_tests.pro b/map/map_tests/map_tests.pro index 92fb587c6b..b9bf37ff8f 100644 --- a/map/map_tests/map_tests.pro +++ b/map/map_tests/map_tests.pro @@ -23,3 +23,4 @@ SOURCES += \ ../../testing/testingmain.cpp \ navigator_test.cpp \ map_foreach_test.cpp \ + debug_features_test.cpp \