View Issue Details

IDProjectCategoryView StatusLast Update
0018105LazarusIDEpublic2010-12-12 06:56
ReporterAlexander S. KleninAssigned ToMartin Friebe 
PrioritynormalSeveritycrashReproducibilityrandom
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0018105: SynEdit crash while trying to open a specific project session
Descriptionfrom debug log:

TIDEAnchorDockMaster.MakeIDEWindowDockSite MainIDE:TMainIDEBar
TIDEAnchorDockMaster.LoadUserLayout anchordocklayout.xml
TIDEAnchorDockMaster.LoadUserLayout restoring ...
TApplication.HandleException List index (2) out of bounds
  Stack trace:
  $0047E64F
Warning: SynEdit.Paint called during PaintLock
TApplication.HandleException: there was another exception during showing the first exception
  Stack trace:
  $0079FB85 TSYNCUSTOMHIGHLIGHTER__SCANRANGES, line 1336 of synedithighlighter.pp
  $00753274 TCUSTOMSYNEDIT__PAINT, line 3036 of synedit.pp
  $0056B457 TCUSTOMCONTROL__PAINTWINDOW, line 132 of ./include/customcontrol.inc
  $0055434F TWINCONTROL__PAINTHANDLER, line 4686 of ./include/wincontrol.inc
  $005588BA TWINCONTROL__WMPAINT, line 6560 of ./include/wincontrol.inc
  $0056B342 TCUSTOMCONTROL__WMPAINT, line 112 of ./include/customcontrol.inc
  $0040BECA
  $00555905 TWINCONTROL__WNDPROC, line 5241 of ./include/wincontrol.inc
  $0075A58E TCUSTOMSYNEDIT__WNDPROC, line 6606 of synedit.pp
  $00611079 DELIVERMESSAGE, line 110 of lclmessageglue.pas
  $00589EF0 SENDPAINTMESSAGE, line 532 of win32callback.inc
  $00587145 WINDOWPROC, line 1970 of win32callback.inc
  $7D9472D8
  $7D947568
  $7D947D93
  $7D947E46
  $7D61EA2E
Steps To Reproduce1) Open attached project
=> Lazarus crashes with either
"List out of bounds" or "Range check error".
I was unable to reliably determine what causes which message.
Additional InformationIf .lps file is removed, the problem *almost* goes away --
no "List out of bounds", but still very rare random range checks.
TagsNo tags attached.
Fixed in Revision28648
LazTarget0.9.30
Widgetset
Attached Files

Relationships

related to 0018090 closedMartin Friebe SynEdit: find a way to prevent painting during paintlock 

Activities

2010-11-29 15:33

 

synedit_crash.zip (4,390 bytes)

Martin Friebe

2010-12-03 14:42

manager   ~0043942

Please test and close if ok.

I couldn't reproduce it, but I fixed the underlying issue anyway => so it should be fixed now.

Somewhere there are calls to ProcessMessages during a SynEdit BeginUpdate/EndUpdate block. Those trigger paint events, while SynEdit is not ready to paint. Those paint events are now deferred.

In your case this may be dependent on some setting you may have in editor options, or environment options or similar...

If you whish to help finding the exact trigger of the Issue (which still may have an unwanted Begin/EndUpdate block => which could now cause visual artefacts), then please recompile your lazarus with with
  -dSynCheckPaintLock

And watch the logfile for the message:
  'Returning from Paintlock, wich had Paint called while active'
followed by a stacktrace.

Alexander S. Klenin

2010-12-06 03:01

developer   ~0044027

Unfortunately, no, the problem persists.

Good news is that I have isolated the cause of range check error,
and it is unrelated. So only list out-of-bound error remains.
Bad news is that stack trace is for some reason not available.

Below is the latest debug log,
after compiling with -dDebug and -dSynCheckPaintLock

TIDEAnchorDockMaster.MakeIDEWindowDockSite MainIDE:TMainIDEBar
TIDEAnchorDockMaster.LoadUserLayout anchordocklayout.xml
TIDEAnchorDockMaster.LoadUserLayout restoring ...
AskIfLoadLastFailingProject STARTAskIfLoadLastFailingProject END TrueTApplication.HandleException List index (2) out of bounds
  Stack trace:
  $0049036F
Warning: SynEdit.Paint called during PaintLock

Martin Friebe

2010-12-06 15:22

manager   ~0044044

Sorry, I overlooked the 1st of the 2 crashes. They may be unrelated to each other.


Unfortunately I can not reproduce the issue, it may depend on other settings you have.

1) For the "list index out of bounds":
Can you try and run the IDE in gdb, to obtain a stacktrace?


2) "Warning: SynEdit.Paint called during PaintLock"
There is no crash for this warning any more. I don't think this is a problem.
My guess is you get this warning when the excpetion dialog is shown. If your SynEdit had any content at that time, and you moved the exception dialog, you might notice, that SynEdit (correctly) does not repaint.
For explanation see:
http://wiki.lazarus.freepascal.org/Lazarus_0.9.30_release_notes#SynEdit.BeginUpdate_.2F_EndUpdate

Alexander S. Klenin

2010-12-07 02:42

developer   ~0044052

>1) For the "list index out of bounds":
>Can you try and run the IDE in gdb, to obtain a stacktrace?

I tried, but gdb just says "No stack".
As I understand, the exception is caught by some try..except
block inside Lazarus.

Martin Friebe

2010-12-07 04:48

manager   ~0044053

this should still have a stack... But sometimes if the stack starts in the rtl (without debug info) gdb seems to have issues.)

I don't know if a newer version of gdb may be able to do a better job.

If not, then please attach (or send private) your entire primary config directory.

2010-12-08 07:37

 

settings.7z (63,308 bytes)

Alexander S. Klenin

2010-12-08 07:38

developer   ~0044079

I used mingw gdb 7.2
Attached the config.

Martin Friebe

2010-12-08 13:02

manager   ~0044093

#0 fpc_raiseexception(0x2, 0xc7db738, 0x0) at ..\inc\except.inc:191
0000001 ERROR(0xc7db738, 0xc56268 'List index (%d) out of bounds', 2) at ..\objpas\classes\lists.inc:157
0000002 RAISEINDEXERROR(0xc7db738, 0) at ..\objpas\classes\lists.inc:48
0000003 GET(0x2, 4694431) at ..\objpas\classes\lists.inc:54
0000004 ?? at :0
0000005 UPDATEPAGEINDEX(0x8313a70) at project.pp:1912
0000006 SETPAGEINDEX(0xc758b98, 1) at project.pp:1202
0000007 ONSRCNOTEBOOKEDITORMOVED(0x1c4180, 0x1d0f98) at main.pp:15426
0000008 UPDATEPROJECTFILE(0x1d0f98) at sourceeditor.pp:4555
0000009 SETEDITORCOMPONENT(0xc758b98, 0x1d0f98) at project.pp:1192
0000010 DOOPENFILEINSOURCEEDITOR(0x1c4180, 0xc758b98, -1, 0, [OFPROJECTLOADING..OFONLYIFEXISTS, OFMULTIOPEN]) at main.pp:7940
0000011 DOOPENEDITORFILE(0x1c4180, 0x9b99d10 'C:\lazarus_latest_orig_svn\components\tachart\taseries.pas', -1, 0, 0xc758b98, [OFPROJECTLOADING..OFONLYIFEXISTS, OFMULTIOPEN]) at main.pp:8881
0000012 DOOPENPROJECTFILE(0x1c4180, 0xc720e58 'C:\lazarus_latest_orig_svn\components\tachart\demo\XXX_tmp\radialdemo.lpi', []) at main.pp:10256
0000013 SETUPSTARTPROJECT(0x1c4180) at main.pp:2121
0000014 STARTIDE(0x1c4180) at main.pp:1401
0000015 main at lazarus.pp:105

Martin Friebe

2010-12-08 15:37

manager   ~0044100

Please test and close if ok

--

There is an old issue, that on merging/deleting lines you can end up with multiply bookmarks on one line (this issue needs to be addressed independent of this report).

If 3 or more bookmarks ended on the same line, the session file would no longer load.

Sessions files loading is fixed. (The behaviour remains as in previous versions, and only one of the bookmarks on the given line is restored)

Alexander S. Klenin

2010-12-12 06:56

developer   ~0044188

Thanks

Issue History

Date Modified Username Field Change
2010-11-29 15:33 Alexander S. Klenin New Issue
2010-11-29 15:33 Alexander S. Klenin File Added: synedit_crash.zip
2010-11-29 15:33 Alexander S. Klenin LazTarget => -
2010-11-29 15:33 Alexander S. Klenin Widgetset => Win32/Win64
2010-11-29 16:00 Vincent Snijders LazTarget - => 0.9.30
2010-11-29 16:00 Vincent Snijders Assigned To => Martin Friebe
2010-11-29 16:00 Vincent Snijders Status new => assigned
2010-11-29 16:00 Vincent Snijders Target Version => 0.9.30
2010-11-30 00:47 Martin Friebe Relationship added related to 0018090
2010-12-03 14:42 Martin Friebe Fixed in Revision => 28608
2010-12-03 14:42 Martin Friebe Status assigned => resolved
2010-12-03 14:42 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2010-12-03 14:42 Martin Friebe Resolution open => fixed
2010-12-03 14:42 Martin Friebe Note Added: 0043942
2010-12-06 03:01 Alexander S. Klenin Status resolved => assigned
2010-12-06 03:01 Alexander S. Klenin Resolution fixed => reopened
2010-12-06 03:01 Alexander S. Klenin Note Added: 0044027
2010-12-06 15:22 Martin Friebe Note Added: 0044044
2010-12-06 15:22 Martin Friebe Status assigned => feedback
2010-12-07 02:42 Alexander S. Klenin Note Added: 0044052
2010-12-07 04:48 Martin Friebe Note Added: 0044053
2010-12-08 07:37 Alexander S. Klenin File Added: settings.7z
2010-12-08 07:38 Alexander S. Klenin Note Added: 0044079
2010-12-08 13:02 Martin Friebe Note Added: 0044093
2010-12-08 15:37 Martin Friebe Fixed in Revision 28608 => 28648
2010-12-08 15:37 Martin Friebe Widgetset Win32/Win64 =>
2010-12-08 15:37 Martin Friebe Status feedback => resolved
2010-12-08 15:37 Martin Friebe Resolution reopened => fixed
2010-12-08 15:37 Martin Friebe Note Added: 0044100
2010-12-12 06:56 Alexander S. Klenin Status resolved => closed
2010-12-12 06:56 Alexander S. Klenin Note Added: 0044188