Exception "List index (1) out of bounds" occurs when trying to get access text editor context menu.
Original Reporter info from Mantis: Cyrax
-
Reporter name:
Original Reporter info from Mantis: Cyrax
- Reporter name:
Description:
Windows.
win32: Free Pascal trunk 2.7.1-r23621, Lazarus trunk 1.1-r40322
FPC built with these options:
---
all
install
sourceinstall
UPXPROG=echo
OPT="-gw2 -godwarfsets -gl -O- -OoNO -Xs-"
COMPILER_OPTIONS="-gw2 -godwarfsets -gl -O- -OoNO -Xs-"
INSTALL_PREFIX=I:\free_pascal_and_lazarus\free_pascal_and_lazarus\fpc\trunk\build\trunk_x32
REVSTR=23621
IDE=1
---
Development Lazarus version built with these options:
---
-gw2
-godwarfsets
-gl
-gh
-gt
-Co
-Cr
-Ci
-Sa
-O-
-OoNO
-Xs-
-dHEAPTRC_WINDOW
-olazarus-debug-new.exe
-dVerboseOnPropHookCreateMethod
---
Excerpt from debug log:
---
TApplication.HandleException List index (1) out of bounds
Stack trace:
$0049D30F line 48 of ../objpas/classes/lists.inc
$0049D34E line 54 of ../objpas/classes/lists.inc
$00732E41 line 468 of syneditmarks.pp
$0073381C line 702 of syneditmarks.pp
$00734451 line 975 of syneditmarks.pp
$00A75CF9 line 6920 of synedit.pp
$008839A5 line 5950 of sourceeditor.pp
$00606DE8 line 43 of include/popupmenu.inc
$006070A3 line 80 of include/popupmenu.inc
$00607012 line 72 of include/popupmenu.inc
$0087DFBB line 4799 of sourceeditor.pp
$00A6300A line 2189 of synedit.pp
$00A636E1 line 2278 of synedit.pp
$004DD0D3 line 163 of lazmethodlist.pas
$00AC7AE0 line 1447 of synedittextbuffer.pp
$00AC5BF3 line 1216 of synedittextbuffer.pp
$00B448E4 line 962 of lazsynedittext.pas
TApplication.HandleException List index (1) out of bounds
Stack trace:
$0049D30F line 48 of ../objpas/classes/lists.inc
$0049D34E line 54 of ../objpas/classes/lists.inc
$00732E41 line 468 of syneditmarks.pp
$0073381C line 702 of syneditmarks.pp
$00734451 line 975 of syneditmarks.pp
$00A75CF9 line 6920 of synedit.pp
$008839A5 line 5950 of sourceeditor.pp
$00606DE8 line 43 of include/popupmenu.inc
$006070A3 line 80 of include/popupmenu.inc
$00607012 line 72 of include/popupmenu.inc
$0087E07D line 4820 of sourceeditor.pp
$00AB38EA line 905 of syneditmousecmds.pp
$00A65561 line 2959 of synedit.pp
$00A66539 line 3221 of synedit.pp
$00A67DD8 line 3524 of synedit.pp
$005D536C line 2168 of include/control.inc
$005D6088 line 2637 of include/control.inc
---
This happens after when finishing debugging a project and trying to invoke text editors popupmenu.
Attached (project.zip) test case.
Steps to reproduce:
- Add breakpoint inside TForm1.Button1Click.
- Start debugging project.
- When debugger breaks, continue program execution.
- Close program.
- Try to invoke context menu.
You may need to do steps 2,3,4 and 5 again to trigger this bug.
Mantis conversion info:
- Mantis ID: 23889
- Build: r40322
- Version: 1.1 (SVN)
- Fixed in version: 1.1 (SVN)
- Fixed in revision: 40325 (#3d7f4443)
- Target version: 1.2.0
- LazTarget: 1.2