CAD crash when setCurDocument(pDoc)

CAD crash when setCurDocument(pDoc)

27925916
Advocate Advocate
421 Views
0 Replies
Message 1 of 1

CAD crash when setCurDocument(pDoc)

27925916
Advocate
Advocate

when I write the ARX project depends on the library compiled by VS2019, I use code below,it will crash on code"SetCurDocument"  only on CAD 2017 and later , it works ok on CAD2016 and older.

crash tooltip: "Exception thrown at 0x00007FF77A4AD148 (in acad.exe): 0xC0000005: An access violation occurred while reading location 0x0000000000000010. " 

 

 

AcApDocumentIterator  *pDocItr = acDocManagerPtr()->newAcApDocumentIterator();
for (; !pDocItr->done(); pDocItr->step())
{
 AcApDocument *pDoc = pDocItr->document();
 acDocManager->setCurDocument(pDoc);// CAD crash on this code line ""
XXX....
}

 

 

 

0 Likes
422 Views
0 Replies
  • ARX
Replies (0)