![]() |
【转帖】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::onopendocument with the following code code: bool csingledocdoc::onopendocument(lpctstr lpszpathname) { if (!cdocument::onopendocument(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~ |
所有的时间均为北京时间。 现在的时间是 06:10 PM. |