View Issue Details

IDProjectCategoryView StatusLast Update
0017419LazarusLCLpublic2011-12-01 11:24
ReporterJon Lennart AasendenAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.9.28.2Product Build 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0017419: Altering synEdit highlighter when a document is loaded causes infinite loop
DescriptionSetup:
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)
Begin
  multiSyn1.Highlighter:=synXMLighlighter;
End;


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:

synEditor.Highlighter:=NIL;
multiSyn1.Highlighter:="New highlighter here";
SynEditor.Highlighter:=multisyn1;

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
LazTarget1.0
Widgetset
Attached Files

Activities

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)
Begin
  multiSyn1.Highlighter:=synXMLighlighter;
End;

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.

-----
3)
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 0.9.28.2.

Martin Friebe

2010-10-02 18:38

manager   ~0041430

No feedback received.

The report is made for 0.9.28.2, 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