Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,094
    • Issues 2,094
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

We will soon be undergoing scheduled maintenance to our database layer. We expect GitLab.com to be unavailable for up to 2 hours starting from 2022-07-02 06:00 UTC. Please note that any CI jobs that start before the maintenance window but complete during the window period will fail and may need to be started again.

  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #39503
Closed
Open
Created Dec 07, 2021 by Martin@martin_frbOwner

etMessageFrame / TMessagesCtrl => assertion fails, if "cursor up" on empty list

  • Lazarus/FPC Version: 2.3
  • Operating System: Win64

Hitting "up" on an empty "message window"

Normally, for an empty message window, in frame 5 "TMessagesCtrl.SelectLast" ViewCount will be 0. So nothing will happen. But if a View has just been created, but not yet any content...

function TMessagesCtrl.SelectLast(DoScroll, FullyVisible: boolean): boolean;
...
  i:=ViewCount-1;
  while (i>=0) do begin
...
  end;
  Result:=false;

procedure TMessagesCtrl.SetSelectedLine(AValue: integer);
...
  LineCnt:=SelectedView.GetShownLineCount(false,true)-1;
  Assert(AValue<=LineCnt, 'TMessagesCtrl.SetSelectedLine: Value '+IntToStr(AValue)
                        + ' > line count ' + IntToStr(LineCnt));
  • AValue = 0
  • LineCnt = -1

#0 FPC_RAISEEXCEPTION at :0
#1 SYSUTILS_$$_RAISELASTOSERROR$LONGINT+465 at :0
#2 FPC_ASSERT+31 at :0
#3 TMessagesCtrl.SetSelectedLine(TMessagesCtrl($0000000034EC1470), 0) at B:\lazarus_main\ide\etmessageframe.pas:1260
#4 TMessagesCtrl.Select(TMessagesCtrl($0000000034EC1470), TLMsgWndView($0000000050CA3BD0), 0, True, True) at B:\lazarus_main\ide\etmessageframe.pas:2047
#5 TMessagesCtrl.SelectLast(TMessagesCtrl($0000000034EC1470), True, True) at B:\lazarus_main\ide\etmessageframe.pas:2176
#6 TMessagesCtrl.SelectNextShown(TMessagesCtrl($0000000034EC1470), -1) at B:\lazarus_main\ide\etmessageframe.pas:2102
#7 TMessagesCtrl.KeyDown(TMessagesCtrl($0000000034EC1470), 38, [ssShift]) at B:\lazarus_main\ide\etmessageframe.pas:1784
#8 TWinControl.KeyDownBeforeInterface(TWinControl($0000000034EC1470), 38, [ssShift]) at B:\lazarus_main\lcl\include\wincontrol.inc:5700
#9 TWinControl.DoKeyDownBeforeInterface(TWinControl($0000000034EC1470), TLMKey (48384; 0; 38; 0; 0; 21495809; 0), False) at B:\lazarus_main\lcl\include\wincontrol.inc:5831
#10 TWinControl.CNKeyDown(TWinControl($0000000034EC1470), TLMKey (48384; 0; 38; 0; 0; 21495809; 0)) at B:\lazarus_main\lcl\include\wincontrol.inc:7211
#11 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal+145 at :0
#12 TWinControl.WndProc(TWinControl($0000000034EC1470), TMessage (48384; 38; 21495809; 0; 38; 0; TDWordFiller ((0, 0, 0, {1 more elements})); 1; 328; TDWordFiller ((0, 0, 0, {1 more elements})); 0; 0; TDWordFiller ((0, 0, 0, {1 more elements})))) at B:\lazarus_main\lcl\include\wincontrol.inc:5427
#13 DeliverMessage(TObject($0000000034EC1470), Unknown type($00000000013FF7C8)) at B:\lazarus_main\lcl\lclmessageglue.pas:112
#14 TWINDOWPROCHELPER.DoWindowProc(TWindowProcHelper (39847436; 256; 38; 21495809; TMessage (0; 0; 0; 0; 0; 0; TDWordFiller (({4 elements})); 0; 0; TDWordFiller (({4 elements})); 0; 0; TDWordFiller (({4 elements}))); $00000000013FF7C8; TWinControl($0000000034EC1470); False; True; $0000000035E1EAD0; TDoubleBuffer (0; 0; 0; 0); 0; 0; TLMPaint (0; 0; 0; nil; 0); False; 0; TLMScroll (0; 0; 0; 0; 0; 0; 0; 0); TLMKey (48384; 0; 38; 0; 0; 21495809; 0); TLMKey (0; 0; 0; 0; 0; 0; 0); TLMMouse (0; 0; 0; 0; TSmallPoint (0; 0); 0; 0); TLMContextMenu (0; 0; 0; 0; 0; TSmallPoint (0; 0); 0; 0); TLMMouse (0; 0; 0; 0; TSmallPoint (0; 0); 0; 0); TLMMouseEvent (0; 0; 0; 0; 0; 0; 0; 0; 0; nil; []); TLMMove (0; 0; 0; 0; 0; TSmallPoint (0; 0); 0; 0); TLMNotify (0; 0; 0; nil; 0); TDrawListItemStruct (0; TRect (0; 0; 0; 0; TPoint (0; 0); TPoint (0; 0); TArray4IntegerType({4 elements})); 0; []); $0000000001480001; TWinControl($0000000034EC1470))) at B:\lazarus_main\lcl\interfaces\win32\win32callback.inc:2608
#15 WindowProc(39847436, 256, 38, 21495809) at B:\lazarus_main\lcl\interfaces\win32\win32callback.inc:2773
Assignee
Assign to
Time tracking