几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】odinitialize crash in odarray when upgrading 1.12 to 1.13 (http://www.dimcax.com/hust/showthread.php?t=17737)

yang686526 2009-05-06 09:00 PM

【转帖】odinitialize crash in odarray when upgrading 1.12 to 1.13
 
odinitialize crash in odarray when upgrading 1.12 to 1.13
odinitialize crash in odarray when upgrading 1.12 to 1.13
hi!
when updating my development environment from 1.12 to 1.13 i suddenly get an access violation in odinitialize. i have copied the exsystemservices, exhostappservices, exgirasterimage and odfilebuf.h from the examples, and the core of what is done is based on the odvectorizeex example. i have also redefined ::new and ::delete as well as odrxalloc, odrxrealloc and odrxfree using the global*() functions of the win32 api.
i am using the multithreaded libraries and building with vs.net 2003 as a standard windows application. there are no other threads in play at this point.
odrx_init_static_module_map() has been called.
here is the call stack:
capture.exe!odarray<unsigned long,odmemoryallocator<unsigned long> >::copy_buffer() + 0x76 c++
capture.exe!odarray<unsigned long,odmemoryallocator<unsigned long> >::reallocator::reallocate() + 0x52 c++
capture.exe!odarray<unsigned long,odmemoryallocator<unsigned long> >::resize() + 0x72 c++
capture.exe!odarray<unsigned long,odmemoryallocator<unsigned long> >::insertat() + 0x36 c++
capture.exe!odbasedictionaryimpl<odstring,odrxobje ctptr,std::less<odstring>,odrxdictionaryitemimpl>: :insert() + 0x4b c++
capture.exe!odrxdictionaryimpl<std::less<odstring> >:utat() + 0x21a c++
capture.exe!odrxinitialize() + 0x137 c++
capture.exe!odinitialize() + 0x1c c++
> capture.exe!oda::odservices::initialize() line 58 + 0xa c++
thanks in advance..
lars wernlund
did you try standard remedies like delete .ncb, .opt + clean/rebuild?
vladimir
quote:
originally posted by wvk
did you try standard remedies like delete .ncb, .opt + clean/rebuild?
i have found the issue.. i have overridden odrxrealloc using the globalrealloc() function which returned 0. apparently there is no check for null return at this point, so there was an access violation!
cheers!


所有的时间均为北京时间。 现在的时间是 04:22 PM.