CnPack Forum


 
Subject: 发现源代码统计的一个错误
rarnu (橙子)
灌水部部长
Rank: 8Rank: 8


UID 2689
Digest Posts 11
Credits 648
Posts 209
点点分 648
Reading Access 10
Registered 2006-10-2
Status Offline
Post at 2006-10-2 08:39  Profile | Site | Blog | P.M. 
发现源代码统计的一个错误

CnPack 错误报告。

描述:
使用源代码统计时,发现如果一个工程下有许多文件,或是统计大型IntraWeb项目时,会出错。我写的那个网站包含300多个pas,统计时刚开始很流畅,统计到100多个后就卡在那里,半天不见动静,然后delphi自动关闭了。我用delphi7,IntraWeb6

错误细节:
  该错误有 80% 的概率可重现。
  该错误在多台计算机上可重现。

步骤:
1. 用delphi7打开一个包含许多pas文件的IntraWeb工程,100个pas以上就足够了
2. 在CnPack菜单下选择源代码统计的功能
3. 对整个工程进行统计
4. 如果工程足够大,统计时就卡住了

设置:
  OS: Windows XP 5.1 (Build 2600: Service Pack 2)
  CnWizards: CnWizards_D7.dll Ver: 0.8.0.217 Build 2006.08.15
  IDE: ideD700
  ComCtl32: 5.82.2900.2180

CnPack IDE 专家启用状态:
  1 = CnMessageBoxWizard
  1 = CnComponentSelector
  1 = CnTabOrderWizard
  1 = CnBookmarkWizard
  1 = CnSrcTemplate
  1 = CnEditorWizard
  1 = CnMsdnWizard
  1 = CnPas2HtmlWizard
  1 = CnReplaceWizard
  1 = CnSourceDiffWizard
  1 = CnStatWizard
  1 = CnPrefixWizard
  1 = CnAlignSizeWizard
  1 = CnCorPropWizard
  1 = CnProjectExtWizard
  1 = CnCommentCropperWizard
  1 = CnRepositoryMenuWizard
  1 = CnExplorerWizard
  1 = CnFilesSnapshotWizard
  1 = CnProcListWizard
  1 = CnUsesCleaner
  1 = CnIdeEnhanceMenuWizard
  1 = CnSrcEditorEnhance
  1 = CnFormEnhanceWizard
  1 = CnPaletteEnhanceWizard
  1 = CnCpuWinEnhanceWizard
  1 = CnWinTopRoller
  1 = CnInputHelper
  1 = CnSourceHighlight
  1 = CnDUnitWizard
  1 = CnIniFilerWizard
  1 = CnMemProfWizard

CnPack IDE 专家创建状态:
  1 = TCnMessageBoxWizard
  1 = TCnComponentSelector
  1 = TCnTabOrderWizard
  1 = TCnBookmarkWizard
  1 = TCnSrcTemplate
  1 = TCnEditorWizard
  1 = TCnMsdnWizard
  1 = TCnPas2HtmlWizard
  1 = TCnReplaceWizard
  1 = TCnSourceDiffWizard
  1 = TCnStatWizard
  1 = TCnPrefixWizard
  1 = TCnSrcEditorEnhance
  1 = TCnFormEnhanceWizard
  1 = TCnAlignSizeWizard
  1 = TCnPaletteEnhanceWizard
  1 = TCnCorPropWizard
  1 = TCnProjectExtWizard
  1 = TCnCommentCropperWizard
  1 = TCnCpuWinEnhanceWizard
  1 = TCnRepositoryMenuWizard
  1 = TCnDUnitWizard
  1 = TCnIniFilerWizard
  1 = TCnMemProfWizard
  1 = TCnExplorerWizard
  1 = TCnFilesSnapshotWizard
  1 = TCnWinTopRoller
  1 = TCnInputHelper
  1 = TCnSourceHighlight
  1 = TCnProcListWizard
  1 = TCnUsesCleaner
  1 = TCnIdeEnhanceMenuWizard

CPU:
  # Processors: 1
  Type: Intel 586 model 2 Stepping 4
  Speed: 2001.09 MHz

键盘:
  Type 0: IBM enhanced (101- or 102-key) keyboard with OEM FKeys
  Layout: 中文 (简体) - 五笔加加 () in kbdus.dll

本地化信息:
  Number of Digits: '2'
  Leading Zero: '0'
  List Separators: ','
  Grouping: '3;0'
  Decimal Separator: '.'
  Group Separator: ','
  Monetary Grouping: '3;0'
  Monetary Decimal Separator: '.'
  Monetary Group Separator: ','
Top
kendling (小冬)
高级版主
Rank: 8Rank: 8
MyvNet


Medal No.1  
UID 703
Digest Posts 5
Credits 978
Posts 580
点点分 978
Reading Access 101
Registered 2005-2-18
Location 广东
Status Offline
Post at 2006-10-2 14:52  Profile | Site | Blog | P.M.  | QQ | Yahoo!
谢谢你的报告,我们会跟进的。




小冬
http://MyvNet.com
Top
VictorWoo
灌水科科长
Rank: 3Rank: 3



Medal No.1  
UID 1975
Digest Posts 1
Credits 114
Posts 98
点点分 114
Reading Access 10
Registered 2006-3-11
Location 福建
Status Offline
Post at 2006-10-9 16:42  Profile | Site | Blog | P.M.  | QQ | ICQ Status
源代码统计结果输出

--------------------------
;
文件名:Project1.dpr

所在目录:c:\Program Files\Borland\Delphi7\bin
总字节数:189
代码字节数:126
注释字节数:17
总行数:13
有效行数:10
空行数:3
代码行数:9
注释行数:2
注释块数:2

--------------------------
;
有效行和代码行有什么区别?
代码+注释字节<总字节
这些定义还不是很清楚,能否指名一下,或者在程序中有所体现?

谢谢
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2006-10-9 21:08  Profile | Blog | P.M. 
看看专家包的帮助文件?
代码加注释少于总数,是因为还有空格、空行的回车换行等。
Top
VictorWoo
灌水科科长
Rank: 3Rank: 3



Medal No.1  
UID 1975
Digest Posts 1
Credits 114
Posts 98
点点分 114
Reading Access 10
Registered 2006-3-11
Location 福建
Status Offline
Post at 2006-10-10 10:02  Profile | Site | Blog | P.M.  | QQ | ICQ Status
oic,大概明白了。。
Top
 




All times are GMT++8, the time now is 2024-11-23 21:36

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.015927 second(s), 9 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP