IDE Change Language -> List index (-1) out of bounds
Original Reporter info from Mantis: theo @theo222
-
Reporter name:
Original Reporter info from Mantis: theo @theo222
- Reporter name:
Description:
Runtime Error when changing Language in Options -> Desktop -> Language.
Lazarus 0.9.29 r23523M FPC 2.4.0 i386-linux-gtk 2 (beta)
Additional information:
Error happens here: frames/editor_general_misc_options.pas:120
procedure UpdateOption(const CheckBoxName: String; AnOption: TSynEditorOption);
var
i: integer;
begin
i := EditorOptionsGroupBox.Items.IndexOf(CheckBoxName);
//Shold we check for -1 here? How can it happen?
UpdateOptionFromBool(EditorOptionsGroupBox.Checked[i], AnOption);
end;
Backtrace:
#0 0x0806cb16 in fpc_raiseexception ()
#1 0x080f7308 in CLASSES_TFPLIST_$__ERROR$ANSISTRING$LONGINT ()
#2 0x080f6f2f in CLASSES_TFPLIST_$__RAISEINDEXERROR$LONGINT ()
#3 0x080f6f54 in CLASSES_TFPLIST_$__GET$LONGINT$$POINTER ()
#4 0xb6b79af0 in ?? ()
#5 0x0855244c in UPDATEOPTION (CHECKBOXNAME=0xb0421e08 "Sonderzeichen anzeigen", ANOPTION=EOSHOWSPECIALCHARS,
parentfp=0xbfffe2bc) at ./frames/editor_general_misc_options.pas:120
#6 0x08552319 in TEDITORGENERALMISCOPTIONSFRAME__WRITESETTINGS (AOPTIONS=0xb6d1d840, this=<error reading variable>)
at ./frames/editor_general_misc_options.pas:126
#7 0x0853d710 in TRAVERSE (NODE=0xb062c860, parentfp=0xbfffe328) at ideoptionsdlg.pas:224
#8 0x0853d722 in TRAVERSE (NODE=0xb062c6e0, parentfp=0xbfffe328) at ideoptionsdlg.pas:225
#9 0x0853d722 in TRAVERSE (NODE=0xb0653d60, parentfp=0xbfffe328) at ideoptionsdlg.pas:225
#10 0x0853d734 in TRAVERSE (NODE=0xb0651f00, parentfp=0xbfffe328) at ideoptionsdlg.pas:226
#11 0x0853d67e in TIDEOPTIONSDIALOG__WRITESETTINGS (AOPTIONS=0xb6d1d840, this=<error reading variable>)
at ideoptionsdlg.pas:236
#12 0x0853d8b5 in TIDEOPTIONSDIALOG__WRITEALL (this=<error reading variable>) at ideoptionsdlg.pas:287
#13 0x080a350a in TMAINIDE__DOOPENIDEOPTIONS (AEDITOR=<incomplete type>, ACAPTION=0x0,
AOPTIONSFILTER=<incomplete type>, this=<error reading variable>) at main.pp:4231
#14 0x080a30e9 in TMAINIDE__MNUENVGENERALOPTIONSCLICKED (SENDER=0xb6b02d20, this=<error reading variable>)
at main.pp:4148
#15 0x08450be8 in TIDEMENUITEM__MENUITEMCLICK (SENDER=0xb68df320, this=<error reading variable>) at menuintf.pas:538
#16 0x084539aa in TIDEMENUCOMMAND__MENUITEMCLICK (SENDER=0xb68df320, this=<error reading variable>)
at menuintf.pas:1545
#17 0x081c5aa1 in TMENUITEM__CLICK (this=<error reading variable>) at ./include/menuitem.inc:75
#18 0x081c60d8 in TMENUITEM__DOCLICKED (MSG=void, this=<error reading variable>) at ./include/menuitem.inc:269
Mantis conversion info:
- Mantis ID: 15559
- Version: 0.9.29 (SVN)
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 23597 (#265891c7)