Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bbrowser error - cannot find a solution to avoid Abord

24 views
Skip to first unread message

Jean-Luc Stassen

unread,
Jun 11, 2003, 5:09:37 AM6/11/03
to
Hi all,

Already posted, this error with bbrowser (I guess)

Error message:
--------------
Error Code: 50 [ ACCESS VIOLATION ]
Subsystem: VO-CODE
Error Subcode: 5333
Argument Number: 2
Description: Application Code Error causing Access Violation
CallStack:
BBROWSER:RESIZEBUFFER (Line: 94)
BBROWSER:FILLBUFFER (Line: 68)
BBROWSER:RECALCULATE (Line: 167)
BBROWSER:RESIZE (Line: 10)
BEVENTHANDLER (Line: 54)

Here what I do:
- This is a window with a reisze event that I only do if self:lCanResize is
on true .
- In the preinit I set a lCanResize on false
- In the postinit, I do the following in order:
- I put a filter on the self:server
- I do self:odcbbrowser:use(self:server)
- I restore bbrowser column parameters
- I resgiter EventHandler for teh bbrowser
- I set lCanResize on true
- I restore the size and pos of the window

The bbrowser column parameter are stored in a dbf local file.
here's the method I use to read the file and set the bbrowser:

FUNCTION restbrowser(obrowser,cfile)
LOCAL acol, ataille, acaption AS ARRAY
LOCAL ocol AS OBJECT
LOCAL i, n AS DWORD
LOCAL nfreeze AS INT
LOCAL astru, a AS ARRAY


IF File(cfile)
// field list to use
astru:=obrowser:server:dbstruct
a:={}
FOR i:= 1 TO Len(astru)
AAdd(a,astru[i,1])
NEXT
acol:={}
ataille:={}
acaption:={}
ocol:=dbserver{cfile}
n:=Len(ocol:dbstruct)
DO WHILE !ocol:eof
IF !Empty(ocol:nom) .and. ocol:taille <> 0
IF AScan(a,RTrim(ocol:nom)) <> 0
AAdd(acol,RTrim(ocol:nom))
AAdd(ataille,ocol:taille)
IF n > 4
AAdd(acaption,ocol:caption)
ENDIF
ENDIF
ENDIF
ocol:skip()
ENDDO
ocol:close()

IF Len(acol) <> 0
obrowser:Clear(FALSE)
ENDIF
// Setup column
obrowser:OpenColumn(acol)
FOR i:=1 TO Len(acol)
obrowser:ColumnOpenList[i]:width:=ataille[i]
IF n > 4
obrowser:ColumnOpenList[i]:caption:=AllTrim(acaption[i])
ENDIF
IF obrowser:ColumnOpenList[i]:ValType=="L"
obrowser:ColumnOpenList[i]:Grid := bGrid{BGRID_CONVEX}
ENDIF
NEXT
// if a col is freezed
** obrowser:Recalculate()
nfreeze:=Val(AsString(READINI(cfile,WorkDir()+"winpos.ini")))
obrowser:freeze:=Min(nfreeze,oBrowser:visiblecolumncount-1)
** obrowser:Recalculate()
obrowser:REFresh(TRUE)
ENDIF

RETURN NIL

Please, all idea are welcome to get this problem out... it makes a long time
I try...


TIA
Jean-Luc

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----

Stephen Quinn

unread,
Jun 11, 2003, 6:11:02 AM6/11/03
to
Jean-Luc

Make life easier and create a DBServer for your Column.DBF

CLASS Columns INHERIT DBServer
METHOD INIT( // Normal parameters ) CLASS Columns
SUPER:INIT( // Normal parameters )

METHOD FieldDesc CLASS Columns
// Add them here
RETURN aFields
METHOD IndexList CLASS Columns
RETURN {}
ACCESS DataAsArray CLASS Columns

LOCAL anArray AS ARRAY
LOCAL cName AS STRING
LOCAL nWidth AS DWORD
LOCAL cCaption AS STRING

SELF:SuspendNotification()
SELF:GoTop()
DO WHILE ! SELF:EoF
cName := Trim( SELF:FIELDGET( #nom ) )
nWidth := SELF:FIELDGET( #taille )
IF ! Empty( cName ) .and. nWidth <> 0
cCaption := Trim( SELF:FIELDGET( #CAPTION ) )
AAdd( anArray, { String2Symbol( cName ), nWidth, cCaption } )
ENDIF
SELF:Skip()
ENDDO

RETURN anArray

Once you have that you can

FUNCTION RestBrowser( oBrowser, cFile )

LOCAL oColSrv AS COLUMNS
LOCAL aCols AS ARRAY
LOCAL i AS DWORD
LOCAL nFreeze AS INT
LOCAL oCol AS bDataColumn

BEGIN SEQUENCE
oColSrvr := COLUMNS{ cFile }
IF oColSvr:Used
aCols := oColSrvr:DataAsArray
oCol:Close()
ELSE
BREAK
ENDIF
FOR i :=1 UPTO ALen( aCols )
oCol := oBrowser:GetOpenColumn( aCols[ i ][ 1 ] )
/*
or if you decide to hide() them
oCol := oBrowser:GetColumn( aCols[ i ][ 1 ] )
*/
oCol:Width := aCols[ i ][ 2 ]
IF ! Empty( aCols[ i ][ 3 ] )
oCol:Caption := aCols[ i ][ 3 ]
ENDIF
IF oCol:ValType == 'L'
oCol:Grid := bGrid{ BGRID_CONVEX }
ENDIF
NEXT

nFreeze := Val( AsString( READINI( cfile, WorkDir() + "winpos.ini" ) ) )
obrowser:freeze := Min( nFreeze, oBrowser:VisibleColumnCount - 1 )

END SEQUENCE
RETURN NIL

Do the oBrowser:ReCacluate() in the same method where you call RestBrowser()

Check the above for syntax, etc... (I just typed it into the message)

--
HTH
Steve Quinn

Geoff Schaller

unread,
Jun 11, 2003, 6:04:29 PM6/11/03
to
J-L,

Quite simply, something is accessing a dynamic object (either a column
object returning NULLL_OBJECT or a server used before it exists) at the
wrong time. Steve's idea is novel and I haven't tried it to see if it helps
but I would need to see the order in which the code is executed. I don't
have that line number in my version of bBrowser so we must have different
versions or I'd look it up but I suspect that not columns are available at
that refresh point.

Geoff

Jean-Luc Stassen

unread,
Jun 12, 2003, 3:24:44 AM6/12/03
to
Geoff,

I work with the last patch of bbrowser. But since this is an access
violation, I don't know if you can be sure of the line number !
If it's a call to a things that is not yet defined, I suppose that is inside
bbrowser. Joachim have sent me a new patch, I try it today and I will tell
you what's going on.


Jean-Luc


"Geoff Schaller" <ge...@softwareREMobjectives.com.au> a écrit dans le
message de news: NHNFa.1916$GU5....@news-server.bigpond.net.au...

JoseMaria

unread,
Jun 12, 2003, 5:17:03 PM6/12/03
to

I have this same error !!!!

I do not know if it is because of DLL or IDE corruption, but I have
exactly the same error.

I use VO 2.6 and bbrowser 1.5 professional. ( I downloaded some days
a patch ).

PLEASE, PLEASE, let me know if this patch worked.

If so, I will ask it from Joachim, since I am registered with the
professional version.

Note: In spite of these problems, I am very happy with bbrowser. I
allows me to do many things I would not have dreamed of with
databrowser.

Thanks.

Error message:
--------------
Error Code: 50 [ ACCESS VIOLATION ]
Subsystem: VO-CODE
Error Subcode: 5333
Argument Number: 2
Description: Application Code Error causing Access Violation
CallStack:
BBROWSER:RESIZEBUFFER (Line: 94)
BBROWSER:FILLBUFFER (Line: 68)
BBROWSER:RECALCULATE (Line: 167)
BBROWSER:RESIZE (Line: 10)
BEVENTHANDLER (Line: 54)

--
Posted via http://dbforums.com

Geoff Schaller

unread,
Jun 12, 2003, 6:21:44 PM6/12/03
to
Ok, what are you saying here... that you had code that worked before the
patch but not after? I use the latest version (but cannot find that line
number) without problem.

My suspicion is that both you guys have some other DLL's now not recompiled
to the new bBrowser prototypes.

Geoff


De Schaepmeester Marc

unread,
Jun 13, 2003, 1:53:39 AM6/13/03
to
Hi Jean-Luc,

I have the same problem some time now (VO2.6 - bBrowser 1.5.5).

Joachim knows about it and i'am sure he's working hard to solve this problem!

Marc De Schaepmeester
XerXes Software

"Jean-Luc Stassen" <j...@igsoft.be> wrote in message news:<3ee6f...@corp.newsgroups.com>...

JoseMaria

unread,
Jun 13, 2003, 3:04:51 AM6/13/03
to

Originally posted by Geoff Schaller
> Ok, what are you saying here... that you had code that worked
> before the
> patch but not after? I use the latest version (but cannot find
> that line
> number) without problem.
>
>

Geoff,

Sorry for the misunderstanding. I already had the problem before
this patch.

In fact I was only working from the IDE ( I am preparing a new version
replacing databrowser with bbrowser ) and had the following error:

"An unhandled exception occured in module CAVORT20.DLL of your
application !"

Code: strange long number.
Application: bBrowser Classes
Module: bBrowser ( Control )
Entity: Resizebuffer, Line 0

This was before applying the latest patch. I had not tested this new
version of my application outside the IDE. Then, after appplying the
patch 1.5.5 I had a similar error at the same point and I tried the
application OUTSIDE the IDE.

The result, in the same application point, now I had the error reported
at the top of this thread, WITH EXACTLY THE SAME LINE NUMBERS. Please
note the in both cases the error seems to be at "Resizebuffer":

Error message:
--------------
Error Code: 50 [ ACCESS VIOLATION ]
Subsystem: VO-CODE
Error Subcode: 5333
Argument Number: 2
Description: Application Code Error causing Access Violation
CallStack:
BBROWSER:RESIZEBUFFER (Line: 94)
BBROWSER:FILLBUFFER (Line: 68)
BBROWSER:RECALCULATE (Line: 167)
BBROWSER:RESIZE (Line: 10)
BEVENTHANDLER (Line: 54)

Thanks for your interest.

Geoff Schaller

unread,
Jun 15, 2003, 6:08:19 PM6/15/03
to
Ok but lets get to the point where we know something more about this. Most
people don't get the problem so can you make a small aef which demonstrates
it? ie can you modify one of Joachim's samples to show it?


"De Schaepmeester Marc" <in...@xerxes.be> wrote in message
news:af8d1a5e.03061...@posting.google.com...

0 new messages