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


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-04, 06:32 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】crash in release mode

crash in release mode
crash in release mode
hi,
i have recently updated our dwgdirect to version 1.13.1 and i am noticing that in release mode it would always crash at the "free" function. it doesn't happen in debug mode. it seems as though dwgdirect is over riding the "free" function. has anyone had this before??
here is the call stack
> ntdll.dll!7c911e58()
ntdll.dll!7c910d5c()
msvcr71.dll!free(void * pblock=0x01e44ba8) line 103 c
mfc71.dll!cstringlist::`vector deleting destructor'() + 0x43 c++
wyg.exe!006eaf9a()
01e1e434()
thanks

in which situation does it crash? are you able to reproduce the problem in our samples?
sincerely yours,
george udov
i am getting "unhandled exception at 0x7c92ae22 in wyg.exe: 0xc0000005: access violation reading location 0x0000000."
i am not able to reproduce in the sample code. i am not even running any of the dwg codes. i suspect that it maybe something not linked properly or one of the header maybe overriding the "free" function.
thanks
i have investigated this a little further. i have removed all includes and references to opendwg. the only thing i did was in visual studio under configuration properties/linker/input/additional dependencies, i added all the lib files that link to dll's, i get these errors. if i remove those lib files from dependencies, this problem doesn't happen.
one other thing was when i get this crash, and i try to replace the dll's, it seems dd_alloc.dll was in use. that means the free is infact using dd_alloc.dll's free rather than vc++'s free. even though there are no reference to opendwg.
thanks
i have notice that the odamfcappdll example in vs2003 release mode is also getting the same problem. it is generating an "unhandled exception at ... in odamfcappdll.exe: user breakpoint." the call stack looks very much like mine
ntdll.dll!7c901230()
ntdll.dll!7c96cd80()
ntdll.dll!7c96df66()
ntdll.dll!7c94a5d0()
ntdll.dll!7c9268ad()
> msvcr71.dll!free(void * pblock=0x01067948) line 103 c
mfc71.dll!cmultidoctemplate::`scalar deleting destructor'() + 0x15 c++
mfc71.dll!cdocmanager::~cdocmanager() line 1025 + 0x9 c++
mfc71.dll!cdocmanager::`vector deleting destructor'() + 0x18 c++
mfc71.dll!cwinapp::~cwinapp() line 591 c++
odamfcappdll.exe!00427f2f()
msvcr71.dll!exit(int code=0) line 303 + 0xd c
odamfcappdll.exe!0043a2ac()
kernel32.dll!7c816d4f()
please look at this. the code is very similar to what i have downloaded for version 1.13.2. if you want, i can compress the files and send it to you, but i have made no changes.
thanks
similar problem was fixed in 13.02 (currently available from web site).
sergey slezkin
i am already using 1.13.2. i have downloaded again just in case i have got the wrong files. the results are the same as before. can you please look at this problem.
thanks
do you mean that odamfcapp sample is crashing on your machine in release mode?
vladimir
quote:
originally posted by wvk
do you mean that odamfcapp sample is crashing on your machine in release mode?
yes, that is what i am saying.
does it crash on any file or just on some files?
are you sure you have not mixed 1.13.02 with 1.13.00?
how can we reproduce the problem?
vladimir
hi
i have attached odamfcappdll.exe, dd_alloc.dll and project. i notice that if i am in view/tile mode in windows explorer. all the other dll's say 1.13.2.0. however the dd_alloc.dll doesn't say anything and that dll causes the problem. this is the win32/vc2003 version. not sure if you have attached the older dd_alloc.dll with 1.13.2.0
to reproduce the problem, just open the application using odamfcappdll.vcproj. press f5 and then close odamfcappdll.zip
thanks
attached files (182.4 kb, 3 views)
(358.1 kb, 3 views)

i still cannot reproduce the crash:
i take dd_vc2003.zip from 1.13.02 distribution, unzip it, put there odamfcappdll and dd_alloc from your archive, run it and get no crash on exit.
i discovered one thing though:
dd_alloc in vc2003 distribution is indeed not a default one. that is - it was built from exalloc sample and uses experimental quickheap code. this may be the cause of your problem.
when developing our custom heap we encountered similar symptoms: it seems that while optimizing code compiler is not always correctly substitutes overloaded operator new/delete - it sometimes inline destructor call to "free", and calls overloaded new in constructor. this mix results in a crash.
this problem was encountered only in dwf libraries though. rest of the toolkit worked correctly.
anyway, you should try to replace dd_alloc with default one.
to build default dd_alloc replace exalloc.cpp contents with the following:
code:
#include <stdlib.h>
#include "odalloc.h"
extern "c"
{
allocdll_export void* odrxalloc(size_t s)
{
return ::malloc( s );
}
allocdll_export void* odrxrealloc(void* p, size_t new_size, size_t /*old_size*/)
{
return ::realloc( p, new_size );
}
allocdll_export void odrxfree(void* p)
{
::free( p );
}
} // extern "c"
and build exalloc dll.
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】when to release prints yang686526 American standards 0 2009-05-04 11:20 AM
OpenCSG-1.0.2 sample yogy vc编程 2 2007-07-22 04:43 PM


所有的时间均为北京时间。 现在的时间是 03:39 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多