Menu

#5 Tidyobj.pas access violation on create

curlpas
open
nobody
None
5
2013-05-24
2013-05-24
L505
No

Using tidyobj.pas on Delphi 7 or Delphi 5 I get an access violation when I compile the following code:
Tidy:=tTidy.Create(nil);

I tried your 2005 version and your 2013 download. I compiled it in delphi 5 and 7 to ensure it wasn't a specific compiler causing the problem.

Any ideas?

Discussion

  • L505

    L505 - 2013-05-24

    I've narrowed the bug down to some code in the create constructor:

    tidySetAppData(fTidyDoc, Cardinal(self));

    If I comment out everything in the constructor except fTidyDoc:=tidyCreate; line then it doesn't give the access violation.

    What boggles my mind is how this access violation could go unnoticed for all the years you have been shipping this tool.. there is something funny going on here.

     
  • L505

    L505 - 2013-05-24

    I think the problem is CDECL calling convention.

    In the tidy DLL they use STDCALL calling convention, so you must be using a really old tidy dll?

    After changing all the CDECL's to STDCALL, it now crashes on ParseFile.

     

    Last edit: L505 2013-05-24

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.