bug: TList item index out of bounds.

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
Claude_M
Posts: 2
Joined: Tue Jul 18, 2017 7:23 am

bug: TList item index out of bounds.

Post by Claude_M »

A user gets this exception:

Code: Select all

Listenindex außerhalb des gültigen Bereichs (-1).
= List index is out of bounds (-1)

So the value is -1, which is never a valid item index.

The exception happens in SclRView on Line 12899, which is this:

Code: Select all

rvd.DrawItem2Item(EDrawItemNo, rvd.DrawItems.Items[EDrawItemNo].Length, EItemNo, EItemOffs);
This happens when the user is editing some RTF document. Out applications shows a new window with a "wordlike" UI for editing documents.
It's obviously on some mouse event. I assume that the user is just using the mouse.

When I debug I always get bInLeft = False, so this line is never executed. But a user gets this often.
I don't even see any code that could set bInLeft to True.
Even when I use the debugger to set bInLeft to True I still don't get index -1.

This might be fixed, but I don't see any version information for TScaleRichView. How do I know on which version I am?

Stack Trace:

Code: Select all

main thread ($2b54):
00527ce5 +015 EasyCase_TG.exe System.Classes            TList.Get
008bb23e +00a EasyCase_TG.exe DLines           548   +1 TRVDrawLines.Get
00d089a3 +0fb EasyCase_TG.exe SclRView       12899  +15 MouseDownSetSelection
00d08f39 +52d EasyCase_TG.exe SclRView       13046 +134 TSRichViewEdit.MouseDown
005c4309 +0a5 EasyCase_TG.exe Vcl.Controls    7388   +7 TControl.DoMouseDown
005c436c +054 EasyCase_TG.exe Vcl.Controls    7399   +7 TControl.WMLButtonDown
00d18507 +05f EasyCase_TG.exe SclRView       19760   +8 TSRichViewEdit.WMLButtonDown
005c3b83 +33f EasyCase_TG.exe Vcl.Controls    7249  +91 TControl.WndProc
005c9ba7 +64b EasyCase_TG.exe Vcl.Controls   10079 +158 TWinControl.WndProc
00cf8bee +00a EasyCase_TG.exe SclRView        7111   +1 TSRichViewEdit.WndProc
005c9088 +034 EasyCase_TG.exe Vcl.Controls    9786   +3 TWinControl.MainWndProc
0053ff88 +014 EasyCase_TG.exe System.Classes            StdWndProc
75ac7885 +00a USER32.dll                                DispatchMessageW
006e5113 +12b EasyCase_TG.exe Vcl.Forms      10443  +23 TApplication.ProcessMessage
006e5163 +00f EasyCase_TG.exe Vcl.Forms      10473   +1 TApplication.HandleMessage
006defca +1aa EasyCase_TG.exe Vcl.Forms       7218  +33 TCustomForm.ShowModal
010d750a +07a EasyCase_TG.exe Fall            1348  +10 TfrFall.setMWord
010b4277 +07b EasyCase_TG.exe StdBrief         358   +7 TfrStdBrief.MWordPrint
010b3e80 +160 EasyCase_TG.exe StdBrief         347  +29 TfrStdBrief.btnMWordClick
005c41e2 +0a6 EasyCase_TG.exe Vcl.Controls    7365   +9 TControl.Click
00710f4a +00a EasyCase_TG.exe Vcl.Buttons     1549   +1 TSpeedButton.Click
00710f2c +114 EasyCase_TG.exe Vcl.Buttons     1542  +25 TSpeedButton.MouseUp
005c4714 +048 EasyCase_TG.exe Vcl.Controls    7493   +2 TControl.DoMouseUp
005c47a5 +085 EasyCase_TG.exe Vcl.Controls    7506   +9 TControl.WMLButtonUp
006e741f +0ab EasyCase_TG.exe Vcl.Forms      11649   +9 TApplication.DispatchAction
005c3b83 +33f EasyCase_TG.exe Vcl.Controls    7249  +91 TControl.WndProc
005c9ba7 +64b EasyCase_TG.exe Vcl.Controls   10079 +158 TWinControl.WndProc
005c3672 +036 EasyCase_TG.exe Vcl.Controls    7027  +10 TControl.Perform
005c93ca +0da EasyCase_TG.exe Vcl.Controls    9856  +15 TWinControl.IsControlMouseMsg
005c99f8 +49c EasyCase_TG.exe Vcl.Controls   10025 +104 TWinControl.WndProc
005c9088 +034 EasyCase_TG.exe Vcl.Controls    9786   +3 TWinControl.MainWndProc
0053ff88 +014 EasyCase_TG.exe System.Classes            StdWndProc
75ac7885 +00a USER32.dll                                DispatchMessageW
006e5113 +12b EasyCase_TG.exe Vcl.Forms      10443  +23 TApplication.ProcessMessage
006e5163 +00f EasyCase_TG.exe Vcl.Forms      10473   +1 TApplication.HandleMessage
006e552f +0d3 EasyCase_TG.exe Vcl.Forms      10611  +26 TApplication.Run
0115aa07 +1c3 EasyCase_TG.exe EasyCase_TG      179  +53 initialization
77313368 +010 kernel32.dll                              BaseThreadInitThunk
stack dump:

Code: Select all

0018f548  ea 7c 52 00 de fa ed 0e - 01 00 00 00 07 00 00 00  .|R.............
0018f558  5c f5 18 00 ea 7c 52 00 - 80 ff ff 2b 00 00 00 00  \....|R....+....
0018f568  ff ff ff ff 0a f6 18 00 - 9c f5 18 00 78 f5 18 00  ............x...
0018f578  58 f8 18 00 20 9e 40 00 - 9c f5 18 00 10 c1 36 06  X... [email protected].
0018f588  00 00 00 00 ff ff ff ff - 00 f5 18 00 ff ff ff ff  ................
0018f598  5c 40 44 00 e4 f5 18 00 - ea 7c 52 00 ff ff ff ff  \@D......|R.....
0018f5a8  10 c1 36 06 43 b2 8b 00 - 10 c1 36 06 ff ff ff ff  ..6.C.....6.....
0018f5b8  a8 89 d0 00 dc f5 18 00 - e0 f5 18 00 9c 63 93 00  .............c..
0018f5c8  50 90 03 17 f3 00 00 00 - ba 02 00 00 70 00 00 00  P...........p...
0018f5d8  ff ff ff ff 70 00 00 00 - 7f 04 00 00 60 f6 18 00  ....p.......`...
0018f5e8  3e 8f d0 00 60 f6 18 00 - ad a8 03 00 0c 8a d0 00  >...`...........
0018f5f8  50 90 03 17 58 f8 18 00 - b6 a6 b2 75 00 f8 61 88  P...X......u..a.
0018f608  a6 03 ff ff 00 f8 e5 88 - a6 03 ad 75 00 00 00 00  ...........u....
0018f618  18 6c 41 00 b0 00 00 01 - ff ff ff ff 70 00 00 00  .lA.........p...
0018f628  7f 04 00 00 00 00 00 00 - 00 00 fc ff 00 00 00 00  ................
0018f638  8c f8 18 00 18 4e ce 00 - 00 00 01 01 ff ff ff ff  .....N..........
0018f648  fa 48 ad 00 50 90 03 17 - 20 08 00 00 b0 76 11 17  .H..P... ....v..
0018f658  70 00 00 00 7f 04 00 00 - 88 f6 18 00 0e 43 5c 00  p............C\.
0018f668  ba 02 00 00 f3 00 00 00 - 8c f8 18 00 b0 09 05 00  ................
0018f678  50 90 03 17 8c f6 18 00 - 8c f8 18 00 50 90 03 17  P...........P...
Stats:
operating system : Windows 2008 R2 x64 Service Pack 1 build 7601
processors : 4x Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz
physical memory : 9081/18431 MB (free/total)
compiled with : Delphi 10 Seattle

Note: The application is used over Citrix.

How can I fix this?

Claude
Sergey Tkachenko
Site Admin
Posts: 17236
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: bug: TList item index out of bounds.

Post by Sergey Tkachenko »

This is an old version of ScaleRichView (I checked the line 12899 in the new version, it is different).
You can find SRV_VERSION constant at the beginning of SclRView.pas. The current version is 'v7.8.3'.

So please upgrade.
If you do not know how to download the new version, send me a private message with information allowing me to find your order (for example, which email address was specified in the order)
Claude_M
Posts: 2
Joined: Tue Jul 18, 2017 7:23 am

Re: bug: TList item index out of bounds.

Post by Claude_M »

Would an upgrade solve this problem?
I'd need to know what exactly I can promise the users when I ship a new version with the new release of ScaleRichView.
Does the method in the latest release handle -1 when accessing that list?

Claude
Sergey Tkachenko
Site Admin
Posts: 17236
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: bug: TList item index out of bounds.

Post by Sergey Tkachenko »

There are no known bugs in the current version of ScaleRichView. I believe the problem is fixed, and it does not attempt to access the -1-th item.

But I can be 100% sure only if you can explain how to reproduce this bug, so I can test it on a new version. Or you can test it on a trial version from http://www.trichview.com/download/
Post Reply