Page 1 of 2

Error in Browse

Posted: Thu Jan 17, 2013 6:18 am
by Wolfgang Ciriack
Hi Roger,
since i changed to build 258 my customers get not reproducable sporadic errors within a browse:

Code: Select all

Parameter has wrong type
Operation: <{20,...}>==<20>
called from XBPBROWSE:GOTOITEM(1896)
called from XBPBROWSE:ITEMLBDOWN(1866)
...
It seems to happen, when the browse is open, some minutes is no activity, then you click with the mouse in the browse. Do you have any hint for me ?

Edit: It also happen in other situations, not only after some minutes inactivity.

Re: Error in Browse

Posted: Thu Jan 17, 2013 1:06 pm
by rdonnay
This is the first time such a thing has been reported.

The error is in the Xbase++ XbpBrowse class.

What version of eXpress++ were you using prior to build 258?

Re: Error in Browse

Posted: Thu Jan 17, 2013 11:30 pm
by Wolfgang Ciriack
Hi Roger,
i used build 255 before.

Can it have something to do with the DROP codeblock ? There i have an array with marked record numbers, which seems to be in the error comparisation of the rowpos (<{2,...}>==<2>)

Re: Error in Browse

Posted: Thu Feb 14, 2013 10:03 am
by Wolfgang Ciriack
Hi Roger,
still getting sporadic this error, any hints ?

Re: Error in Browse

Posted: Thu Feb 14, 2013 1:08 pm
by rdonnay
The below code is from XBP_BRW.PRG.
This is Alaska's source code for the XbpBrowse() class.

It appears that something is overwriting the :cursorMode iVar of the DC_XbpBrowse() object with an array.
It should always be a numeric value.

The :cursorMode iVar is set by aGetListItem[xGETLIST_OPTIONS7] of the GetList array for the browse.
You may want to look at the GetList in an array browser: WTF GetList

Code: Select all

 /* *******************************************************************
  * Navigate to given Row/Column
  * RETURN:  TRUE - stabilizing is necessary
  *          FALSE - stabilizing is not necessary
  * */
 METHOD XbpBrowse:GotoItem ( nRow, nCol, lDehilite )
 
    DEFAULT lDehilite TO FALSE
 
    // when the same item has been marked a second time, I will just return
    IF ( ::CursorMode == XBPBRW_CURSOR_ROW )   <<<<<<<<<<<<<< error happens here
       IF nRow == ::RowPos
          RETURN FALSE
       ENDIF
    ELSE
       IF nRow == ::RowPos .AND. nCol == ::ColPos
          RETURN FALSE
       ENDIF
    ENDIF
 
    // dehilite current mark if necessary
    IF lDehilite
       ::Dehilite()
    ENDIF
 
    // skip to the selected row and column
    IF nRow != ::RowPos
       ::HandleEvent ( xbeBRW_Navigate, XBPBRW_Navigate_Skip, nRow - ::RowPos )
    ENDIF
    IF nCol != ::ColPos
       ::HandleEvent ( xbeBRW_Navigate, XBPBRW_Navigate_SkipCols, nCol - ::ColPos )
    ENDIF
 
 RETURN TRUE

Re: Error in Browse

Posted: Thu Feb 14, 2013 7:43 pm
by Wolfgang Ciriack
Thanks Roger,
i do not know, how this can happen, but i will review my code.

Re: Error in Browse

Posted: Wed Jun 12, 2013 2:15 am
by Wolfgang Ciriack
Hi Roger,
i still have problems with these sporadic errors at my customers.

Code: Select all

Parameter has wrong type
Operation: <{20,...}>==<20>
called from XBPBROWSE:GOTOITEM(1896)
called from XBPBROWSE:ITEMLBDOWN(1866)
...

I testet at my customers with eXpress runtime from 257 (with posted dclipx.dll from 15.10.2012), but the errors are still arrising 2 or 3 times a day in a havyly used browse (it seems, that with the 257 files the error do not occur so often as with the 258 files).
Do you have some hints, in which direction i can search my code ?
Can i add some code in the dcbrowse source to get a protokoll when this error happens ?

Re: Error in Browse

Posted: Wed Jun 12, 2013 5:20 am
by rdonnay
I will have to look into the XBPBRW.PRG code from Alaska to figure this out.

Re: Error in Browse

Posted: Wed Jun 12, 2013 6:43 am
by Wolfgang Ciriack
Ok, thank you.

Re: Error in Browse

Posted: Wed Jun 12, 2013 7:22 am
by rdonnay
Do you know which of your browses is creating the problem?

I would like to see your code.