View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025811 | Lazarus | IDE | public | 2014-03-03 09:14 | 2014-03-04 20:30 |
Reporter | Stéphane Wierzbicki | Assigned To | Martin Friebe | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Win32 | OS | Windows | ||
Product Version | 1.2.0RC2 | ||||
Target Version | 1.2.2 | Fixed in Version | 1.2.1 (SVN) | ||
Summary | 0025811: IDE Crash when opening the project source | ||||
Description | IDE Crash when opening the project source multi-line (opening) peer valid (syneditmarkupifdef.pp, line 1961). Press Ok to ignore... Press Cancel to close... | ||||
Steps To Reproduce | Open attached project. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 44345 | ||||
LazTarget | 1.2.2 | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
|
|
|
As a workaround until fixed, you can disable all colors and highlight for any IFDEF. This will deactivate the module, and should prevent the crash. |
|
synfix.diff (1,698 bytes)
Index: syneditmarkupifdef.pp =================================================================== --- syneditmarkupifdef.pp (revision 44344) +++ syneditmarkupifdef.pp (revision 44345) @@ -1957,18 +1959,22 @@ //end; assert(not (PeerList[i].NodeType in [idnIfdef, idnCommentedNode]), 'multi-line peer valid'); - //if (PeerList[i].NodeType = idnElse) and (AOuterLines <> nil) then begin + + // AOuterLines is only set while scanning opening lines in front of the 1st visible screenline + // (at the start of ValidateRange) if (AOuterLines <> nil) then begin - // todo: find multiply elseif - assert((PeerList[i].NodeType in [idnElse, idnElseIf]), 'multi-line (opening) peer valid'); - // scanning outer lines - j := ToPos(AOuterLines.NodeLineEx[i-1, 1]); - if j < 0 then begin - //debugln(['Skipping peer for ELSE with NO IFDEF at depth ', i-1, ' before line ', ANode.StartLine]); - continue; - end; - OtherLine := GetOrInsertNodeAtLine(j); - MaybeValidateNode(OtherLine); + if PeerList[i].NodeType in [idnElse, idnElseIf] then begin + // todo: find multiply elseif + j := ToPos(AOuterLines.NodeLineEx[i-1, 1]); + if j < 0 then begin + //debugln(['Skipping peer for ELSE with NO IFDEF at depth ', i-1, ' before line ', ANode.StartLine]); + continue; + end; + OtherLine := GetOrInsertNodeAtLine(j); + MaybeValidateNode(OtherLine); + end + else + continue; // while scanning outerlines, any EndIf can be ignored end else OtherLine := ANestList.Node[i]; // Todo: keep if same al last loop, and continue at OtherDepth / j |
|
Fix will be in 1.2.2. Unfortunately the release build was already done, at the time of this report. Attached patch can be applied to 1.2.0 Please test (either now, or when 1.2.2 is out) and close if ok. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-03-03 09:14 | Stéphane Wierzbicki | New Issue | |
2014-03-03 09:14 | Stéphane Wierzbicki | File Added: Laz 1.2 RC2 - SynEdit crash.rar | |
2014-03-03 13:21 | Zeljan Rikalo | Assigned To | => Martin Friebe |
2014-03-03 13:21 | Zeljan Rikalo | Status | new => assigned |
2014-03-04 16:54 | Martin Friebe | LazTarget | => 1.2.2 |
2014-03-04 16:54 | Martin Friebe | Note Added: 0073431 | |
2014-03-04 16:54 | Martin Friebe | Target Version | => 1.2.2 |
2014-03-04 20:28 | Martin Friebe | File Added: synfix.diff | |
2014-03-04 20:30 | Martin Friebe | Fixed in Revision | => 44345 |
2014-03-04 20:30 | Martin Friebe | Note Added: 0073464 | |
2014-03-04 20:30 | Martin Friebe | Status | assigned => resolved |
2014-03-04 20:30 | Martin Friebe | Fixed in Version | => 1.2.1 (SVN) |
2014-03-04 20:30 | Martin Friebe | Resolution | open => fixed |