SynGen Access Violation Error

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

SynGen Access Violation Error

Post by Yakumo500 »

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 »

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: 1454
Joined: 12 Mar 2005 14:15

Re: SynGen Access Violation Error

Post by Maël »

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 »

What?

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

Is this a wrong component?
Maël
Site Admin
Posts: 1454
Joined: 12 Mar 2005 14:15

Re: SynGen Access Violation Error

Post by Maël »

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: 1454
Joined: 12 Mar 2005 14:15

Re: SynGen Access Violation Error

Post by Maël »

Ok I updated the ZIP-package.
Post Reply