Tidyobj.pas access violation on create
Status: Beta
Brought to you by:
tgeek
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?
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.
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