Menu

#215 EAccessViolation on parsing file

v0.23Beta_
open
TridenT
9
2012-07-18
2009-08-25
Ric
No

The attached file is a third party unit I'm considering using. In File Version = [0.23.0.868] I get the following exception and file parsing fails:
Parsing file : C:\Work\Delphi_libs\general_purpose\RoundToXReplacement_3c.pas
Exception EAccessViolation Access violation at address 00518784 in module 'DelphiCodeToDoc.exe'. Read of address 00000008

Delphi 7 syntax checking finds nothing wrong with the file, but the
parsing failure in version 23b appears to be caused by the location of the "end" in the construct below.
Thought you would want to know!

DecimalRoundingCtrlStrs: array [tDecimalRoundingCtrl] of
record Abbr: string[9]; Dscr: string[59]; end = (
(Abbr: 'None' ; Dscr: 'No rounding.'),
(Abbr: 'HalfEven'; Dscr: 'Round to nearest or to even digit'),
(Abbr: 'HalfOdd' ; Dscr: 'Round to nearest or to odd digit'),
(Abbr: 'HalfPos' ; Dscr: 'Round to nearest or toward positive'),
(Abbr: 'HalfNeg' ; Dscr: 'Round to nearest or toward negative'),
(Abbr: 'HalfDown'; Dscr: 'Round to nearest or toward zero'),
(Abbr: 'HalfUp' ; Dscr: 'Round to nearest or away from zero'),
(Abbr: 'RndNeg' ; Dscr: 'Round toward negative. (a.k.a. Floor)'),
(Abbr: 'RndPos' ; Dscr: 'Round toward positive. (a.k.a. Ceil)'),
(Abbr: 'RndDown' ; Dscr: 'Round toward zero. (a.k.a. Trunc)'),
(Abbr: 'RndUp' ; Dscr: 'Round away from zero.') );

Discussion

  • Ric

    Ric - 2009-08-25

    file parsing exception

     
  • TridenT

    TridenT - 2009-08-25

    ok, bug reproduced.
    it is not exactly an error from the parser. Here is what I think:
    When uncommenting the CONST keyword before the structure, DCTD throw an exception because it was searching a record type-name (and this record type has no name).

    I fixed this exception just now, with your help ! Try the daily-build executable if you want to test :
    http://dephicodetodoc.sourceforge.net/Download.htm

    Now, you can replace this CONST by a VAR, it works also perfectly.
    BUT if you delete or comment the CONST keyword, of course it does not work, because it is not a valid declaration (Delphi2009 does not compile).

    So, please, have a look to the latest 'testing' version, and tell me if it solves your issue (remember to uncomment the COnst keyword).
    And if you need more information about using DelphiCodeToDoc on your project, of if you need any help, do not hesitate to contact me.

    Thx for your help, I fixed one more bug !!!

     
  • Ric

    Ric - 2009-08-26

    I did try the daily build from yesterday and the issue is resolved. Thanks T!

     

Anonymous
Anonymous

Add attachments
Cancel