View Issue Details

IDProjectCategoryView StatusLast Update
0017419LazarusLCLpublic2011-12-01 11:24
ReporterJon Lennart Aasenden Assigned ToMartin Friebe  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.9.28.2 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0017419: Altering synEdit highlighter when a document is loaded causes infinite loop
1. SynEditor
2. Multisyn componen (connect to 0000001)
3. Pascal highlighter (Connect to 0000002)
4. XML highlight (unconnected)
5. A button with the following onClick code:

Procedure TForm1.Button1Click(Sender:TObject)

Run the program and Load in an XML file (or just type a small XML snippet in the editor). Now click the button to change the highlighter in "realtime".

The entire application locks up, and if you are running from the IDE - that is locked to. All the CPU is drained, and terminating the application is the only way out (which on my PC also took with it lazarus).
Additional InformationThe way to get around this bug is to use the following code when changing highlighter on the fly:

multiSyn1.Highlighter:="New highlighter here";

There seem to be something funky going on in the notification between components. This type of bug is not uncommon in Delphi if the notification code is sloppy.
TagsNo tags attached.
Fixed in Revision27545
Attached Files


Juha Manninen

2010-09-15 11:27

developer   ~0041104

Does it happen also with the latest development version, 0.9.29?

Bart Broersma

2010-09-15 13:57

developer   ~0041112

This code:

Procedure TForm1.Button1Click(Sender:TObject)

will not compile in 0.9.29 r27368:
Error: identifier idents no member "Highlighter"

Can you also please elaborate on "connect X with Y": what properties of either X or Y must be set to which value in order to "connect"?

Martin Friebe

2010-09-29 19:58

manager   ~0041368

Last edited: 2010-09-29 20:01

1) There is an issue (even at design time) when adding new schemes.
2) There is an issue with editing text in synedit, in the multisyn/xml setup (before changing the highlighter). Having a one line text "<x>SynEdit1", and pressing return at the end of line results in an error.

About you issue:
" multiSyn1.Highlighter:=synXMLighlighter;"

Do you mean multiSyn1.DefaultHighlighter ?

I am not able to reproduce an error while changing the default highlighter, please attach a sample project, including sample text for synedit.

As ask by Juha: please test with a recent snapshot of 0.9.29 (not older than 1 month).
The multisyn had many changes after

Martin Friebe

2010-10-02 18:38

manager   ~0041430

No feedback received.

The report is made for, SynMultiSyn was changed since. It appears the bug described does no longer exist.

The additionally discovered issues are fixed in rev 27545

Please test and close if ok

Issue History

Date Modified Username Field Change
2010-09-15 10:57 Jon Lennart Aasenden New Issue
2010-09-15 10:57 Jon Lennart Aasenden Widgetset => Carbon
2010-09-15 11:27 Juha Manninen LazTarget => -
2010-09-15 11:27 Juha Manninen Note Added: 0041104
2010-09-15 11:27 Juha Manninen Status new => feedback
2010-09-15 13:57 Bart Broersma Note Added: 0041112
2010-09-29 19:47 Martin Friebe Status feedback => assigned
2010-09-29 19:47 Martin Friebe Assigned To => Martin Friebe
2010-09-29 19:58 Martin Friebe LazTarget - => 1.0
2010-09-29 19:58 Martin Friebe Note Added: 0041368
2010-09-29 19:58 Martin Friebe Status assigned => feedback
2010-09-29 20:01 Martin Friebe Note Edited: 0041368
2010-09-29 20:01 Martin Friebe Note Edited: 0041368
2010-10-02 18:38 Martin Friebe Fixed in Revision => 27545
2010-10-02 18:38 Martin Friebe Widgetset Carbon =>
2010-10-02 18:38 Martin Friebe Status feedback => resolved
2010-10-02 18:38 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2010-10-02 18:38 Martin Friebe Resolution open => fixed
2010-10-02 18:38 Martin Friebe Note Added: 0041430
2010-10-02 18:38 Martin Friebe Target Version => 0.9.30
2011-12-01 11:24 Marc Weustink Status resolved => closed