regeneration of gsmodel causes exception in update
regeneration of gsmodel causes exception in update
hi,
i have a problem when i try to regenerate the display in order to draw arcs more precise on screen. after the regeneration the update call throws an exception. if i don't call regen() before paint() (see below) the view is rendered ok. i have tried to browse the call stack and it seems it has something to do with rendering true type fonts?
i am using version 1.13
thanks in advance,
stefan hestner
code:
void cadview::init()
{
odgsmoduleptr pgs = :

drxdynamiclinker()->loadmodule("wingdi");
odgsdeviceptr pdevice = pgs->createdevice();
enablegsmodel(true);
...
mpdevice = oddbgsmanager::setupactivelayoutviews(pdevice, this);
}
void cadview::regen()
{
mpdevice->invalidate();
if(mpdevice->gsmodel())
mpdevice->gsmodel()->invalidate(odgsmodel::kinvalidateall);
}
void cadview:

aint()
{
try {
mpdevice->update();
}
catch(...) {
<- ends up here if regen has been called
}
}
dear stephan,
is it possible to reproduce the problem in our odamfcapp sample?
could you attach the dwg file that is enough for reproducing the issue in our odamfcapp sample?
sincerely yours,
george udov
no, i don't get the same problem in odamfcapp. so i must do something wrong, but i can't find out what it is. everything else works fine until i call regen. i'm not using the doc-view model so the structure of my code is slightly different from the one in odamfcapp. not all dwg files causes the exception.
/stefan
which exception do you get? oderror? what is error code? what exactly are you seeing in the stack?
sincerely yours,
george udov
i get an access violation. i've included the call stack below.
code:
msvcr71d.dll!memmove(unsigned char * dst=0x11f75e60, unsigned char * src=0x144c5fd0, unsigned long count=72) line 171 asm
ggui.dll!memcpy(void * dest=0x11f75e60, const void * src=0x144c5fd0, unsigned int size=72) line 152 + 0x12 c++
ggui.dll!copynormals(const odgevector3d * parray=0x144c5fd0, int num=3) line 393 + 0x14 c++
ggui.dll!copyfacedata(odgifacedata & facedata={...}, const odgifacedata * pfacedata=0x0012e578, int num=3) line 432 + 0x12 c++
ggui.dll!recshell::recshell(long _nbvertex=33, const odgepoint3d * _pvertexlist=0x1240a038, long _facelistsize=36, const long * _pfacelist=0x120f0238, const odgiedgedata * _pedgedata=0x00000000, const odgifacedata * _pfacedata=0x0012e578, const odgivertexdata * _pvertexdata=0x00000000) line 582 + 0x14 c++
ggui.dll!odgimetafilerimpl::shellproc(long nbvertex=33, const odgepoint3d * pvertexlist=0x1240a038, long facelistsize=36, const long * pfacelist=0x120f0238, const odgiedgedata * pedgedata=0x00000000, const odgifacedata * pfacedata=0x0012e578, const odgivertexdata * pvertexdata=0x00000000) line 615 + 0x3e c++
ggui.dll!odgixformimpl::shellproc(long nbvertex=33, const odgepoint3d * pvertexlist=0x11e24fe8, long facelistsize=36, const long * pfacelist=0x120f0238, const odgiedgedata * pedgedata=0x00000000, const odgifacedata * pfacedata=0x0012e578, const odgivertexdata * pvertexdata=0x00000000) line 380 + 0x3f c++
ggui.dll!odtruetypefont:

utcharacter(void * data=0x117627a8, odgiconveyorgeometry * pgeom=0x0012e348) line 1379 + 0x46 c++
ggui.dll!odtruetypefont::drawcharacter(unsigned short character=56, odgepoint2d & advance={...}, odgiconveyorgeometry * pgeom=0x0012e348, odtextproperties & textflags={...}) line 1100 c++
ggui.dll!odgidefaultcontext::drawtext(odgiconveyorgeometry * pdest=0x1239216c, const odgepoint3d & position={...}, const odgevector3d & u={...}, const odgevector3d & v={...}, const char * msg=0x0f057274, long nlength=4, bool raw=true, const odgitextstyle * pstyle=0x115d8088, const odgevector3d * pextrusion=0x00000000) line 270 + 0x32 c++
ggui.dll!odgigeometrysimplifier::textproc(const odgepoint3d & position={...}, const odgevector3d & u={...}, const odgevector3d & v={...}, const char * msg=0x0f057274, long nlength=4, bool raw=true, const odgitextstyle * pstyle=0x115d8088, const odgevector3d * pextrusion=0x00000000) line 1093 + 0x3c c++
ggui.dll!odgiconveyorembranchmentimpl::textproc(const odgepoint3d & position={...}, const odgevector3d & u={...}, const odgevector3d & v={...}, const char * msg=0x0f057274, long length=4, bool raw=true, const odgitextstyle * ptextstyle=0x115d8088, const odgevector3d * pextrusion=0x00000000) line 180 + 0x33 c++
ggui.dll!odgibasevectorizer::text(const odgepoint3d & position={...}, const odgevector3d & normal={...}, const odgevector3d & direction={...}, const char * msg=0x0f057274, long length=4, bool raw=true, const odgitextstyle * pstyle=0x115dd458) line 1253 + 0x5c c++
ggui.dll!oddbmtextimpl::drawmtext(odgiworlddraw * pwd=0x115d7fb8, odmtextrendererdata & data={...}, oddbobjectid textstyleid={...}, bool braw=false, odarray<odmtextfragmentdata,odobjectsallocator<odmtextfragmentdata> > * fragments=0x116ad664, bool dodraw=true) line 1093 + 0x63 c++
ggui.dll!oddbmtext::worlddraw(odgiworlddraw * pwd=0x115d7fb8) line 2268 + 0x4e c++
ggui.dll!odgibasevectorizer::dodraw(unsigned long ndrawableflags=1, const odgidrawable * pdrawable=0x116ad548) line 808 + 0x11 c++
ggui.dll!odgsbasevectorizeview::dodraw(unsigned long ndrawableflags=1, const odgidrawable * pdrawable=0x116ad548) line 2093 c++
ggui.dll!odgibasevectorizer::draw(const odgidrawable * pdrawable=0x116ad548) line 766 + 0x1c c++
ggui.dll!odgsentitynode::update(odgsbasevectorizeview & view={...}, odgscontainernode * pparent=0x115da1b0) line 864 + 0x3a c++
ggui.dll!odgscontainernode::update(odgsbasevectorizeview & view={...}, odgscontainernode * __formal=0x00000000) line 602 + 0x15 c++
ggui.dll!odgsbasevectorizeview::display(bool bupdate=true) line 1599 + 0x13 c++
ggui.dll!odgsbasevectorizeview::update() line 1661 + 0x12 c++
ggui.dll!exgdivectorizeview::update() line 282 c++
ggui.dll!odgsbasevectorizedevice::update(odgsdcrect * __formal=0x00000000) line 193 + 0x10 c++
ggui.dll!exgsgdivectorizedevice::update(odgsdcrect * pupdatedrect=0x00000000) line 128 c++
ggui.dll!odgsmodellayouthelperimpl::update(odgsdcrect * pupdatedrect=0x00000000) line 356 + 0x1f c++
sorry to drag up an old post, but we have a dwg file that shows exactly the same problem. we also cannot reproduce in odamfcapp. we are still on 1.13.
stefan,
if you are still around, did you ever find a solution to your problem?
thanks.