![]() |
【转帖】exception error on load of a new drawing
exception error on load of a new drawing
exception error on load of a new drawing i rebuild a own dll using dwgdirect 1.09 with the new version (1.10). i'm using vc6. my dll draws a dxf file in a viewer. with the new version, an error occured when i want to update the screen with a new drawing. the load process seem to correct. i can saw than the drawing is starting, but the process crashes after a moment. this is the call stack when the error occured: hyprview! oddbdatabase::getlwdisplay(void) address 0x100b37d0 hyprview! odgspaperlayouthelper::update(class odgsdcrect *) + 141 bytes hyprview! odgspaperlayouthelper::update(class odgsdcrect *) + 1151 bytes viewrepaint() line 23 + 28 bytes viewload(char * 0x00a0c390) line 306 viewers! 00461864() viewers! 00453c3a() user32! 77d43a50() user32! 77d43b1f() user32! 77d444f5() user32! 77d44525() ntdll! 77f75da3() user32! 77d4658d() viewers! 00442ff8() viewers! 00466073() kernel32! 77e814c7() this is my viewload and viewrepaint functions: int viewload(char *filename) { pdevice->eraseallviews(); pdb = svcs.readfile(filename); pdwgcontext->setdatabase(pdb); pdevice = oddbgsmanager::setupactivelayoutviews(pdevice, pdwgcontext); viewrepaint(); return(0); } void viewrepaint(void) { beforepaint(); clearwindow(); pdevice->update(null); afterpaint(); } thanks, martin groleau hypershell inc. hi, i just wondered how it worked earlier in 1.09... please try to modify your code to use different variables for your device pointer an returned by setupactivelayoutviews(): code: int myinit() { pmydevfff"> = createmydevice(); } int viewload(char *filename) { if(pdevicefff">.get()) pdevicefff">->eraseallviews(); pdb = svcs.readfile(filename); pdwgcontext->setdatabase(pdb); pdevicefff"> = oddbgsmanager:: setupactivelayoutviews(pmydevfff">, pdwgcontext); viewrepaint(); return(0); } void viewrepaint(void) { beforepaint(); clearwindow(); pdevicefff">->update(null); afterpaint(); } |
所有的时间均为北京时间。 现在的时间是 03:13 AM. |