View Issue Details

IDProjectCategoryView StatusLast Update
0024581LazarusIDEpublic2013-06-11 15:06
ReporterGraeme GeldenhuysAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSFreeBSDOS Version9.1
Product Version1.1 (SVN)Product Buildr41676 
Target Version1.2.0Fixed in Version1.1 (SVN) 
Summary0024581: IDE crashes on opening a specific file - seems synedit related
DescriptionWhen I open a specific file from the fpGUI project the IDE crashes. No matter how I open the file (File menu, double click on file in package window etc) the IDE always crashes - which it didn't do before.

From the backtrace it seems related to the synedit syntax highlighting code - I think.

I'm using Lazarus 1.1 r41676 FPC 2.6.3 x86_64-freebsd-gtk 2

The fpGUI file in question is the fpg_constants.pas file (attached). This unit mainly contains the resource constants for translation support. I didn't attach all the *.inc files that the fpg_constants.pas refers to.

------------------[ backtrace ]----------------------------
$ ./lazarus
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/graemeg/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
******** Highlighter.NeedScan ************
################# NodeStateForPeer: NodeType <> APeerType
  1 Line=1 ScannedTo=49 Cnt=0 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
  2 Line=51 ScannedTo=2 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=1 D-Close=0
           # 34576669568 x1-x2= 1 - 18 idnIfdef idnDisabled flg=[idnStateByUser] >>p1: - >>p2: 54/ 1 (34576668672)
  3 Line=54 ScannedTo=2 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=1
           # 34576668672 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: 51/ 1 (34576669568) >>p2: 57/ 1 (34576669952)
  4 Line=57 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576669952 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: 54/ 1 (34576668672) >>p2: -
  5 Line=60 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576668800 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: - >>p2: -
  6 Line=63 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576666496 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: - >>p2: -
  7 Line=66 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576667008 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: - >>p2: -
  8 Line=69 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576669824 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: - >>p2: -
  9 Line=72 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid, idlNotInCodeToUnknown, idlNotInCodeToUnknownReq] D-Open=0 D-Close=0
           # 34576666752 x1-x2= 1 - 8 idnElse idnEnabled flg=[idnStateByUser] >>p1: - >>p2: -
TApplication.HandleException NodeStateForPeer: NodeType <> APeerType (syneditmarkupifdef.pp, line 1199)
  Stack trace:
  $0000000000FBD6E2 line 1055 of syneditmarkupifdef.pp
  $0000000000FC1040 line 1915 of syneditmarkupifdef.pp
  $0000000000FC59E8 line 2659 of syneditmarkupifdef.pp
  $0000000000FC5143 line 2760 of syneditmarkupifdef.pp
  $0000000000FC763E line 3059 of syneditmarkupifdef.pp
  $000000000070EB35 line 163 of lazmethodlist.pas
  $0000000000FC7123 line 2993 of syneditmarkupifdef.pp
  $0000000000FCAE5A line 3825 of syneditmarkupifdef.pp
  $0000000000EAB866 line 510 of syneditmarkup.pp
  $0000000000BF66E8 line 8022 of sourceeditor.pp
  $000000000085D8AF line 274 of include/customnotebook.inc
  $000000000085E397 line 553 of include/customnotebook.inc
  $0000000000BF00B6 line 6394 of sourceeditor.pp
  $0000000000BF1D9D line 6820 of sourceeditor.pp
  $0000000000BF1F0C line 6841 of sourceeditor.pp
  $0000000000D9C131 line 4034 of sourcefilemanager.pas
  $0000000000D8F1F8 line 1633 of sourcefilemanager.pas
################# NodeStateForPeer: NodeType <> APeerType
  1 Line=1 ScannedTo=49 Cnt=0 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
  2 Line=51 ScannedTo=2 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=1 D-Close=0
           # 34576669568 x1-x2= 1 - 18 idnIfdef idnDisabled flg=[idnStateByUser] >>p1: - >>p2: 54/ 1 (34576668672)
  3 Line=54 ScannedTo=2 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=1
           # 34576668672 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: 51/ 1 (34576669568) >>p2: 57/ 1 (34576669952)
  4 Line=57 ScannedTo=2 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576669952 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: 54/ 1 (34576668672) >>p2: 60/ 1 (34576668800)
  5 Line=60 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576668800 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: 57/ 1 (34576669952) >>p2: -
  6 Line=63 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576666496 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: - >>p2: -
  7 Line=66 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576667008 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: - >>p2: -
  8 Line=69 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid] D-Open=0 D-Close=0
           # 34576669824 x1-x2= 1 - 22 idnElseIf idnInvalid flg=[idnStateByUser] >>p1: - >>p2: -
  9 Line=72 ScannedTo=0 Cnt=1 EndLine=0 Flags=[idlValid, idlNotInCodeToUnknown, idlNotInCodeToUnknownReq] D-Open=0 D-Close=0
           # 34576666752 x1-x2= 1 - 8 idnElse idnEnabled flg=[idnStateByUser] >>p1: - >>p2: -
TApplication.HandleException: there was another exception during showing the first exception
  Stack trace:
  $0000000000FBD6E2 line 1055 of syneditmarkupifdef.pp
  $0000000000FC1040 line 1915 of syneditmarkupifdef.pp
  $0000000000FC59E8 line 2659 of syneditmarkupifdef.pp
  $0000000000FC5143 line 2760 of syneditmarkupifdef.pp
  $0000000000FC763E line 3059 of syneditmarkupifdef.pp
  $0000000000FC9CBD line 3650 of syneditmarkupifdef.pp
  $0000000000FC9D70 line 3661 of syneditmarkupifdef.pp
  $0000000000FC9DE8 line 3666 of syneditmarkupifdef.pp
  $0000000000EAA5AE line 306 of syneditmarkup.pp
  $0000000000EAC94D line 665 of syneditmarkup.pp
  $0000000000E74D8C line 7460 of synedit.pp
  $0000000000E72F29 line 6967 of synedit.pp
  $000000000070EB35 line 163 of lazmethodlist.pas
  $0000000000EFF2DA line 498 of syngutterbase.pp
  $0000000000EFF3AC line 515 of syngutterbase.pp
  $0000000000EFE99D line 309 of syngutterbase.pp
  $0000000000E6512A line 4568 of synedit.pp
[TMainIDE.Destroy] A
----------------------[ end ]------------------------------
TagsNo tags attached.
Fixed in Revision41677
LazTarget1.2
Widgetset
Attached Files
  • fpg_constants.pas (2,538 bytes)
    {
        fpGUI  -  Free Pascal GUI Toolkit
    
        Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
        distribution, for details of the copyright.
    
        See the file COPYING.modifiedLGPL, included in this distribution,
        for details about redistributing fpGUI.
    
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
        Description:
          Constants used throughout fpGUI will be defined here. This includes
          language constants for localization.
    
          You only need to changes these defines if you want the default
          fpGUI language to be something other than English.
    
          Soon the lang_*.inc files will be auto generated from the
          actual *.po files. At which point only the .po files need
          to be maintained.
    }
    
    unit fpg_constants;
    
    {$mode objfpc}{$H+}
    
    interface
    
    uses
      SysUtils;
    
    resourcestring
    
    { Define Compiler language symbol (eg: de for German) to include the correct
      language resource file otherwise the Default (English) resource file will
      be used. }
    
    {.$DEFINE de}     // German
    {.$DEFINE ru}     // Russian
    {.$DEFINE fr}     // French
    {.$DEFINE pt}     // Portuguese (Brazil)
    {.$DEFINE af}     // Afrikaans
    {.$DEFINE it}     // Italian
    {.$DEFINE es}     // Spanish
    
    
    
    {$IF defined(de)}
      {$I lang_de.inc}
      
    {$ELSEIF defined(ru)}
      {$I lang_ru.inc}
      
    {$ELSEIF defined(fr)}
      {$I lang_fr.inc}
      
    {$ELSEIF defined(pt)}
      {$I lang_pt.inc}
      
    {$ELSEIF defined(af)}
      {$I lang_af.inc}
    
    {$ELSEIF defined(it)}
      {$I lang_it.inc}
    
    {$ELSEIF defined(es)}
      {$I lang_es.inc}
    
    {$ELSE}
      {$I lang_en.inc}
    {$IFEND}
    
    
    const
    
      { Double click support }
      DOUBLECLICK_MS = 320; // the max time between left-clicks for doubleclick in milliseconds
      DOUBLECLICK_DISTANCE = 5; // max distance between points when doing doubleclick in pixels
    
      ONE_MILISEC = 1/MSecsPerDay;
    
      DEFAULT_HINT_PAUSE = 500;   // in milliseconds
    
      { Default fpGUI help viewer }
      FPG_HELPVIEWER = 'docview';
    
      FPG_CONFIG_DIR = 'fpgui_toolkit' + PathDelim;
      FPG_BOOKMARKS_FILE = 'bookmarks.ini';
      FPG_BOOKMARK_SECTION = 'bookmarks';
      
      // Used for the internal message queue
      cMessageQueueSize = 2048;
    
      // version and name constants
      {$I VERSION_FILE.inc}  // this includes the auto generated:  fpGUI_Version = xxx
      fpGUIName    = 'fpGUI Toolkit';
      fpGUIWebsite = 'http://fpgui.sourceforge.net/';
    
      txtWordDelims: set of char = [' ', #9, #13, #10];
    
    
    
    implementation
    
    
    
    end.
    
    
    fpg_constants.pas (2,538 bytes)

Activities

Graeme Geldenhuys

2013-06-11 11:13

reporter  

fpg_constants.pas (2,538 bytes)
{
    fpGUI  -  Free Pascal GUI Toolkit

    Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this
    distribution, for details of the copyright.

    See the file COPYING.modifiedLGPL, included in this distribution,
    for details about redistributing fpGUI.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Description:
      Constants used throughout fpGUI will be defined here. This includes
      language constants for localization.

      You only need to changes these defines if you want the default
      fpGUI language to be something other than English.

      Soon the lang_*.inc files will be auto generated from the
      actual *.po files. At which point only the .po files need
      to be maintained.
}

unit fpg_constants;

{$mode objfpc}{$H+}

interface

uses
  SysUtils;

resourcestring

{ Define Compiler language symbol (eg: de for German) to include the correct
  language resource file otherwise the Default (English) resource file will
  be used. }

{.$DEFINE de}     // German
{.$DEFINE ru}     // Russian
{.$DEFINE fr}     // French
{.$DEFINE pt}     // Portuguese (Brazil)
{.$DEFINE af}     // Afrikaans
{.$DEFINE it}     // Italian
{.$DEFINE es}     // Spanish



{$IF defined(de)}
  {$I lang_de.inc}
  
{$ELSEIF defined(ru)}
  {$I lang_ru.inc}
  
{$ELSEIF defined(fr)}
  {$I lang_fr.inc}
  
{$ELSEIF defined(pt)}
  {$I lang_pt.inc}
  
{$ELSEIF defined(af)}
  {$I lang_af.inc}

{$ELSEIF defined(it)}
  {$I lang_it.inc}

{$ELSEIF defined(es)}
  {$I lang_es.inc}

{$ELSE}
  {$I lang_en.inc}
{$IFEND}


const

  { Double click support }
  DOUBLECLICK_MS = 320; // the max time between left-clicks for doubleclick in milliseconds
  DOUBLECLICK_DISTANCE = 5; // max distance between points when doing doubleclick in pixels

  ONE_MILISEC = 1/MSecsPerDay;

  DEFAULT_HINT_PAUSE = 500;   // in milliseconds

  { Default fpGUI help viewer }
  FPG_HELPVIEWER = 'docview';

  FPG_CONFIG_DIR = 'fpgui_toolkit' + PathDelim;
  FPG_BOOKMARKS_FILE = 'bookmarks.ini';
  FPG_BOOKMARK_SECTION = 'bookmarks';
  
  // Used for the internal message queue
  cMessageQueueSize = 2048;

  // version and name constants
  {$I VERSION_FILE.inc}  // this includes the auto generated:  fpGUI_Version = xxx
  fpGUIName    = 'fpGUI Toolkit';
  fpGUIWebsite = 'http://fpgui.sourceforge.net/';

  txtWordDelims: set of char = [' ', #9, #13, #10];



implementation



end.

fpg_constants.pas (2,538 bytes)

Graeme Geldenhuys

2013-06-11 15:06

reporter   ~0068220

Confirmed that the crash doesn't occur any more. Many thanks.

Issue History

Date Modified Username Field Change
2013-06-11 11:13 Graeme Geldenhuys New Issue
2013-06-11 11:13 Graeme Geldenhuys File Added: fpg_constants.pas
2013-06-11 11:57 Martin Friebe Assigned To => Martin Friebe
2013-06-11 11:57 Martin Friebe Status new => assigned
2013-06-11 13:43 Martin Friebe Fixed in Revision => 41677
2013-06-11 13:43 Martin Friebe LazTarget => 1.2
2013-06-11 13:43 Martin Friebe Status assigned => resolved
2013-06-11 13:43 Martin Friebe Fixed in Version => 1.1 (SVN)
2013-06-11 13:43 Martin Friebe Resolution open => fixed
2013-06-11 13:43 Martin Friebe Target Version => 1.2.0
2013-06-11 15:06 Graeme Geldenhuys Note Added: 0068220
2013-06-11 15:06 Graeme Geldenhuys Status resolved => closed