Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Native visualizer crashes when copying std::vector subclass

$
0
0

Hi,

I created simple class that extends STL vector

namespace nv
	{
	class SubVector : public std::vector<unsigned char>
		{
		public:
			SubVector();
		};
	}

I would like to display first 16 elements as hex string in one row. When native visualizer code tries to copy data it craches

DWORD nGot;
nv::SubVector s;
HRESULT hr = pHelper->ReadDebuggeeMemoryEx(pHelper, pHelper->GetRealAddress(pHelper), sizeof(s), &s, &nGot);

I tested visualizer with another test class which has member defined on heap and everything worked fine.
Pointers of SubVector are OK.

sprintf_s(pResult, maxResult, "Address %p", pHelper->GetRealAddress(pHelper));

shows address of vector in debugee process.
Another user reported same problem with VS2005 and there was no answer.

Zdenko


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>