View Issue Details

IDProjectCategoryView StatusLast Update
0014706LazarusIDEpublic2009-10-15 21:44
ReporterSven Barth Assigned ToMartin Friebe  
PrioritynormalSeveritymajorReproducibilityrandom
Status closedResolutionfixed 
Product Version0.9.28.1 (SVN) 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0014706: Code editor loses highlighter settings
DescriptionSometimes the code editor loses it's highlighter settings, so the files are no longer highlighted with the correct syntax highlighter (sometimes a different one is used, sometimes None). Also this does not happen with every open file. Mostly that one that is active loses it's highlighter setting.

It's not easy to reproduce.
TagsNo tags attached.
Fixed in Revision22172
LazTarget0.9.30
Widgetset
Attached Files

Activities

Martin Friebe

2009-10-02 10:57

manager   ~0031079

When it happens the next time, can you please check some details?

- "Mostly that one that is active loses":
 The one active before the new file is opened, or the newly opened file, that became active?

- Name or more important extension of all open files, and of the newly opened file(s).

- When you open further files (after it has happened), will all of them miss highlighting, some or none?

- In the context menu of the editor: "File Settings => Highlighter" and "File Settings => Encoding". What is selected? does changing the selection fix the problem (if pascal is selected, change away, and change back)

- Which options (compiler options) did you specify, to compile your version of lazarus? -O ? -O2 ? , any other?
- Which OS do you use?


* Can you start Lazarus with a log file (or with console) and check if any messages are logged/printed, when the issue happens?


Sven Barth

2009-10-13 21:07

manager   ~0031295

So... I finally managed to get to this problem again.

1) I never said that I opened a file and then that happened. Mostly it happened after changing something in a modal dialog (e. g. this time it was "compiler options"). But I also had an exception dialog some time before today's "event" (one that I just showed inside the message window... (see log))

2) open were "buildrtl.pp", "system.pp" and "fpc.cfg"

3) forgot to test, sorry

4)
- buildrtl.pp: everything normal (the file itself highlight as free pascal as expected)
- system.pp: highlight: none; encoding: utf-8
- fpc.cfg: highlight: free pascal; encoding: utf-8

5) those that are specified in a default Windows snapshot

6) Window Vista SP 2

Perhaps the other occuerences also happened after exception, I don't remember at the moment. So... perhaps this bug is a consequence of continuing execution of Lazarus...

Also I think I'll switch to final 0.9.28 release tomorrow and report back, if the problem persists (which might take some time again ^^).

2009-10-13 21:07

 

lazarus-log-highlighter.txt (10,106 bytes)   
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="C:\Users\Sven\AppData\Local\lazarus"
  SecondaryConfigPath="C:\lazarus"
FindMissingClass ConditionalOptionsFrame:TCompOptsConditionalsFrame IsInherited=False
FindMissingClass BuildModesFrame:TCompOptBuildModesFrame IsInherited=False
TMainIDE.DoLoadLFM loading nested class TCompOptBuildModesFrame needed by C:\lazarus\ide\compileroptionsdlg.pp
TMainIDE.DoLoadLFM loading nested class TCompOptsConditionalsFrame needed by C:\lazarus\ide\compileroptionsdlg.pp
TCustomFormEditor.JITListFindClass found nested class CompOptsConditionalsFrame:TCompOptsConditionalsFrame in unit C:\lazarus\packager\frames\compiler_conditionals_options.pas
TJITComponentList.ReadInlineComponent Has Stream: TCompOptsConditionalsFrame
TJITComponentList.ReadInlineComponent creating TCompOptsConditionalsFrame Owner=:TfrmCompilerOptions ...
TCustomFormEditor.JITListFindClass found nested class CompOptBuildModesFrame:TCompOptBuildModesFrame in unit C:\lazarus\packager\frames\compiler_buildmodes_options.pas
TJITComponentList.ReadInlineComponent Has Stream: TCompOptBuildModesFrame
TJITComponentList.ReadInlineComponent creating TCompOptBuildModesFrame Owner=:TfrmCompilerOptions ...
TMainIDE.CloseUnitComponent C:\lazarus\ide\compileroptionsdlg.pp frmCompilerOptions:TfrmCompilerOptions
TProject.UpdateUnitComponentDependencies checking properties ...
TProject.UpdateUnitComponentDependencies inline component found: BuildModesFrame:TCompOptBuildModesFrame C:\lazarus\ide\compileroptionsdlg.pp -> C:\lazarus\packager\frames\compiler_buildmodes_options.pas
TProject.UpdateUnitComponentDependencies inline component found: ConditionalOptionsFrame:TCompOptsConditionalsFrame C:\lazarus\ide\compileroptionsdlg.pp -> C:\lazarus\packager\frames\compiler_conditionals_options.pas
TProject.UpdateUnitComponentDependencies checking designers ...
TProject.UpdateUnitComponentDependencies used by designer: C:\lazarus\ide\compileroptionsdlg.pp
TProject.UpdateUnitComponentDependencies used by designer: C:\lazarus\ide\frames\editor_mouseaction_options_advanced.pas
TProject.UpdateUnitComponentDependencies.DFSRequiredDesigner designer of C:\lazarus\ide\compileroptionsdlg.pp uses C:\lazarus\packager\frames\compiler_conditionals_options.pas
TProject.UpdateUnitComponentDependencies.DFSRequiredDesigner designer of C:\lazarus\ide\compileroptionsdlg.pp uses C:\lazarus\packager\frames\compiler_buildmodes_options.pas
TProject.UpdateUnitComponentDependencies.DFSRequiredDesigner designer of C:\lazarus\ide\frames\editor_mouseaction_options_advanced.pas uses C:\lazarus\ideintf\ideoptionsintf.pas
TMainIDE.CloseUnitComponent freeing component and designer: C:\lazarus\ide\compileroptionsdlg.pp frmCompilerOptions:TfrmCompilerOptions
TAutoSizeCtrlData.FixControlProperties chkUseHeaptrc:TCheckBox a=akTop old=chkGenerateDwarf:TCheckBox new=nil
TAutoSizeCtrlData.FixControlProperties lblTargetProcessorProc:TLabel a=akTop old=TargetProcessorProcComboBox:TComboBox new=nil
TAutoSizeCtrlData.FixControlProperties lblTargetCPU:TLabel a=akTop old=TargetCPUComboBox:TComboBox new=nil
TAutoSizeCtrlData.FixControlProperties lblTargetOS:TLabel a=akTop old=TargetOSComboBox:TComboBox new=nil
TProject.UpdateUnitComponentDependencies checking designers ...
TProject.UpdateUnitComponentDependencies used by designer: C:\lazarus\ide\frames\editor_mouseaction_options_advanced.pas
TProject.UpdateUnitComponentDependencies.DFSRequiredDesigner designer of C:\lazarus\ide\frames\editor_mouseaction_options_advanced.pas uses C:\lazarus\ideintf\ideoptionsintf.pas
TMainIDE.CloseUnitComponent C:\lazarus\packager\frames\compiler_conditionals_options.pas CompOptsConditionalsFrame:TCompOptsConditionalsFrame
TMainIDE.CloseUnitComponent hidden component is not used => free it C:\lazarus\packager\frames\compiler_conditionals_options.pas CompOptsConditionalsFrame:TCompOptsConditionalsFrame
TMainIDE.CloseUnitComponent C:\lazarus\packager\frames\compiler_buildmodes_options.pas CompOptBuildModesFrame:TCompOptBuildModesFrame
TMainIDE.CloseUnitComponent hidden component is not used => free it C:\lazarus\packager\frames\compiler_buildmodes_options.pas CompOptBuildModesFrame:TCompOptBuildModesFrame
TMainIDE.CloseUnitComponent C:\lazarus\ide\frames\editor_mouseaction_options_advanced.pas EditorMouseOptionsAdvFrame:TEditorMouseOptionsAdvFrame
TProject.UpdateUnitComponentDependencies checking properties ...
TProject.UpdateUnitComponentDependencies checking designers ...
TProject.UpdateUnitComponentDependencies used by designer: C:\lazarus\ide\frames\editor_mouseaction_options_advanced.pas
TProject.UpdateUnitComponentDependencies.DFSRequiredDesigner designer of C:\lazarus\ide\frames\editor_mouseaction_options_advanced.pas uses C:\lazarus\ideintf\ideoptionsintf.pas
TMainIDE.CloseUnitComponent freeing component and designer: C:\lazarus\ide\frames\editor_mouseaction_options_advanced.pas EditorMouseOptionsAdvFrame:TEditorMouseOptionsAdvFrame
TProject.UpdateUnitComponentDependencies checking designers ...
TMainIDE.CloseUnitComponent C:\lazarus\ideintf\ideoptionsintf.pas AbstractIDEOptionsEditor:TAbstractIDEOptionsEditor
TMainIDE.CloseUnitComponent hidden component is not used => free it C:\lazarus\ideintf\ideoptionsintf.pas AbstractIDEOptionsEditor:TAbstractIDEOptionsEditor
TIDEHelpManager.GetHintForSourcePosition not found
TIDEHelpManager.GetHintForSourcePosition not found
Note: TDefinePool.CreateFPCSrcTemplate UnitSearchPath emptyTProject.DoLoadStateFile Statefile not found: C:\svn\fpc\fpc-test\rtl\units\i386-nativent\buildrtl.compiled
TMainIDE.CheckIfPackageNeedsCompilation  No state file for Project
[TExternalToolList.Run] CmdLine="C:\Windows\system32\cmd.exe /c "if not exist ..\units\i386-win32 mkdir ..\units\i386-win32"" WorkDir="C:\svn\fpc\fpc-test\rtl\nativent\"
"Ausf├╝hren des Befehls vor" beendet
TCompiler.Compile WorkingDir="C:\svn\fpc\fpc-test\rtl\nativent\" CompilerFilename="c:\svn\fpc\fpc-test\compiler\ppc386.exe" CompilerParams="-Ratt -MObjFPC -Scgi -O1 -Tnativent -gl -vewi -l -FiC:\svn\fpc\fpc-test\rtl\inc\ -FiC:\svn\fpc\fpc-test\rtl\i386\ -FuC:\svn\fpc\fpc-test\rtl\inc\ -FuC:\svn\fpc\fpc-test\rtl\i386\ -FuC:\svn\fpc\fpc-test\rtl\nativent\ -Fu. -FUC:\svn\fpc\fpc-test\rtl\units\i386-nativent\ -FEC:\svn\fpc\fpc-test\rtl\units\i386-nativent\ -obuildrtl buildrtl.pp"
[TCompiler.Compile] CmdLine="c:\svn\fpc\fpc-test\compiler\ppc386.exe -B -Ratt -MObjFPC -Scgi -O1 -Tnativent -gl -vewi -l -FiC:\svn\fpc\fpc-test\rtl\inc\ -FiC:\svn\fpc\fpc-test\rtl\i386\ -FuC:\svn\fpc\fpc-test\rtl\inc\ -FuC:\svn\fpc\fpc-test\rtl\i386\ -FuC:\svn\fpc\fpc-test\rtl\nativent\ -Fu. -FUC:\svn\fpc\fpc-test\rtl\units\i386-nativent\ -FEC:\svn\fpc\fpc-test\rtl\units\i386-nativent\ -obuildrtl buildrtl.pp"
Free Pascal Compiler version 2.5.1 [2009/10/13] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Native NT for i386
Compiling buildrtl.pp
Compiling system.pp
system.pp(128,1) Warning: Comment level 2 found
system.pp(131,1) Warning: ComAn unhandled exception occurred at $004D3853 :
EAccessViolation : Access violation
  $004D3853
  $004D44A4
  $004D43E4
  $004D47DA
  $004D4AB1
  $004D1784
  $004D3E5E
  $005123B3
  $0042FCFD
  $00509B3C
  $00510B8C
  $00510EDA
  $00511F84
  ment level 2 found
Fatal: Compilation aborted
### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=12 Col=46 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=12 Col=46 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"TIDEHelpManager.GetHintForSourcePosition not found
### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=6 Col=1 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=6 Col=1 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"TIDEHelpManager.GetHintForSourcePosition not found
### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=2 Col=23 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=2 Col=23 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"TIDEHelpManager.GetHintForSourcePosition not found
### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=12 Col=50 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=12 Col=50 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"TIDEHelpManager.GetHintForSourcePosition not found
### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=5 Col=38 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=5 Col=38 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"TIDEHelpManager.GetHintForSourcePosition not found
### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=5 Col=27 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=5 Col=27 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"TIDEHelpManager.GetHintForSourcePosition not found
### TCodeToolManager.HandleException: "kein Pascal-Knoten an der Cursorposition gefunden (z.B. in ungeparstem Code) " at Line=6 Col=1 in "C:\svn\fpc\fpc-test\rtl\nativent\system.pp"TIDEHelpManager.GetHintForSourcePosition not found
LAZARUS END - cleaning up ...
[TMainIDE.Destroy] A 
[TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
[TMainIDE.Destroy] END
lazarus-log-highlighter.txt (10,106 bytes)   

Martin Friebe

2009-10-14 13:10

manager   ~0031304

[quote]
- buildrtl.pp: everything normal (the file itself highlight as free pascal as expected)
- system.pp: highlight: none; encoding: utf-8
- fpc.cfg: highlight: free pascal; encoding: utf-8
[/quote]

So the settings for system.pp and fpc.cfg were swapped? (fpc.cfg should have had none).
Did fpc.cfg show highlighting (blue "#" and some words bold)?

Did anything else swap? The filename shown in the statusbar?

When that happens, could it be there always was a file open that does not normally have highlight (like fpc.cfg)? Could it be, it always was a swap between files?

Did you try to set the highlighter back to what it should be (via the popup menu)?

Martin Friebe

2009-10-14 13:19

manager   ~0031305

I can reproduce it now. There is no exception needed. No need to answer the questions anymore

- Open Lazarus, with an existing project.
  The project should only open pascal files, after Lazarus has started only pascal files must be open

- Open fpc.cfg (e.g. from recent files). fpc.cfg is now the file you view

- Open the compiler options dialog, and press ok, without making changes

- fpc.cfg is now highlighted, the file next after is no longer highlighted

Martin Friebe

2009-10-14 15:09

manager   ~0031309

Please test and close if ok.


The error would happen, if a file with a different highlighter setting was opened in-between or before the existing source-notebook-tabs

Sven Barth

2009-10-15 21:44

manager   ~0031347

I was able to reproduce it correctly, too, when I followed your steps.

Problem is fixed. Thank you very much.

Issue History

Date Modified Username Field Change
2009-10-02 09:51 Sven Barth New Issue
2009-10-02 10:57 Martin Friebe LazTarget => -
2009-10-02 10:57 Martin Friebe Note Added: 0031079
2009-10-02 10:57 Martin Friebe Status new => feedback
2009-10-13 21:07 Sven Barth Note Added: 0031295
2009-10-13 21:07 Sven Barth File Added: lazarus-log-highlighter.txt
2009-10-14 13:10 Martin Friebe Note Added: 0031304
2009-10-14 13:19 Martin Friebe LazTarget - => 0.9.30
2009-10-14 13:19 Martin Friebe Note Added: 0031305
2009-10-14 13:19 Martin Friebe Status feedback => confirmed
2009-10-14 15:09 Martin Friebe Fixed in Revision => 22172
2009-10-14 15:09 Martin Friebe Status confirmed => resolved
2009-10-14 15:09 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2009-10-14 15:09 Martin Friebe Resolution open => fixed
2009-10-14 15:09 Martin Friebe Assigned To => Martin Friebe
2009-10-14 15:09 Martin Friebe Note Added: 0031309
2009-10-14 15:09 Martin Friebe Target Version => 0.9.30
2009-10-15 21:44 Sven Barth Status resolved => closed
2009-10-15 21:44 Sven Barth Note Added: 0031347