查看单个帖子
旧 2009-05-07, 04:00 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】singledoc Access Violation

singledoc : access violation
singledoc : access violation
hello
i can't read any dwg file after reading dwg file with paper space.
void csingledocview::resetdevice(bool zoomextents)
{
:
m_pdevice = pgs->createdevice(); //occur 0xc0000005 access violation
:
}
dwgdirect version 2.06.01
attached files
that is - you opened the first file with singledoc example, and then, opening the second you've got an exception?
vladimir
i got the same problem
quote:
originally posted by vkalinin
that is - you opened the first file with singledoc example, and then, opening the second you've got an exception?
hi vladimir
i got the same problem.
-----------------------
tauhid
i was able to reproduce the crash.
you may use teh following fix: replace csingledocdoc:nopendocument with the following code
code:
bool csingledocdoc:nopendocument(lpctstr lpszpathname)
{
if (!cdocument:nopendocument(lpszpathname))
return false;
/**********************************************************************/
/* load the specified dwg file into the database, allow code page */
/* conversion disallow partial load. */
/**********************************************************************/
try
{
if (!m_pdb.isnull()) // clear gs model associated with the previous database
{
position pos = getfirstviewposition();
while (pos)
{
csingledocview* view = (csingledocview*)getnextview(pos);
view->m_pdevice = 0;
view->m_pprinterdevice = 0;
}
}
m_pdb = theapp.readfile(lpszpathname, true, false);
}
catch(oderror& /*e*/)
{
}
catch(userbreak)
{
return false;
}
return true;
}
vladimir
thanks vladimir
it works..
have a nice day~
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)