a customer reported me the error in subject that was appairing after pressing the xbrowse scroll bar.
I have been unable to repeat this problem.
This is the image of the error:

Any ideas ?
Thanks in advance.
Marco Turco
SOFTWARE XP LLP

Marco,
Unfortunately, the first error is not visible. The second error is caused by the error handler processing the same error over and over.
Can the customer repeat the error? If so, can you get them to send you a screenshot showing the first error?
James
Unfortunately, when such errors occur, there is no way to stop the loop in errorsys. Also sometimes when there are array bound problems, error appears without any clue about the offending code.
These situations are very difficult to handle. I find no other way except to start with simplest code ( commenting out many other lines ) and slowly uncommenting one line after another or some other method similar to that.
In most of the cases, the errors occur due to our code. Most FWH libraries assume that the variables we provide to the libraries are of valid type and are within bounds. FWH libraries do not always check for validity of the values provided. May be such a check would slow down the performance. No doubt such cases do take lot of time to debug, but in all cases, I found the problem to be with my code rather than with FWH code.
In this case also it is better to start with the offending browse in a separte module. Start with one column with simplest features and keep adding other features one by one till we face the problem
many times the error.log is generated with the original error, try reviewing it.
STATIC FUNCTION AutoEdit( oWnd )
local oChild, oBrw, oCol
local nFor
DEFINE WINDOW oChild TITLE "Auto edit browse" MDICHILD OF oWnd
oBrw := TXBrowse():New( oWnd )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:SetRDD()
for nFor := 1 to len( oBrw:aCols )
oCol := oBrw:aCols[ nFor ]
oCol:nEditType := 1
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, FieldPut( o:nCreationOrder, v ), ) }
next
oBrw:CreateFromCode()
oChild:oClient := oBrw
oBrw:bPastEof() := {||msginfo("APND")} // ADDED !!!!!!!!!!!!
ACTIVATE WINDOW oChild ON INIT oBrw:SetFocus()
RETURNFrank and others,
When you post a question and you don't get an answer, please insist and also email me directly.
Sometimes we miss to answer questions, and the only way to get an answer is to insist asking for a solution, unless we publically comment that we don't know how to solve it yet.
We are going to review this issue inmediately
If we keep pressing the down arrow of the vertical scroll bar, method godown is executed so many times and naturally the bPastEof is evaluated as many times as we keep the arrow button pressed. I think we need to expect this.
#include 'fivewin.ch'
#include 'xbrowse.ch'
//----------------------------------------------------------------------------//
function Main()
local oWnd, oBrw
SET DELETED ON
use sales alias test
DEFINE WINDOW oWnd
@ 0,0 XBROWSE oBrw ;
ALIAS 'TEST' ;
AUTOCOLS ;
FASTEDIT
AEval( oBrw:aCols, { |o| o:nEditType := EDIT_GET } )
// oBrw:bPastEof := {||msginfo("APND")}
oBrw:bPastEof := { || AddRec( oBrw ) }
oBrw:bOnRowLeave := { || RowLeave( oBrw ) }
oBrw:CreateFromCode()
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
static function AddRec( oBrw )
local nRec
if Empty( ( oBrw:cAlias )->Date )
// We have already appended a blank record
// user is still to edit the record
// so we should not append one more record
// Avoid responding to repeated multiple calls
// Take no action.
else
nRec := ( oBrw:cAlias )->( RecNo() )
( oBrw:cAlias )->( dbAppend(), dbGoTo( nRec ) )
oBrw:GoDown() // note this works when dbf is not in any index order
// otherwise we need to code it differently
oBrw:lEdited := .t.
endif
return nil
//----------------------------------------------------------------------------//
static function RowLeave( oBrw )
if Empty( ( oBrw:cAlias )->Date ) .and. ;
( oBrw:cAlias )->( RecNo() ) == ( oBrw:cAlias )->( LastRec() )
// We are now leaving the last record just appended
// user has not filled any valid data
// we need to delete this record
( oBrw:cAlias )->( DbDelete() )
oBrw:Refresh()
endif
return nil
//----------------------------------------------------------------------------//#include 'fivewin.ch'
#include 'xbrowse.ch'
function Main()
local oChild, oBrw, oCol
local nFor
use sales alias test
DEFINE WINDOW oWnd TITLE "Auto edit browse"
oBrw := TXBrowse():New( oWnd )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:SetRDD()
for nFor := 1 to len( oBrw:aCols )
oCol := oBrw:aCols[ nFor ]
oCol:nEditType := 1
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, FieldPut( o:nCreationOrder, v ), ) }
next
oBrw:CreateFromCode()
oWnd:oClient := oBrw
oBrw:bPastEof := {|| PastEOF() } // ADDED !!!!!!!!!!!!
ACTIVATE WINDOW oWnd ON INIT oBrw:SetFocus()
RETURN nil
static function PastEOF()
static lShown
if Empty( lShown ) .or. ! lShown
lShown = .T.
MsgInfo( "APND" )
lShown = .F.
endif
return nilMarco,
Please check your error.log file and find the first error that generates the recursive error. Thanks,
I required the error.log to my customer.
I will know you as soon as I will receive it.
Thanks to all.
nageswaragunupudi wrote:If we keep pressing the down arrow of the vertical scroll bar, method godown is executed so many times and naturally the bPastEof is evaluated as many times as we keep the arrow button pressed. I think we need to expect this.
METHOD GoDown() CLASS TXBrowse
local nLines
if ::nLen == 0 .or. Eval( ::bEof, Self )
if ::bPastEof != nil
# ifdef FRANKDEMONT
IF PROCNAME(1) <> "TXBROWSE:VSCROLL"
Eval( ::bPastEof )
END
# else
Eval( ::bPastEof )
# endif
endif
return nil
endif
::CancelEdit()
::Seek()
nLines := ::RowCount()
::DrawLine()
if Eval( ::bSkip, 1, Self ) == 1
if ::nRowSel < nLines
::nRowSel++
else
//XBrwScroll( ::hWnd, 1, ::nRowHeight, ::nHeaderHeight , ::nFooterHeight )
XBrwScr2( ::hWnd, ::nRowHeight, ::HeaderHeight(), nLines * ::nRowHeight )
endif
if ::bChange != nil
Eval( ::bChange, Self, .t. )
endif
if ::oVScroll != nil
::VGoDown()
endif
else
if ::bPastEof != nil
# ifdef FRANKDEMONT
IF PROCNAME(1) <> "TXBROWSE:VSCROLL"
Eval( ::bPastEof )
END
# else
Eval( ::bPastEof )
# endif
//Eval( ::bPastEof, Self )
endif
if ::oVScroll != nil
::VGoBottom()
endif
endif
::DrawLine( .t. )
return nil>>
Excuse me , but i sayed 'clicked' , not 'pressing'
>>
Yes. Clicking more than once. Pressing amounts to clicking more than once.
>>
the user expects that bpasteof will be executed only one time
>>
Definitely so. Thats what we should take care of in our code. Both the above examples handle this properly.
>>>>
# ifdef FRANKDEMONT
IF PROCNAME(1) <> "TXBROWSE:VSCROLL"
Eval( ::bPastEof )
END
# else
Eval( ::bPastEof )
# endif
>>>>
This means, pressing down arrow button on vertial scroll bar does not evaluate bPostEof.
Still pressing Down Arrow does call bpasteof, each time the user presses.
Assuming we append a record and offer inline editing ( not in a separate dialog ), the user can again press down arrow and do we append another record?
For that reason, I personally feel that the right place to avoid responding to second and subsequent ( 'click' of button or pressing down arrow) calls is our bPastEof codeblock till the intended append is finished or cancelled.
nageswaragunupudi wrote:>>
>>>>
# ifdef FRANKDEMONT
IF PROCNAME(1) <> "TXBROWSE:VSCROLL"
Eval( ::bPastEof )
END
# else
Eval( ::bPastEof )
# endif
>>>>
This means, pressing down arrow button on vertial scroll bar does not evaluate bPostEof.
Still pressing Down Arrow does call bpasteof, each time the user presses.
Assuming we append a record and offer inline editing ( not in a separate dialog ), the user can again press down arrow and do we append another record?
For that reason, I personally feel that the right place to avoid responding to second and subsequent ( 'click' of button or pressing down arrow) calls is our bPastEof codeblock till the intended append is finished or cancelled.
Hi all,
pls. find as follows the error.log info about this error.
Any ideas ?
Path and name: C:\pigc\pigc.exe (32 bits)
Size: 7,785,256 bytes
Time from start: 26 hours 34 mins 22 secs
Error occurred at: 29/07/08, 18:37:54
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 0
Called from: XBROWSE.PRG => (b)TXBROWSE:TXBROWSE(401)
Called from: => TXBROWSE:AROW(0)
Called from: XBROWSE.PRG => (b)TXBRWCOLUMN:ADJUST(4729)
Called from: XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA(5322)
Called from: XBROWSE.PRG => TXBROWSE:DRAWLINE(1156)
Called from: XBROWSE.PRG => TXBROWSE:PAINT(1032)
Called from: XBROWSE.PRG => TXBROWSE:DISPLAY(786)
Called from: CONTROL.PRG => TXBROWSE:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => SYSREFRESH(0)
Called from: MOD110.PRG => SELECTFUNC_CONS(253)
Called from: MOD110.PRG => (b)SELECTFUNC_CONS(268)
Called from: XBROWSE.PRG => TXBROWSE:VSCROLL(1943)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TXBROWSE:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: MOD0.PRG => MOD0(287)
Called from: PIGC.PRG => START(825)
CPU type: Intel(R) Core(TM)2 Duo CPU E4400 @ 2.00GHz 2000 Mhz
Hardware memory: 2048 megs
Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %
Compiler version: xHarbour build 1.1.0 Intl. (SimpLex) (Rev. 6095)
Windows version: 5.1, Build 2600 Service Pack 3
Windows total applications running: 89
1
2 Elenco a discesa suggerimenti automatici
3 CiceroUIWndFrame
4 TF_FloatingLangBar_WndTitle
5 M
6 Default IME
7 SysFader
8 Menu Avvio
9 Fornitori
10 Invia
11 Collegamenti
12 PROCEDURA INTEGRATA GESTIONE CONDOMINIO 2008
13 SOFTWARE XP • Leggi argomento - ERRORE SU BARRE LATERALI IN CONSUNTIVO / ANAGRAFICHE -
14 Bogus
15 Menu di scelta rapida
16 Posta in arrivo - Microsoft Outlook
17 Layered Hidden Window
18 Connessione desktop remoto
19 Mario: andare da Sormani con stampante e router - Riunione
20 Temporary context menu
21 EnvTB
22 Microsoft Word
23 RLERRT59M18L736W
24 Impostazioni e-mail
25 Danea Easyfatt 2006 Professional rev. 21b < WINSOFT MARIO >
26 Danea Easyfatt 2006
27 Software XP's Customers Monitor v.2.2
28 BARBARA NICOLIG - Contatto
29 MCI command handling window
30 Acrobat IEHelper
31 DDE Server Window
32 4 Promemoria
33 Java Sys Tray
34 theAwtToolkitWindow
35 Richiesta versione in prova dal sito www.gestione-stabili.com - Messaggio (Testo normale)
36 PRIMO FOSCHI - Contatto
37 GIORGIO BIONDI - Contatto
38 IGOR FEDRIGA - Contatto
39 Mario: passare da Zoffoli che ha problemi sul Server - Riunione
40 Mario: passa Santagati per consulenza Euro 54,00 ora - sala occupata - Riunione
41 Mario: passa Selene per assunzione - Riunione
42 Information
43 EPSON SMART PANEL for Scanner
44 Mario: contattare Rondalli per passaggio a PIGC 1000 - telefono 0341633041 - Riunione
45 Popup Firma automatica
46 http://www.condominio.mobi/xml/updater. ... t&&erase=0 -
47 VINCENZO BONGHI - Contatto
48 SALVO SALIS - Contatto
49 LUCA COSENTINO - Contatto
50 VITTORIO POMPONIO - Contatto
51 Mario: corso da Baroni - Riunione
52 {A7E495BF-9589-4a6e-8479-DDA2D8D3C05F}
53 keyboard
54 OutlookFbThreadWnd
55 Stato invio/ricezione in Outlook
56 FRITZ!DSL Start Center
57 Skypeâ„¢ - winsoft-italia
58 Connections Tray
59 Misuratore alimentazione
60 MS_WebcheckMonitor
61 SPAMfighter Update Agent
62 SPAMfighter Agent
63 PersistWndName
64 HkWndName
65 IAAMonitor Notify App
66 Aggiornamento protetto ETS
67 Stato di Intel® Active Management Technology
68 SMax4PNP
69 AEBalloonTip
70 Dialog
71 1785F61B
72 HOOK WINDOW
73 Actions
74 C:\Documents and Settings\Enrico\Dati applicazioni\Skype
75 ChatFormatter
76 ChatManager
77 SkyLibEx
78 WMS Idle
79 WMS ST Notif Window 00000E38 00000944
80 .NET-BroadcastEventWindow.2.0.0.0.11c7a8c.0
81 W
82 Microsoft Outlook
83 GDI+ Window
84 MsoDockLeft
85 MsoDockTop
86 MsoDockRight
87 MsoDockBottom
88 88.149.172.78:3389 - desktop remoto
89 Program Manager
Procedure Type Value
==========================
(b)TXBROWSE:TXBROWSE
Param 1: O Class: TXBROWSE
Local 1: A Len: 67
Local 2: N 0
Local 3: U
Local 4: N 0
TXBROWSE:AROW
(b)TXBRWCOLUMN:ADJUST
Local 1: U
Local 2: U
TXBRWCOLUMN:PAINTDATA
Param 1: N 20
Param 2: N 0
Param 3: N 19
Param 4: L .T.
Param 5: L .T.
Param 6: N 1
Local 1: O Class: TXBRWCOLUMN
Local 2: U
Local 3: U
Local 4: U
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: L .F.
Local 23: L .F.
Local 24: L .F.
TXBROWSE:DRAWLINE
Param 1: L .T.
Local 1: N 1
Local 2: O Class: TXBROWSE
Local 3: O Class: TXBRWCOLUMN
Local 4: N 20
Local 5: U
Local 6: N 1
Local 7: N 2
Local 8: N 20
Local 9: N 5
Local 10: U
Local 11: U
Local 12: U
Local 13: N 19
Local 14: N -637460409
Local 15: U
Local 16: U
Local 17: U
Local 18: L .T.
TXBROWSE:PAINT
Local 1: O Class: TXBROWSE
Local 2: A Len: 3
Local 3: A Len: 2
Local 4: O Class: TXBRWCOLUMN
Local 5: N 3
Local 6: N 2
Local 7: N 600
Local 8: N 884
Local 9: N 19
Local 10: N 2
Local 11: U
Local 12: U
Local 13: N 863
Local 14: N 609
Local 15: U
Local 16: N -1777332115
Local 17: N -637460409
Local 18: N -1976558542
Local 19: N 1747984409
Local 20: N -2077222339
Local 21: N -785375170
Local 22: N 135272270
Local 23: N 20
Local 24: N 609
Local 25: N 29
Local 26: N 2
Local 27: N 2
Local 28: N 30
Local 29: N 20
Local 30: N 0
Local 31: N 5
Local 32: U
Local 33: L .F.
Local 34: L .F.
Local 35: L .F.
Local 36: A Len: 5
TXBROWSE:DISPLAY
Local 1: O Class: TXBROWSE
TXBROWSE:HANDLEEVENT
Param 1: N 15
Param 2: N 0
Param 3: N 0
Local 1: O Class: TXBROWSE
Local 2: U
_FWH
Param 1: N 0
Param 2: N 15
Param 3: N 0
Param 4: N 0
Param 5: N 41
Local 1: O Class: TXBROWSE
SYSREFRESH
SELECTFUNC_CONS
Local 1: N 67074.6490000
(b)SELECTFUNC_CONS
Param 1: O Class: TXBROWSE
Param 2: L .T.
TXBROWSE:VSCROLL
Param 1: N 4
Param 2: N 0
Local 1: O Class: TXBROWSE
Local 2: N 0
Local 3: N 4
Local 4: N 0
Local 5: N 16
Local 6: N 0
TWINDOW:HANDLEEVENT
Param 1: N 277
Param 2: N 4
Param 3: N 0
TXBROWSE:HANDLEEVENT
Param 1: N 277
Param 2: N 4
Param 3: N 0
Local 1: O Class: TXBROWSE
Local 2: U
_FWH
Param 1: N 0
Param 2: N 277
Param 3: N 4
Param 4: N 0
Param 5: N 41
Local 1: O Class: TXBROWSE
WINRUN
Param 1: N 1573746
TMDIFRAME:ACTIVATE
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
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
MOD0
Local 1: C "PROCEDURA INTEGRATA GESTIONE CONDOMINIO 2008"
START
Local 1: C ""
Local 2: U
Local 3: U
Local 4: U
Local 5: U
DBF
DBFFPT
DBFBLOB
DBFNTX
1 HASHENTRY
2 HBCLASS
3 HBOBJECT
4 TMUTEX
5 TPRINTER
6 TSYSTEMINFO
7 TSTRUCT
8 TREG32
9 TCURSOR
10 TFONT
11 TWINDOW
12 TMDIFRAME
13 TMENU
14 TMENUITEM
15 TCONTROL
16 TICON
17 TBRUSH
18 TMDICLIENT
19 TBAR
20 TRECT
21 TBTNBMP
22 TMSGBAR
23 TMSGITEM
24 TDIALOG
25 TBITMAP
26 TSAY
27 TURLLINK
28 TBUTTON
29 TGET
30 GET
31 TCLIPGET
32 TCHECKBOX
33 TSCROLLBAR
34 TRADMENU
35 TRADIO
36 TPROGRESS
37 TBUTTONBMP
38 TCLIPBOARD
39 TWBROWSE
40 TCBROWSE
41 TCCOLUMN
42 TCOMBOBOX
43 TPEN
44 TMULTIGET
45 TTITLE
46 TTIMER
47 TC5STBAR
48 TC5STBARITEM
49 TXBROWSE
50 TXBRWCOLUMN
51 TFOLDER
52 TSPLITTER
53 TCOMBOLIST
54 TIMAGE
55 ERROR
831 Static variables
Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes