Embedding Pythonwin: Debug-Build CArchiv Problem

Robert Kiendl rkiendl at gmx.net
Thu May 25 15:31:27 CEST 2000


I embedded Pythonwin (Build 128 from CVS tree).

I am using the debug libs python15_d, win32ui_d, pywintypes15_d in the
Debug Build of my application.

Everything works fine. But after doing glue.DynamicApplicationInit, the
usage of CArchive inside my application crashes with a stack shown
below.

I do not have the problem in the release build, and the problem is not
there before doing glue.DynamicApplicationInit.

CRuntimeClass::Load called from CArchive::ReadClass seems to cycle over
all dynamically linked DLLs and thereby my app classes are not found
anymore when win32ui_d is attached:

	AfxLockGlobals(CRIT_DYNLINKLIST);
	for (CDynLinkLibrary* pDLL = pModuleState->m_libraryList; pDLL != NULL;
		pDLL = pDLL->m_pNextDLL)
	{
		for (pClass = pDLL->m_classList; pClass != NULL;
			pClass = pClass->m_pNextClass)
		{
			if (lstrcmpA(szClassName, pClass->m_lpszClassName) == 0)
			{
				AfxUnlockGlobals(CRIT_DYNLINKLIST);
				return pClass;
			}
		}
	}
	AfxUnlockGlobals(CRIT_DYNLINKLIST);


Does anybody have an idea?


robert

-- Call Stack -------------------

KERNEL32! RaiseException at 16 + 106 bytes
MSVCRTD! _CxxThrowException at 8 + 57 bytes
AfxThrowArchiveException(int 6, const char * 0x00c18e9c) line 95
CArchive::ReadClass(const CRuntimeClass * 0x0057fd78 struct
CRuntimeClass  FFileFormatDesc_Map::classFFileFormatDesc_Map, unsigned
int * 0x0012f898, unsigned long * 0x0012f890) line 305
CArchive::ReadObject(const CRuntimeClass * 0x0057fd78 struct
CRuntimeClass  FFileFormatDesc_Map::classFFileFormatDesc_Map) line 125 +
20 bytes
operator>>(CArchive & {...}, FFileFormatDesc_Map * & 0x00000000) line 43
+ 37 bytes
CTrafficDoc::OnOpenDocument(const char * 0x0012fc88) line 176



More information about the Python-list mailing list