SynGen Access Violation Error

Post Reply
Yakumo500
Posts: 4
Joined: 12 Sep 2009 20:37

SynGen Access Violation Error

Post by Yakumo500 » 12 Sep 2009 20:43

Hi,

I have a problem with the SynGen.
I compiled it with Delphi 2009 but if i try to generate the highlighter in the demo directory Delphi shows an access violation error.

Can somebody send me a SynGen.exe that works?

Yakumo500
Posts: 4
Joined: 12 Sep 2009 20:37

Re: SynGen Access Violation Error

Post by Yakumo500 » 13 Sep 2009 12:01

I found the error.

File: SynGenUnit.pas
Line: 563

Replace "Lex.Origin := Stream.Memory;" with "Lex.Origin := PWideChar(String(PAnsiChar(Stream.Memory)));"
and compile.

Now it should work.

Maël
Site Admin
Posts: 936
Joined: 12 Mar 2005 14:15

Re: SynGen Access Violation Error

Post by Maël » 13 Sep 2009 17:46

Do you use Unicode SynEdit?
There is no such line in the Unicode version of SynGenUnit.pas.

Use Unicode SynEdit instead. Just making something compile or casting is not enough, it merely hides the errors.

Yakumo500
Posts: 4
Joined: 12 Sep 2009 20:37

Re: SynGen Access Violation Error

Post by Yakumo500 » 14 Sep 2009 21:56

What?

i downloaded it on this site: http://mh-nexus.de/en/unisynedit.php

Is this a wrong component?

Maël
Site Admin
Posts: 936
Joined: 12 Mar 2005 14:15

Re: SynGen Access Violation Error

Post by Maël » 14 Sep 2009 23:22

Hm, you are right the SynGen part seems to be from the Ansi version.

I'll upload the package again.

Maël
Site Admin
Posts: 936
Joined: 12 Mar 2005 14:15

Re: SynGen Access Violation Error

Post by Maël » 14 Sep 2009 23:49

Ok I updated the ZIP-package.

Post Reply