following error occurs, when I have different ribbon-groups for different mdi-children:
- Code: Select all Expand view
- Application
===========
Path and name: D:\cto_win\eho40\eho.exe (32 bits)
Size: 5,427,712 bytes
Time from start: 0 hours 0 mins 4 secs
Error occurred at: 12.07.2010, 14:14:28
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 6
Stack Calls
===========
Called from: .\source\classes\TRBGROUP.PRG => TRBGROUP:CALPOS(834)
Called from: .\source\classes\TRBGROUP.PRG => TRBGROUP:PAINT(520)
Called from: .\source\classes\TRBGROUP.PRG => (b)TRBGROUP:TRBGROUP(96)
Called from: => TRBGROUP:DISPLAY(0)
Called from: control.prg => TCONTROL:HANDLEEVENT(1360)
Called from: .\source\classes\TRBGROUP.PRG => TRBGROUP:HANDLEEVENT(323)
Called from: .\source\classes\WINDOW.PRG => _FWH(3391)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(976)
Called from: EHO.prg => MAIN(700)
System
======
CPU type: AMD Athlon(tm) 64 Processor 3200+ 2017 Mhz
Hardware memory: -1024 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6714)
Windows version: 6.0, Build 6001 Service Pack 1
...
...
Variables in use
================
Procedure Type Value
==========================
TRBGROUP:CALPOS
Local 1: O Class: TRBGROUP
Local 2: N 1626
Local 3: N 6
Local 4: U
Local 5: U
Local 6: A Len: 5
Local 7: N 6
Local 8: U
Local 9: U
TRBGROUP:PAINT
Local 1: O Class: TRBGROUP
Local 2: U
Local 3: U
Local 4: A Len: 4
Local 5: U
Local 6: U
Local 7: U
Local 8: U
Local 9: U
Local 10: U
Local 11: U
Local 12: U
Local 13: U
Local 14: U
Local 15: U
Local 16: U
Local 17: U
Local 18: U
Local 19: U
Local 20: U
Local 21: U
Local 22: U
Local 23: L .F.
Local 24: N 0
Local 25: N 0
Local 26: U
Local 27: N 1
Local 28: N 2053
Local 29: N 0
Local 30: U
Local 31: U
Local 32: U
Local 33: U
Local 34: U
Local 35: U
Local 36: U
Local 37: U
(b)TRBGROUP:TRBGROUP
Param 1: O Class: TRBGROUP
TRBGROUP:DISPLAY
TCONTROL:HANDLEEVENT
Param 1: N 15
Param 2: N 0
Param 3: N 0
Local 1: O Class: TRBGROUP
Local 2: U
TRBGROUP:HANDLEEVENT
Param 1: N 15
Param 2: N 0
Param 3: N 0
Local 1: O Class: TRBGROUP
_FWH
Param 1: N 0
Param 2: N 15
Param 3: N 0
Param 4: N 0
Param 5: N 196
Local 1: O Class: TRBGROUP
WINRUN
Param 1: N 592480
TMDIFRAME:ACTIVATE
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: B {|| ... }
Param 4: U
Param 5: U
Param 6: B {|| ... }
Param 7: U
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: B {|| ... }
Param 18: U
Param 19: U
Local 1: O Class: TMDIFRAME
Local 2: U
Local 3: U
MAIN
Local 1: C ""
Local 2: U
Local 3: U
Local 4: U
Local 5: U
Local 6: U
Local 7: C "D:\cto_win\eho40\eho.exe"
Local 8: U
Local 9: C "Netz-EHO Business Version 2010 Version 2 Build CDX 1 "
Local 10: U
Local 11: C ""
Local 12: C ""
Local 13: C ""
Local 14: C ""
Local 15: U
Local 16: U
Local 17: O Class: TFONT
Local 18: U
Local 19: U
Local 20: U
Local 21: U
Local 22: U
Local 23: U
...
...
Classes in use:
===============
1 ERROR
2 HASHENTRY
3 HBCLASS
4 HBOBJECT
5 TFONT
6 TWINDOW
7 TMDIFRAME
8 TMENU
9 TCONTROL
10 TICON
11 TBRUSH
12 TMDICLIENT
13 TMSGBAR
14 TRECT
15 TMSGITEM
16 TTIMER
17 TBITMAP
18 TMENUITEM
19 TRIBBONBAR
20 TRPANEL
21 TBACKSTAGE
22 TBACKSTAGEOPTION
23 TRBTN
24 TRBGROUP
25 TINI
26 TMDICHILD
27 TXBROWSE
28 TCTOXBROWSE
29 TXBRWCOLUMN
30 TSCROLLBAR
31 TBTNBMP
32 TCURSOR
33 TREG32
Memory Analysis
===============
862 Static variables
Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes
It always occurs, when I have opened more than one mdi-child and then click on the title-bar of the child in behind, trying to drag it.
So I took a look into the class trbgroup and found the following in line 834:
- Code: Select all Expand view
- while ::oWnd:aControls[ n ]:nId != ::nId .or. n > len( ::oWnd:aControls )
and changed it into
- Code: Select all Expand view
- while n <= len( ::oWnd:aControls ) .AND. ::oWnd:aControls[ n ]:nId != ::nId
and now it works.
Antonio, is this change correct?