新增图书馆; Borland C ++ Builder没有理由地停顿

时间:2010-11-19 04:40:19

标签: c++ c++builder breakpoints access-violation

我一直在尝试在Borland C ++ Builder(在Windows XP中)的程序中使用UnderC库(提供c ++脚本功能),但它给我带来的困难,我不知道如何修复。出现的其他问题,我在网上找到了解决方案,但很难用易于搜索的单词来描述这个问题。我已经添加了(到编译器搜索路径)包含所需文件的文件夹 - “ucdl.h”和“ucc12.lib”(C ++告诉我,我需要将.lib从coff转换为omf,所以我做了;它停止给我这个错误)。我添加了行#include“ucdl.h”,现在它没有给我任何错误消息 - 但是当我运行它时,它做的第一件事是停在cpu调试窗口的中间,好像我有设置一个断点。没有断点。它没有说明为什么它停止了。如果我让它继续运行,它会给我一个访问冲突错误。有一件事可能有用也可能没有用 - 如果在cpu调试器中,我从它暂停的位置备份一行,它会重新显示可见的程序集,然后它所显示的行显示为先前开始一个字节。 当代码从它停止的地方运行时,据我所知,要到达它崩溃的地方,它(从汇编代码中)到了 ___CRTL_VCL_Init into
___CRTL_VCL_Sharemem进入
__roundToInt64(),在以下行:
00403204 FF25387B4000 jmp dword ptr [$ 00407b38]

此行前面跟着许多相似的行,指向相邻的内存位置。指针包含的地址是0x00009B47,它似乎超出了程序的范围或其他任何范围,从而产生错误。我不知道如何解决这个问题,因为它在第一次停止时没有给我任何错误(真的很奇怪),没有源代码与它给出错误的位置相关联,并且它似乎给出了错误VCL初始化区域,我不知道如何添加一个库会导致这种情况。任何想法,任何人?

哦,此外,它似乎在加载borlndmm.dll后暂停,而正常的程序继续加载更多的dll。事件日志显示:

Thread Start: Thread ID: 3028. Process ManualEventLogger.exe (4932)
Process Start: C:\Documents and Settings\Matthew\My Documents\Borland Studio Projects\Cantrips\Manual Event Logger\Debug_Build\ManualEventLogger.exe. Base Address: $00400000.     Process ManualEventLogger.exe (4932)
Module Load: ManualEventLogger.exe. Has Debug Info. Base Address: $00400000. Process ManualEventLogger.exe (4932)
Module Load: ntdll.dll. No Debug Info. Base Address: $7C900000. Process ManualEventLogger.exe (4932)
Module Load: KERNEL32.dll. No Debug Info. Base Address: $7C800000. Process ManualEventLogger.exe (4932)
Module Load: vcl100.bpl. No Debug Info. Base Address: $52000000. Process ManualEventLogger.exe (4932)
Module Load: rtl100.bpl. No Debug Info. Base Address: $51F20000. Process ManualEventLogger.exe (4932)
Module Load: OLEAUT32.dll. No Debug Info. Base Address: $77120000. Process ManualEventLogger.exe (4932)
Module Load: ADVAPI32.dll. No Debug Info. Base Address: $77DD0000. Process ManualEventLogger.exe (4932)
Module Load: RPCRT4.dll. No Debug Info. Base Address: $77E70000. Process ManualEventLogger.exe (4932)
Module Load: Secur32.dll. No Debug Info. Base Address: $77FE0000. Process ManualEventLogger.exe (4932)
Module Load: GDI32.dll. No Debug Info. Base Address: $77F10000. Process ManualEventLogger.exe (4932)
Module Load: USER32.dll. No Debug Info. Base Address: $7E410000. Process ManualEventLogger.exe (4932)
Module Load: msvcrt.dll. No Debug Info. Base Address: $77C10000. Process ManualEventLogger.exe (4932)
Module Load: ole32.dll. No Debug Info. Base Address: $774E0000. Process ManualEventLogger.exe (4932)
Module Load: VERSION.dll. No Debug Info. Base Address: $77C00000. Process ManualEventLogger.exe (4932)
Module Load: MPR.dll. No Debug Info. Base Address: $71B20000. Process ManualEventLogger.exe (4932)
Module Load: IMAGEHLP.dll. No Debug Info. Base Address: $76C90000. Process ManualEventLogger.exe (4932)
Module Load: WSOCK32.dll. No Debug Info. Base Address: $71AD0000. Process ManualEventLogger.exe (4932)
Module Load: WS2_32.dll. No Debug Info. Base Address: $71AB0000. Process ManualEventLogger.exe (4932)
Module Load: WS2HELP.dll. No Debug Info. Base Address: $71AA0000. Process ManualEventLogger.exe (4932)
Module Load: OLEACC.dll. No Debug Info. Base Address: $74C80000. Process ManualEventLogger.exe (4932)
Module Load: MSVCP60.dll. No Debug Info. Base Address: $76080000. Process ManualEventLogger.exe (4932)
Module Load: MSIMG32.dll. No Debug Info. Base Address: $76380000. Process ManualEventLogger.exe (4932)
Module Load: COMCTL32.dll. No Debug Info. Base Address: $5D090000. Process ManualEventLogger.exe (4932)
Module Load: SHELL32.dll. No Debug Info. Base Address: $7C9C0000. Process ManualEventLogger.exe (4932)
Module Load: SHLWAPI.dll. No Debug Info. Base Address: $77F60000. Process ManualEventLogger.exe (4932)
Module Load: WINSPOOL.DRV. No Debug Info. Base Address: $73000000. Process ManualEventLogger.exe (4932)
Module Load: comdlg32.dll. No Debug Info. Base Address: $763B0000. Process ManualEventLogger.exe (4932)
Module Load: oledlg.dll. No Debug Info. Base Address: $7DF70000. Process ManualEventLogger.exe (4932)
Module Load: borlndmm.dll. No Debug Info. Base Address: $21670000. Process ManualEventLogger.exe (4932)

1 个答案:

答案 0 :(得分:0)

好的......我正在弄乱设置,我在ucc12.dll(而不是.lib)上使用“在项目中添加文件”,然后选中“copy local”,将文件复制到程序的本地目录......程序工作正常。所以,它现在有效......但我仍然不知道为什么会这样,或者究竟是什么造成了之前非常奇怪的行为。如果有人对此有任何想法,我有兴趣知道。但至少该计划现在正在运作。