vircadia-native-core icon indicating copy to clipboard operation
vircadia-native-core copied to clipboard

Apparent memory corruption in DomainContentBackupManager::setup

Open odysseus654 opened this issue 3 years ago • 2 comments

This was done on a DEBUG build of Vircadia (technically the one for PR 1361), with startup set to "domain-server + assignment-client". VIRCADIA_MEMORY_DEBUGGING was NOT set but _CRTDBG_CHECK_ALWAYS_DF IS.

I added an extra line to DocumentContentBackupManager.cpp:142 to get the backup filesize before quanzip is called (it's 242) so lines after that point may be off by one.

This error cannot be ignored, after this point there is a cascade of heap-corruption errors.

Best guess is that QTypedArrayData has an uninitialized value somewhere? Even though I have Qt symbols loaded here I can't look into the private data where the "interesting" stuff is.

 	ntdll.dll!RtlpBreakPointHeap()	Unknown
 	ntdll.dll!RtlpValidateHeapEntry()	Unknown
 	ntdll.dll!RtlValidateHeap()	Unknown
 	KernelBase.dll!HeapValidate()	Unknown
>	ucrtbased.dll!_CrtIsValidHeapPointer(const void * block) Line 1407	C++
 	ucrtbased.dll!free_dbg_nolock(void * const block, const int block_use) Line 904	C++
 	ucrtbased.dll!_free_dbg(void * block, int block_use) Line 1030	C++
 	ucrtbased.dll!free(void * block) Line 32	C++
 	Qt5Cored.dll!QArrayData::deallocate(QArrayData * data, unsigned __int64 objectSize, unsigned __int64 alignment) Line 268	C++
 	Qt5Cored.dll!QTypedArrayData<char>::deallocate(QArrayData * data) Line 240	C++
 	Qt5Cored.dll!QByteArray::operator=(const QByteArray & other) Line 1217	C++
 	Qt5Cored.dll!QRingChunk::assign(const QByteArray & qba) Line 165	C++
 	Qt5Cored.dll!QRingChunk::clear() Line 174	C++
 	Qt5Cored.dll!QRingBuffer::clear() Line 242	C++
 	Qt5Cored.dll!QIODevicePrivate::QRingBufferRef::clear() Line 110	C++
 	Qt5Cored.dll!QIODevicePrivate::seekBuffer(__int64 newPos) Line 923	C++
 	Qt5Cored.dll!QIODevice::seek(__int64 pos) Line 907	C++
 	Qt5Cored.dll!QFileDevice::seek(__int64 off) Line 412	C++
 	quazip5.dll!00007fff5c394206()	Unknown
 	quazip5.dll!00007fff5c3a16e2()	Unknown
 	quazip5.dll!00007fff5c397fe1()	Unknown
 	domain-server.exe!DomainContentBackupManager::setup() Line 145	C++
 	domain-server.exe!GenericThread::threadRoutine() Line 81	C++
 	domain-server.exe!GenericThread::initialize::__l5::<lambda>() Line 46	C++
 	domain-server.exe!QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void <lambda>(void)>::call(GenericThread::initialize::__l5::void <lambda>(void) & f, void * * arg) Line 146	C++
 	domain-server.exe!QtPrivate::Functor<void <lambda>(void),0>::call<QtPrivate::List<>,void>(GenericThread::initialize::__l5::void <lambda>(void) & f, void * __formal, void * * arg) Line 257	C++
 	domain-server.exe!QtPrivate::QFunctorSlotObject<void <lambda>(void),0,QtPrivate::List<>,void>::impl(int which, QtPrivate::QSlotObjectBase * this_, QObject * r, void * * a, bool * ret) Line 449	C++
 	Qt5Cored.dll!QtPrivate::QSlotObjectBase::call(QObject * r, void * * a) Line 398	C++
 	Qt5Cored.dll!doActivate<0>(QObject * sender, int signal_index, void * * argv) Line 3886	C++
 	Qt5Cored.dll!QMetaObject::activate(QObject * sender, const QMetaObject * m, int local_signal_index, void * * argv) Line 3947	C++
 	Qt5Cored.dll!QThread::started(QThread::QPrivateSignal _t1) Line 164	C++
 	Qt5Cored.dll!QThreadPrivate::start(void * arg) Line 404	C++
 	kernel32.dll!BaseThreadInitThunk()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

odysseus654 avatar Sep 26 '21 00:09 odysseus654

Hello! Is this still an issue?

stale[bot] avatar Mar 31 '22 18:03 stale[bot]

Hello! Is this still an issue?

stale[bot] avatar May 02 '23 21:05 stale[bot]