Crash in IDE if range check on
Original Reporter info from Mantis: mftq75
-
Reporter name: C Western
Original Reporter info from Mantis: mftq75
- Reporter name: C Western
Description:
Showing the stack window triggers a range check error if the IDE and LCL are compiled with range checks on. The crash is triggered in SetColumnWidth(-60) which fails because the OS routine takes an unsigned int. The attached patch forces the column width to zero if the supplied width is negative, which hides the error in this case. It may reflect an error in the autosizing code (see stack trace), but the stack window seems to work OK.
Additional information:
#0 0x00024ff0 in fpc_raiseexception ()
#1 0x00054d17 in SYSUTILS_$$_RUNERRORTOEXCEPT$LONGINT$POINTER$POINTER ()
#2 0x002e17f5 in TCARBONLISTCOLUMN__SETHEADERWIDTH (AWIDTH=-97, this=0x15c5c640) at ./carbon/carbonlistviews.pp:431
#3 0x002e1f2d in TCARBONLISTCOLUMN__SETWIDTH (AWIDTH=-97, this=0x15c5c640) at ./carbon/carbonlistviews.pp:593
#4 0x002e4c88 in TCARBONDATABROWSER__AUTOSIZECOLUMNS (this=0x15c5c580) at ./carbon/carbonlistviews.pp:1513
#5 0x0032a769 in TCARBONWSCUSTOMLISTVIEW__COLUMNSETWIDTH (ALV=0x15b05eb0, AINDEX=4, ACOLUMN=0x15c6db60, AWIDTH=643, pvmt=0x15afdef0) at ./carbon/carbonwscomctrls.pp:563
#6 0x002f73e9 in TLISTCOLUMN__SETWIDTH (AVALUE=643, this=0x15c6db60) at ./include/listcolumn.inc:186
#7 0x00b1a8c7 in TCALLSTACKDLG__COLSIZESETTER (ACOLID=5, ASIZE=643, this=0x15b8a090) at /Users/ctcmw/fpc/lazarus.w/debugger/callstackdlg.pp:244
#8 0x00b1a1ad in CALLSTACKDLGCOLSIZESETTER (AFORM=0x15b8a090, ACOLID=5, ASIZE=643) at /Users/ctcmw/fpc/lazarus.w/debugger/callstackdlg.pp:178
#9 0x0042fc7a in TSIMPLEWINDOWLAYOUT__APPLYDIVIDER (AFORCE=false, this=0x11d60250) at idewindowintf.pas:1403
#10 0x0042fb26 in TSIMPLEWINDOWLAYOUT__APPLY (this=0x11d60250) at idewindowintf.pas:1382
#11 0x004305d2 in TSIMPLEWINDOWLAYOUTLIST__APPLYANDSHOW (SENDER=0xbd5c260, AFORM=0x15b8a090, BRINGTOFRONT=false, AMOVETOVISBLEMODE=VMALWAYSMOVETOVISIBLE, this=0xbd6a0a0)
at idewindowintf.pas:1575
#12 0x004325c3 in TIDEWINDOWCREATORLIST__SHOWFORM (AFORM=0x15b8a090, BRINGTOFRONT=false, AMOVETOVISBLEMODE=VMALWAYSMOVETOVISIBLE, this=0xbd5c260) at idewindowintf.pas:2064
#13 0x004327da in TIDEWINDOWCREATORLIST__RESTORESIMPLELAYOUT (this=0xbd5c260) at idewindowintf.pas:2100
#14 0x0008714e in TMAINIDE__RESTOREIDEWINDOWS (this=0x13d8c290) at main.pp:2459
#15 0x000818af in TMAINIDE__STARTIDE (this=0x13d8c290) at main.pp:1557
#16 0x000117e7 in PASCALMAIN () at lazarus.pp:121
Mantis conversion info:
- Mantis ID: 27581
- OS: MacOSX
- Platform: i386
- Version: 1.5 (SVN)
- Fixed in revision: 48093 (#12d74d7a)