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

Bbrowser strange error

21 views
Skip to first unread message

Jean-Luc Stassen

unread,
May 13, 2003, 4:16:28 PM5/13/03
to
Hello,

I get the next error since the beginning with bbrowser and never find the
cause:
(note: this error don't happen each time, but very rarely)

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: 73)
BBROWSER:FILLBUFFER (Line: 68)
BBROWSER:RECALCULATE (Line: 167)
BBROWSER:RESIZE (Line: 9)
BEVENTHANDLER (Line: 54)

I have a resize event in my window that is only executed when a var is set
to true, I call this var: lresize
in the preinit:
set lresize to false

in the postinit of my app, I do the following:

restore de bbrowser config (column pos, width, etc...)
set lresize on true
restore the windows config (size and pos)

I never find what cause this error. I have this error within many of my app.
For convenience, here is the method to restore the browser config (info are
saved in local dbf file)

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)
// liste des champs du fichier
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
// mise en place du browser
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
// la freeze
obrowser:Recalculate()
nfreeze:=Val(AsString(READINI(cfile,WorkDir()+"winpos.ini")))
obrowser:freeze:=Min(nfreeze,oBrowser:visiblecolumncount-1)
obrowser:Recalculate()
ENDIF

any suggestions ?
Thanks
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,
May 14, 2003, 12:42:12 AM5/14/03
to
Jean-Luc

You might try oBrowser:ReDraw() instead of oBrowser:ReCalculate()
You might be calling Recalculate() while it's already in the middle of Recalculating the columns,
probably depends on where in your code your calling this function.

--
HTH
Steve Quinn


Joachim Bieler

unread,
May 15, 2003, 1:23:58 AM5/15/03
to
Hi Jean-Luc,

> I get the next error since the beginning with bbrowser and never find the
> cause:
> (note: this error don't happen each time, but very rarely)

Can you send me a test program (AEF file) so that I can reproduce the
problem?

If your program that produce the error isn't greater than 2 MB (AEF and DBF
files), then you also could send me this program.

Regards
Joachim Bieler


Jean-Luc Stassen

unread,
May 15, 2003, 6:54:44 PM5/15/03
to
Hi Joachim,

This is a very large app... 8 Mb... with a lot of dbf files... I have to
say that the postinit of the window where the problem occurs is very deep
!!.. And the problem dont appear each time... I cannot find when it comes...
I think this is a problem within the resize... I will try before the tip of
Stephen...
I will say you what's going on....


Jean-Luc

here's the part of the postinit that concern the bbrowser...: note that
self:lcanrz is set to false in the preinit
I provide too the function restbrowser.


// restaurer le browser des dossiers
SELF:oDCPlbBrowser:use(SELF:server)
restbrowser(SELF:oDCPlbBrowser, WorkDir()+"PL_COL.DBF") // disposition des
colonnes

editselect(SELF:oDCPlbBrowser,{"DTCHARGE","DTDECHARGE","HRCHARGE","HRDECHARG
E","CKJDEP","CKJDEST","CKHRDEP","CKHRDEST","PTCOM"}) // colonnes éditables

// icones pour transit
oImage1 := bIcon{ETAT1{}}
oImage1:Size := Dimension{16, 12}
oImage2 := bIcon{ETAT2{}}
oImage2:Size := Dimension{16, 12}
oImage3 := bIcon{ETAT3{}}
oImage3:Size := Dimension{16, 12}
oImage4 := bIcon{ETAT4{}}
oImage4:Size := Dimension{16, 12}
oColumn := bDataColumn{SELF:oDCPlbBrowser, SELF:server, {|Server,
oicoImage1, oicoImage2, oicoImage3,oicoImage4, oicoImage5 |;
iif(Server:ETAT==1, oicoImage1, iif(Server:ETAT==2, oicoImage2,
iif(Server:ETAT==3, oicoImage3,iif(Server:ETAT==4,
oicoImage4,NULL_OBJECT ) )))};
, #expression, oImage1,oImage2,oImage3,oImage4,NIL}
oColumn:Caption := "Etat"
oColumn:CalculateWidth()
SELF:oDCPlbBrowser:AddColumn(oColumn) // Spalte im Browser anhängen
pos:=Val(AsString(READINI("COL_ICO",WorkDir()+"transoft.ini")))
IF pos == 0
pos:=1
ENDIF
SELF:oDCPlbBrowser:OpenColumn(oColumn, pos) // Spalte an Position 1
anzeigen
SELF:oDCPlbBrowser:Recalculate()

// event pour la recherche
bRegisterByEventHandler(SELF:oDCPlbBrowser, SELF, #EventHandler,TRUE)
bRegisterByEventHandler(SELF:oDCSearchField, SELF, #EventHandler,TRUE)
bRegisterByEventHandler(SELF:oCCSearch, SELF, #EventHandler,TRUE)

SELF:lcanrz:=TRUE
RESTWININFO(SELF,"DISPATCH",WorkDir()+"WINPOS.INI")

FUNCTION editselect(obrowser,atrue)
LOCAL i AS DWORD
LOCAL ocolum AS bDataColumn
obrowser:editable:=TRUE
FOR i=1 TO Len(obrowser:ColumnOpenList)
ocolum:=obrowser:ColumnOpenList[i]
IF AScan(atrue,ocolum:fieldname) <> 0
ocolum:editable:=TRUE
oColum:autoedit:=FALSE
ELSE
ocolum:editable:=FALSE
oColum:autoedit:=FALSE
ENDIF
NEXT


"Joachim Bieler" <bie...@befo.com> a écrit dans le message de news:
b9v87i$ko972$1...@ID-85540.news.dfncis.de...

Joachim Bieler

unread,
May 16, 2003, 1:40:28 AM5/16/03
to
Jean-Luc,

> This is a very large app... 8 Mb... with a lot of dbf files... I have to
> say that the postinit of the window where the problem occurs is very deep
> !!.. And the problem dont appear each time... I cannot find when it
comes...
> I think this is a problem within the resize... I will try before the tip
of
> Stephen...
> I will say you what's going on....

OK, I wait for your reply.

Joachim Bieler


richard townsend-rose, tdoc

unread,
May 16, 2003, 4:38:34 AM5/16/03
to
Jean Luc, Joachim

I also tried showing variable images - we still show some - and I have
had some strange errors - not to do wuth resizing tho.

could we not be able to have the ability for the having a fucntion
which supplies an icon... its very tedious to have to have to go via
nessted iif's.
especially when the browse has a varibvale number of columns depending
on data to show.

richard t-r
www.tdoc.net

Stephen Quinn

unread,
May 16, 2003, 4:57:31 AM5/16/03
to
Richard

> which supplies an icon... its very tedious to have to have to go via
> nessted iif's.

Then don't - create a method on the window
Eg
METHOD GetImage(x) class MYWindow
return self:aImageArray[ Max( x:ETAT, 1 )]

oColumn := bDataColumn{ SELF:oDCPlbBrowser, SELF, {|x| x:GetImage(x:Server) }, ...)

Add these to self:aImageArray or use an ImageList component
oicoImage1
oicoImage2
oicoImage3
oicoImage4
oicoImage5

--
HTH
Steve Quinn


yves

unread,
May 16, 2003, 6:01:41 AM5/16/03
to
> (note: this error don't happen each time, but very rarely)
Remember for this kind of error, the message doesnt show where and when it
occures.
See if your preinit or postinit return NIL
See if your method in subclass return same type value than the SUPER
etc...

HTH

Yves

"Jean-Luc Stassen" <j...@igsoft.be> a écrit dans le message de news:
3ec15...@corp.newsgroups.com...

Jean-Luc Stassen

unread,
May 17, 2003, 4:09:32 AM5/17/03
to
Thanks to all...

I'll the tips and tell you if the problem still happen in the future...

Jean-Luc

"Jean-Luc Stassen" <j...@igsoft.be> a écrit dans le message de news:
3ec15...@corp.newsgroups.com...

richard townsend-rose, tdoc

unread,
May 17, 2003, 5:09:10 AM5/17/03
to
Steve

easy when you know how - i.e. apply the brain... !

thanks richard t-r

JeanFrauc

unread,
May 19, 2003, 5:34:55 AM5/19/03
to

Hi all,

I've been having this error for a long time.

I have never been able to find a solution, but i know that it is not a
bBrowser problem. It can occurs anywhere in the application.

The only thing I know is that it's related to the memory of your
computer. I've seen that the persons who work with my application on
their oldest configurations are encoutering this error. If they do
the same work on a better computer (with more RAM), the problem
never happens.

I hope this can help...

Bye,
Jean

--
Posted via http://dbforums.com

0 new messages