View Issue Details

IDProjectCategoryView StatusLast Update
0036782LazarusIDEpublic2020-03-10 14:55
ReporterZeljan RikaloAssigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version2.1 (SVN)Product Build 
Target Version2.2Fixed in Version 
Summary0036782: IDE crash
DescriptionSometimes access violation is thrown. Using Qt5 , lazarus trunk r62733, fpc-3.0.4 on linux 64bit.
Looks like same error as Cyrax reported (gtk2) in issue 0036776 but this issue isn't related to count for menuitems
Steps To ReproduceIt is pretty hard to reproduce, but switching project with different num of build modes help, then open Project Options dialog and click "Cancel" (not OK but Cancel). GDB catched this:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000568d48 in COUNT (this=0x2f7362696c5f796d) at lazmethodlist.pas:192
192 Result:=FCount

(gdb) bt
#0 0x0000000000568d48 in COUNT (this=0x2f7362696c5f796d) at lazmethodlist.pas:192
0000001 0x000000000049e60c in DOAFTERWRITE (this=0x7fffd89f50b0, RESTORE=true) at ideoptionsintf.pas:404
0000002 0x0000000000bc7f20 in WRITEALL (this=0x7fffdcf4e830, RESTORE=true) at ideoptionsdlg.pas:411
0000003 0x00000000004b7edd in DOOPENIDEOPTIONS (this=0x7fffe0678b10, AEDITOR=0x0, ACAPTION=0x7fffdc8e3218 'Options for Project: Holoerp', AOPTIONSFILTER=..., highAOPTIONSFILTER=
    1, ASETTINGS=0) at main.pp:5044
0000004 0x00000000004b55a3 in PROJECTOPTIONSHELPER (this=0x7fffe0678b10, AFILTER=..., highAFILTER=1) at main.pp:4446
0000005 0x00000000004b56ee in MNUPROJECTOPTIONSCLICKED (this=0x7fffe0678b10, SENDER=0x7fffde9926c0) at main.pp:4458
0000006 0x000000000093ce0f in MENUITEMCLICK (this=0x7fffde9926c0, SENDER=0x7fffdea58ae0) at menuintf.pas:547
0000007 0x0000000000940db1 in MENUITEMCLICK (this=0x7fffde9926c0, SENDER=0x7fffdea58ae0) at menuintf.pas:1699
0000008 0x000000000069681c in CLICK (this=0x7fffdea58ae0) at include/menuitem.inc:83
0000009 0x0000000000697168 in DOCLICKED (this=0x7fffdea58ae0, MSG=) at include/menuitem.inc:288
0000010 0x000000000043a4cf in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal ()
0000011 0x00000000025e6698 in .Ld25 ()
0000012 0x00000000025e6418 in VMT_$MENUS_$$_TMENUITEM ()
0000013 0x0000000000000001 in ()
0000014 0x0000000000000006 in ()
0000015 0x00007fffffffd420 in ()
0000016 0x00007fffdea58ae0 in ()
0000017 0x0000000000000000 in ()
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetGTK 2, GTK 3, QT, QT5
Attached Files

Activities

Zeljan Rikalo

2020-03-10 13:20

developer   ~0121534

Found that inside TAbstractIDEOptions.DoAfterWrite() FHandlers[iohAfterWrite] is nil when AV is thrown, not only iohAfterWrite but all of them:
Error: TAbstractIDEOptions.DoAfterWrite FHandlers[iohAfterWrite] is not assigned !
Handlers[iohBeforeRead] Assigned=FALSE
Handlers[iohAfterRead] Assigned=FALSE
Handlers[iohBeforeWrite] Assigned=FALSE
Handlers[iohAfterWrite] Assigned=FALSE
Handlers[iohDestroy] Assigned=FALSE

That happens sometimes when switching projects and opening Project options and press Cancel button on project options form.

Zeljan Rikalo

2020-03-10 13:46

developer   ~0121535

Gtk2 IDE - same error !

(lazarus:2169): Gtk-WARNING **: 13:46:17.455: gtk_widget_size_request() called on child widget with request equal
 to widget->requisition. gtk_widget_set_usize() may not work properly.
TApplication.HandleException: EAccessViolation
Access violation
  Stack trace:
  $0000000000730F57 line 192 of lazmethodlist.pas
  $00000000004A49BB line 404 of ideoptionsintf.pas
  $0000000000DD8446 line 411 of ideoptionsdlg.pas
  $00000000004C6291 line 5044 of main.pp
  $00000000004C2C1B line 4446 of main.pp
  $00000000004C2DED line 4458 of main.pp
  $0000000000A96BEE line 547 of menuintf.pas
  $0000000000A9C040 line 1699 of menuintf.pas
  $000000000064FFA1 line 83 of include/menuitem.inc
  $0000000000650BD9 line 288 of include/menuitem.inc
  $00000000004342DF
  $0000000000709A20 line 3737 of gtk2/gtk2proc.inc
  $00000000008D7BC5 line 139 of gtk2/gtk2wsmenus.pp

Juha Manninen

2020-03-10 14:22

developer   ~0121536

Last edited: 2020-03-10 14:26

View 2 revisions

Yes, I have seen this, too. It may have started already some time ago.
I set the target version for 2.2. We should get rid of Segmentation faults and Access violations.

Zeljan Rikalo

2020-03-10 14:55

developer   ~0121537

Same happens with
$fpc
Free Pascal Compiler version 3.2.0-beta-r43512 [2019/11/18] for x86_64

Issue History

Date Modified Username Field Change
2020-03-10 10:31 Zeljan Rikalo New Issue
2020-03-10 13:20 Zeljan Rikalo Note Added: 0121534
2020-03-10 13:46 Zeljan Rikalo Note Added: 0121535
2020-03-10 14:22 Juha Manninen Note Added: 0121536
2020-03-10 14:23 Juha Manninen Product Version => 2.1 (SVN)
2020-03-10 14:23 Juha Manninen Target Version => 2.2
2020-03-10 14:23 Juha Manninen LazTarget => -
2020-03-10 14:23 Juha Manninen Widgetset GTK 2, GTK 3, QT, QT5 => GTK 2, GTK 3, QT, QT5
2020-03-10 14:24 Juha Manninen Note View State: 0121536: private
2020-03-10 14:24 Juha Manninen Note View State: 0121536: public
2020-03-10 14:26 Juha Manninen Note Edited: 0121536 View Revisions
2020-03-10 14:55 Zeljan Rikalo Note Added: 0121537