View Issue Details

IDProjectCategoryView StatusLast Update
0028924LazarusIDEpublic2015-10-28 21:18
ReporterCudaText manAssigned ToOndrej Pokorny 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinux x64OSOS Version
Product Version1.5 (SVN)Product Build 
Target VersionFixed in Version1.5 (SVN) 
Summary0028924: r50190 crashes if closed source editors
DescriptionI often close src editors. No windows of ide stay open. Now this gives crash in ide.
Additional InformationTLazarusManager.Run starting /home/user/lazarus/lazarus ...
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/user/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False
TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/user/test/tree/unit1.pas
TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner
TApplication.HandleException Access violation
  Stack trace:
  $00000000004974AE line 1131 of main.pp
  $00000000004A8A83 line 3729 of main.pp
  $00000000004A89A2 line 3709 of main.pp
  $00000000005616B5 line 237 of lazmethodlist.pas
  $00000000009025D2 line 1493 of idecommands.pas
  $0000000000902323 line 1465 of idecommands.pas
  $000000000047BAAE line 682 of include/application.inc
  $000000000047AA36 line 395 of include/application.inc
  $000000000047DE8A line 1261 of include/application.inc
  $000000000047E379 line 1395 of include/application.inc
  $00000000004EC87E line 54 of include/interfacebase.inc
  $000000000047E321 line 1383 of include/application.inc
  $000000000041FE44 line 135 of lazarus.pp
TApplication.HandleException Access violation
  Stack trace:
  $0000000000497454 line 1123 of main.pp
  $00000000004A8A83 line 3729 of main.pp
  $00000000004A89A2 line 3709 of main.pp
  $00000000005616B5 line 237 of lazmethodlist.pas
  $00000000009025D2 line 1493 of idecommands.pas
  $0000000000902323 line 1465 of idecommands.pas
  $000000000047BAAE line 682 of include/application.inc
  $000000000047AA36 line 395 of include/application.inc
  $000000000047DE8A line 1261 of include/application.inc
  $000000000047E379 line 1395 of include/application.inc
  $00000000004EC87E line 54 of include/interfacebase.inc
  $000000000047E321 line 1383 of include/application.inc
  $000000000041FE44 line 135 of lazarus.pp
[TMainIDE.Destroy] A
[TMainIDE.Destroy] B -> inherited Destroy... TMainIDE
[TMainIDE.Destroy] END
TagsNo tags attached.
Fixed in Revision50194
LazTarget-
Widgetset
Attached Files

Activities

Juha Manninen

2015-10-28 18:33

developer   ~0086954

Could you please create a proper backtrace. This explains it:
  http://wiki.freepascal.org/Creating_a_Backtrace_with_GDB
although is unnecessarily long. You only must do:
$ gdb lazarus
  run

then AV happens. Type:
  bt

And that's it.

CudaText man

2015-10-28 19:30

reporter   ~0086955

I can

(gdb) run
Starting program: /home/user/lazarus/lazarus
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee9c3700 (LWP 29657)]
[New Thread 0x7fffee1c2700 (LWP 29658)]
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/user/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
[New Thread 0x7fffe7fff700 (LWP 29659)]
[New Thread 0x7fffe77fe700 (LWP 29660)]
[New Thread 0x7fffe6ffd700 (LWP 29661)]
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 FPC=True LCL=False
[Thread 0x7fffe77fe700 (LWP 29660) exited]

Program received signal SIGSEGV, Segmentation fault.
0x0000000000497454 in CHANGED (this=..., ASRCEDIT=0x0, ADISPLAYSTATE=DSSOURCE)
    at main.pp:1123
1123 and (EditorComponentStamp = ASrcEdit.EditorComponent.ChangeStamp)
(gdb) bt
#0 0x0000000000497454 in CHANGED (this=..., ASRCEDIT=0x0,
    ADISPLAYSTATE=DSSOURCE) at main.pp:1123
0000001 0x00000000004a8a83 in UPDATEEDITORCOMMANDS (this=0x7fffed8caa90,
    SENDER=0x7ffff7feb260) at main.pp:3729
0000002 0x00000000004a89a2 in UPDATEMAINIDECOMMANDS (this=0x7fffed8caa90,
    SENDER=0x7ffff7feb260) at main.pp:3709
0000003 0x00000000005616b5 in CALLNOTIFYEVENTS (this=0x7fffec215100,
    SENDER=0x7ffff7feb260) at lazmethodlist.pas:237
0000004 0x00000000009025d2 in EXECUTEUPDATEEVENTS (this=0x7ffff7feb260)
    at idecommands.pas:1493
0000005 0x0000000000902323 in APPLICATIONONIDLE (this=0x7ffff7feb260,
    SENDER=0x7ffff7f55050, DONE=true) at idecommands.pas:1465
0000006 0x000000000047baae in NOTIFYIDLEHANDLER (this=0x7ffff7f55050, DONE=true)
    at include/application.inc:682
0000007 0x000000000047aa36 in IDLE (this=0x7ffff7f55050, WAIT=true)
    at include/application.inc:395
0000008 0x000000000047de8a in HANDLEMESSAGE (this=0x7ffff7f55050)
    at include/application.inc:1261
0000009 0x000000000047e379 in RUNLOOP (this=0x7ffff7f55050)
    at include/application.inc:1395
0000010 0x00000000004ec87e in APPRUN (this=0x7ffff7f55670, ALOOP=...)
    at include/interfacebase.inc:54
0000011 0x000000000047e321 in RUN (this=0x7ffff7f55050)
---Type <return> to continue, or q <return> to quit---
    at include/application.inc:1383
0000012 0x000000000041fe44 in main () at lazarus.pp:135
(gdb)

Juha Manninen

2015-10-28 20:36

developer   ~0086956

I cannot reproduce for some reason. Assigning to Ondrej.
I first added an Assert() and then moved the code to another unit, so the line numbers don't match.

CudaText man

2015-10-28 21:11

reporter  

environmentoptions.xml (24,082 bytes)

CudaText man

2015-10-28 21:11

reporter   ~0086957

Env options attached.

Ondrej Pokorny

2015-10-28 21:18

developer   ~0086958

You had to close all source editor *tabs* to reproduce this issue (not source editor windows). Then ActiveSourceEditor from GetCurrentUnit is nil and it is valid.

Issue History

Date Modified Username Field Change
2015-10-28 17:31 CudaText man New Issue
2015-10-28 18:33 Juha Manninen Note Added: 0086954
2015-10-28 19:30 CudaText man Note Added: 0086955
2015-10-28 20:31 Juha Manninen Assigned To => Ondrej Pokorny
2015-10-28 20:31 Juha Manninen Status new => assigned
2015-10-28 20:36 Juha Manninen Note Added: 0086956
2015-10-28 21:11 CudaText man File Added: environmentoptions.xml
2015-10-28 21:11 CudaText man Note Added: 0086957
2015-10-28 21:18 Ondrej Pokorny Fixed in Revision => 50194
2015-10-28 21:18 Ondrej Pokorny LazTarget => -
2015-10-28 21:18 Ondrej Pokorny Note Added: 0086958
2015-10-28 21:18 Ondrej Pokorny Status assigned => resolved
2015-10-28 21:18 Ondrej Pokorny Fixed in Version => 1.5 (SVN)
2015-10-28 21:18 Ondrej Pokorny Resolution open => fixed