View Issue Details

IDProjectCategoryView StatusLast Update
0037417LazarusIDEpublic2020-07-25 00:43
ReporterMartin Friebe Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platform64bit IntelOSwin 10 
Product Version2.1 (SVN) 
Summary0037417: crash in TXMLConfig.SetDeleteValue
DescriptionTo reproduce
- debug the IDE
- In the debugged IDE, open any project (must save to disk, with session)
  Must probably save in the NEW xml format with "[1]" index in the path
- Add a watch, with some expression (eg Foo)
- Add a watch, with an empty expression
  While that is an invalid watch, the calls to XmlConf will be valid
- Save the project

An access violation should occur.

procedure TCurrentWatch.SaveToXMLConfig(const AConfig: TXMLConfig; const APath: string);
begin
  AConfig.SetDeleteValue(APath + 'Expression/Value', Expression, '');

calls xmlconfig with a Path for the watch: "Debugging/Watches/Item[2]/Expression/Value"
Both the value (var Expression) and the default value are empty string.
This leads to
  DeleteValue('Debugging/Watches/Item[2]/Expression/Value')
being called.


In
procedure TXMLConfig.TNodeCache.RefreshChildren;
  aChild:=Node.FirstChild;

the object/self contains
NODE: TDOMNODE($5555555555555555)
NODESEARCHNAME: $00000000434632F8^: 'Item[2]'
CHILDRENVALID: False
CHILDREN: (TDOMNODE($0000000043340E88))
NODELISTNAME: nil
NODELIST: nil




#0 REFRESHCHILDREN(TNODECACHE($000000003E1D6710)) at B:\lazarus_latest_svn_2\components\lazutils\laz2_xmlcfg.pas:210
0000001 REFRESHCHILDRENIFNEEDED(TNODECACHE($000000003E1D6710)) at B:\lazarus_latest_svn_2\components\lazutils\laz2_xmlcfg.pas:234
0000002 FINDCHILDNODE(TXMLCONFIG($0000000042B80B50), 3, $00000000434636B8^: 'Expression', False) at B:\lazarus_latest_svn_2\components\lazutils\laz2_xmlcfg.pas:785
0000003 INTERNALFINDNODE(TXMLCONFIG($0000000042B80B50), $0000000043408FC8^: 'Debugging/Watches/Item[2]/Expression/Value', 36, False) at B:\lazarus_latest_svn_2\components\lazutils\laz2_xmlcfg.pas:732
0000004 FINDNODE(TXMLCONFIG($0000000042B80B50), $0000000043408FC8^: 'Debugging/Watches/Item[2]/Expression/Value', True) at B:\lazarus_latest_svn_2\components\lazutils\laz2_xmlcfg.pas:600
0000005 DELETEVALUE(TXMLCONFIG($0000000042B80B50), $0000000043408FC8^: 'Debugging/Watches/Item[2]/Expression/Value') at B:\lazarus_latest_svn_2\components\lazutils\laz2_xmlcfg.pas:572
0000006 SETDELETEVALUE(TXMLCONFIG($0000000042B80B50), $0000000043408FC8^: 'Debugging/Watches/Item[2]/Expression/Value', nil, nil) at B:\lazarus_latest_svn_2\components\lazutils\laz2_xmlcfg.pas:492
0000007 SAVETOXMLCONFIG(TCURRENTWATCH($00000000429AC350), TXMLCONFIG($0000000042B80B50), $0000000043408EE8^: 'Debugging/Watches/Item[2]/') at B:\lazarus_latest_svn_2\debugger\debugger.pp:5555
0000008 SAVETOXMLCONFIG(TCURRENTWATCHES($0000000022FC3020), TXMLCONFIG($0000000042B80B50), $0000000101310CB0^: 'Debugging/Watches/', False) at B:\lazarus_latest_svn_2\debugger\debugger.pp:5744
0000009 SAVETOXMLCONFIG(TIDEWATCHESMONITOR($0000000022FC2F40), TXMLCONFIG($0000000042B80B50), $0000000101310CB0^: 'Debugging/Watches/', False) at B:\lazarus_latest_svn_2\debugger\debugger.pp:3603
0000010 SAVEPROJECTSPECIFICINFO(TDEBUGMANAGER($00000000262AC5F0), TXMLCONFIG($0000000042B80B50), [PWFSKIPPROJECTINFO]) at B:\lazarus_latest_svn_2\ide\debugmanager.pas:2205
0000011 ONSAVEPROJECTINFOTOXMLCONFIG(TMAINIDE($000000000750F830), TPROJECT($000000003A619BF0), TXMLCONFIG($0000000042B80B50), [PWFSKIPPROJECTINFO]) at B:\lazarus_latest_svn_2\ide\main.pp:5745
0000012 SAVETOSESSION(TPROJECT($000000003A619BF0)) at B:\lazarus_latest_svn_2\ide\project.pp:3363
0000013 DOWRITE(TPROJECT($000000003A619BF0), $00000000430CF3D8^: 'B:\laz_configs\lazarus_latest_tmp\projectsessions\SynTest.lps', False) at B:\lazarus_latest_svn_2\ide\project.pp:3393
0000014 WRITEPROJECT(TPROJECT($000000003A619BF0), [], nil, TBUILDMATRIXOPTIONS($000000000634EB90)) at B:\lazarus_latest_svn_2\ide\project.pp:3493
0000015 SAVEPROJECTINFO([SFCHECKAMBIGUOUSFILES]) at B:\lazarus_latest_svn_2\ide\sourcefilemanager.pas:7517
0000016 SAVEPROJECT([SFCHECKAMBIGUOUSFILES]) at B:\lazarus_latest_svn_2\ide\sourcefilemanager.pas:3992
0000017 DOSAVEPROJECT(TMAINIDE($000000000750F830), [SFCHECKAMBIGUOUSFILES]) at B:\lazarus_latest_svn_2\ide\main.pp:6416
0000018 DOSAVEALL(TMAINIDE($000000000750F830), [SFCHECKAMBIGUOUSFILES]) at B:\lazarus_latest_svn_2\ide\main.pp:5800
0000019 DOSAVEFORBUILD(TMAINIDE($000000000750F830), CRCOMPILE) at B:\lazarus_latest_svn_2\ide\main.pp:6697
0000020 DOBUILDPROJECT(TMAINIDE($000000000750F830), CRCOMPILE, [], True) at B:\lazarus_latest_svn_2\ide\main.pp:6858
0000021 DOCOMPILE(TMAINIDE($000000000750F830)) at B:\lazarus_latest_svn_2\ide\main.pp:7229
0000022 MNUCOMPILEPROJECTCLICKED(TMAINIDE($000000000750F830), TOBJECT($000000000E8FA030)) at B:\lazarus_latest_svn_2\ide\main.pp:4557
0000023 EXECUTE(TIDECOMMAND($000000000E8FA030), TOBJECT($000000000E8FA030)) at B:\lazarus_latest_svn_2\components\ideintf\idecommands.pas:1523
0000024 PROCESSIDECOMMAND(TMAINIDE($000000000750F830), TOBJECT($000000003EDC4B30), 1401, False) at B:\lazarus_latest_svn_2\ide\main.pp:3662
0000025 PROCESSPARENTCOMMAND(TSOURCENOTEBOOK($000000003EDC4B30), TOBJECT($000000003EE424C0), 1401, #$00, POINTER(nil), False) at B:\lazarus_latest_svn_2\ide\sourceeditor.pp:8901
0000026 PROCESSUSERCOMMAND(TSOURCEEDITOR($000000003EE424C0), TOBJECT($000000003EEBF7A0), 1401, #$00, POINTER(nil)) at B:\lazarus_latest_svn_2\ide\sourceeditor.pp:4195
0000027 DOONPROCESSCOMMAND(TCUSTOMSYNEDIT($000000003EEBF7A0), 1401, #$00, POINTER(nil)) at B:\lazarus_latest_svn_2\components\synedit\synedit.pp:7623
0000028 COMMANDPROCESSOR(TCUSTOMSYNEDIT($000000003EEBF7A0), 1401, #$00, POINTER(nil), []) at B:\lazarus_latest_svn_2\components\synedit\synedit.pp:6833
0000029 KEYDOWN(TCUSTOMSYNEDIT($000000003EEBF7A0), 0, [SSCTRL]) at B:\lazarus_latest_svn_2\components\synedit\synedit.pp:3221
0000030 KEYDOWNBEFOREINTERFACE(TWINCONTROL($000000003EEBF7A0), 0, [SSCTRL]) at B:\lazarus_latest_svn_2\lcl\include\wincontrol.inc:5702
0000031 DOKEYDOWNBEFOREINTERFACE(TWINCONTROL($000000003EEBF7A0), TLMKEY($00000000013FF838), False) at B:\lazarus_latest_svn_2\lcl\include\wincontrol.inc:5833
0000032 CNKEYDOWN(TWINCONTROL($000000003EEBF7A0), TLMKEY($00000000013FF838)) at B:\lazarus_latest_svn_2\lcl\include\wincontrol.inc:7227
0000033 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal+181 at :0
0000034 WNDPROC(TWINCONTROL($000000003EEBF7A0), TMESSAGE($00000000013FF838)) at B:\lazarus_latest_svn_2\lcl\include\wincontrol.inc:5429
0000035 WNDPROC(TCUSTOMSYNEDIT($000000003EEBF7A0), TMESSAGE($00000000013FF838)) at B:\lazarus_latest_svn_2\components\synedit\synedit.pp:6393
0000036 DELIVERMESSAGE(TOBJECT($000000003EEBF7A0), 0) at B:\lazarus_latest_svn_2\lcl\lclmessageglue.pas:112
0000037 DOWINDOWPROC(TWINDOWPROCHELPER($00000000013FF768)) at B:\lazarus_latest_svn_2\lcl\interfaces\win32\win32callback.inc:2606
0000038 WINDOWPROC(266002, 256, 120, 4390913) at B:\lazarus_latest_svn_2\lcl\interfaces\win32\win32callback.inc:2771
0000039 user32:CallWindowProcW+957 at :0
0000040 HANDLEMESSAGE(TAPPLICATION($00000000000F8F50)) at B:\lazarus_latest_svn_2\lcl\include\application.inc:1208
0000041 RUNLOOP(TAPPLICATION($00000000000F8F50)) at B:\lazarus_latest_svn_2\lcl\include\application.inc:1327
0000042 APPRUN(TWIDGETSET($00000000000F9430), TAPPLICATIONMAINLOOP($00000000013FFE18)) at B:\lazarus_latest_svn_2\lcl\include\interfacebase.inc:54
0000043 RUN(TAPPLICATION($00000000000F8F50)) at B:\lazarus_latest_svn_2\lcl\include\application.inc:1315
0000044 main at B:\lazarus_latest_svn_2\ide\lazarus.pp:154
0000045 SYSTEM_$$_MAIN_WRAPPER$POINTER$POINTER$$INT64+6 at :0
TagsNo tags attached.
Fixed in Revision
LazTarget
Widgetset
Attached Files

Activities

Martin Friebe

2020-07-25 00:43

manager   ~0124317

Note that in
Revision: 63650
Date: 25 July 2020 00:39:08
Message: IDE, Debugger: prevent empty watches from being added.

the adding of empty watches was disabled.

To reproduce the issue you need an IDE prior to this. Or revert the changes of this commit.

Issue History

Date Modified Username Field Change
2020-07-25 00:24 Martin Friebe New Issue
2020-07-25 00:43 Martin Friebe Note Added: 0124317