Alaska Software Inc. - XBPBROWSER problem
Username: Password:
AuthorTopic: XBPBROWSER problem
James LoughnerXBPBROWSER problem
on Sat, 15 Nov 2014 19:15:35 -0500
With 2.0 Latest update. I have 2 programs that both use the same base 
code (more or less) to have a pop up browse. In one, the smaller (60K 
lines) all works fine. In the other (500K lines) I get an error in the 
xbpbrowse code.

Can someone tell me what is expected at XBPBROWSE:FORCESTABLE(1377)

Also I'm getting odd rendering problems in the larger but not in the 
smaller. Have not really looked close at this problem yet the browse is 
the show stopper

Also have not yet got the debugger to work in the IDE. But to be honest 
I don't care as long as I can get the command line to work I'm happy. 
Maybe I just don't understand it. Setting break points and or altd() and 
it never stops. ( note I am running from a VM and have not had the 
debugger working at all for a long time. AMD 6 core processor running 
openSUSE with XP in Virtualbox at least now the debugger does not crash 
and burn like it used to)

Compile times are significantly shorter (command line) Also for a long 
time had the problem that sometimes the compiler would choke about 60% 
through the full compile. Have not seen this in 2.0

In the 60K app all is very good and the code is smooth and seems as fast 
if not faster.

And just a note if you guys had opened up the beta to all I'd have seen 
these problems way back, since I'd have tested earlier.

Jim



------------------------------------------------------------------------------
ERRORMESSAGE PROTOCOL from "C:\Development\MPM\MPM.exe" Date: 11/15/2014 
02:31:18PM
MPM VersionVer 2.34.65

Log-Filename  APP00088.log
Xbase++ Version     : Xbase++ (R) Version 2.00.560
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Database path       :
------------------------------------------------------------------------------
Operating System      : Windows XP 05.01 Build 02600 Service Pack 3
------------------------------------------------------------------------------
oError:args         :
           -> VALTYPE: U VALUE: NIL
           -> VALTYPE: N VALUE:          2
oError:canDefault   : N
oError:canRetry     : N
oError:canSubstitute: Y
oError:cargo        : NIL
oError:description  : Parameter has a wrong data type
oError:filename     :
oError:genCode      :          2
oError:operation    : <U of >[<2>]
oError:osCode       :          0
oError:severity     :          2
oError:subCode      :          3
oError:subSystem    : BASE
oError:thread       :          7
oError:tries        :          0

Company             : Marinscope Community Newspapers
Computername        : XPVM
Log-In Name         : Jim
------------------------------------------------------------------------------
virtual memory used          :     996352
virtual memory size          :    1510400
RAM Avialable                :     514048
RAM Total                    :     786432

available to the process     :    1132544
currently used by the process:       4096
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from XBPBROWSE:FORCESTABLE(1377)
Called from XBPBROWSE:HANDLEEVENT(1901)
Called from JIMSBROWSE:HANDLEEVENT(1150)
Called from XBPBROWSE:REFRESHROWS(3036)
Called from XBPBROWSE:REFRESHALL(2964)
Called from JIMSBROWSE:REFRESHALL(1159)
Called from POPUPBROWSE:CREATE(173)
Called from SLEPOPUP:SHOWBROWSE(168)
Called from (B)SLEPOPUP:CREATE(82)
Called from SHADOWBUTTON:LBUP(465)
Called from XBPPUSHBUTTON:HANDLEEVENT(1522)
Called from SHADOWBUTTON:HANDLEEVENT(185)
Called from MODALLOOP(1930)
Called from SU_CIRCULATIONCLASS:START(300)
Called from SU_CIRCULATION(1609)

------------------------------------------------------------------------------
WORKAREA STATUS:
------------------------------------------------------------------------------
  Area Alias         Record     Index        Order      Eof Bof Del Found
------------------------------------------------------------------------------
    1  ADPUBS          2/11     ADPUBS.CDX   PUBCODE    No  No  No  Yes
    2  SUCRRT          1/6227   SUCRRT.CDX   ZIP        No  No  No  Yes
    3  SUCTRY        245/288    SUCTRY.CDX   CCODE      No  No  No  No
    4  SUDEFS          1/0      SUDEFS.CDX   PUB        Yes Yes No  Yes
    5  SUDIST          1/1      SUDIST.CDX   DCODE      No  No  No  Yes
    6  SUDSRC          7/6      SUDSRC.CDX   CODE       No  No  No  Yes
    7  SUTRAN        105/105    SUTRAN.CDX   CODE       No  No  No  Yes
    8  SLUSER          1/1      SLUSER.CDX   UNAME      No  No  No  Yes
    9  GLTRAN        314/857    GLTRAN.CDX   ID         No  No  No  Yes
   10  SUGIFT          1/0      SUGIFT.CDX   SUBID      Yes Yes No  Yes
   11  SURATE         26/70     SURATE.CDX   PUBSCODE   No  No  No  Yes
   12  SUSRCE         28/43     SUSRCE.CDX   SRC        No  No  No  Yes
   13  SUSERV         10/9      SUSERV.CDX   CODE       No  No  No  Yes
   14  SUSTND          1/86315  SUSTND.CDX   ISSUE      No  No  No  Yes
   15  SUSUSP          2/12     SUSUSP.CDX   ID         No  No  No  Yes
   16  SUVEND        342/360    SUVEND.CDX   VENCODE    No  No  No  Yes
   17  SUZIPS      41939/45632  SUZIPS.CDX   ZIP        No  No  No  Yes
   18  SUALTS          2/3      SUALTS.CDX   ID         No  No  No  Yes
   19  GLRFND        439/1109   GLRFND.CDX   ID         No  No  No  Yes
   20  GLSUCJ      21876/22132  GLSUCJ.CDX   BATCH      No  No  No  Yes
   21  SUPMNT      10035/29291  SUPMNT.CDX   VENPDATE   No  No  No  Yes
   22  SLBANK          2/1      SLBANK.CDX   NUMBER     Yes No  No  No
   23  SUCCNO          1/0      SUCCNO.CDX   CODE       Yes Yes No  Yes
   24  SUBWEB          1/0      SUBWEB.CDX   ID         Yes Yes No  Yes
   25  ADISSG          1/783    ADISSG.CDX   CLSTAT     No  No  No  Yes
   26  SULSTA      13018/21770  SULSTA.CDX   NAME       No  No  No  No
   27  SULOGA     106514/146546 SULOGA.CDX   ID         No  No  No  Yes
   28  SULZNA          1/44     SULZNA.CDX   ZIP        No  No  No  Yes
   29  SUNTEA          1/3520   SUNTEA.CDX   ID         No  No  No  Yes
   30  SUWLKA          1/65     SUWLKA.CDX   ZIPRT      No  No  No  Yes
   31  SUZONA          1/1029   SUZONA.CDX   ZIP        No  No  No  No
* 32  SUDEMA        110/168    SUDEMA.CDX   ID         No  No  No  Yes
Andreas Gehrs-Pahl
Re: XBPBROWSER problem
on Sun, 16 Nov 2014 04:01:06 -0500
Jim,

>Can someone tell me what is expected at XBPBROWSE:FORCESTABLE(1377)

The error actually occurs in line 1378, which is:

if aTmp[2] < 0

The reason that the error log shows 1377 is that there is a DLLFUNCTION in 
lines 35-37, which (often) causes those incorrect line counts. That problem 
has existed since Xbase++ 1.2 and is the reason why DLLFUNCTIONs should be 
either at the bottom of your program file or should be coded as normal 
functions, instead of using the pre-processor directive. But Alaska's code 
isn't usually the cleanest and most sensible, so you'll find those issues 
quite often in their programs.

Anyway, the value of "aTmp" appears to be NIL in your case. In the lines 
above 1378 "aTmp" is set to oCol:DataArea:CellRect(::RowCount), where "oCol" 
is set to ::GetColumn(1) -- after the code checks that ::RowCount > 1 and 
oCol:IsDerivedFrom("XbpColumn") -- before assigning "aTmp".

But none of the above will probably help you any further, I assume.

>Called from XBPBROWSE:FORCESTABLE(1377)
>Called from XBPBROWSE:HANDLEEVENT(1901)
>Called from JIMSBROWSE:HANDLEEVENT(1150)
>Called from XBPBROWSE:REFRESHROWS(3036)
>Called from XBPBROWSE:REFRESHALL(2964)
>Called from JIMSBROWSE:REFRESHALL(1159)
>Called from POPUPBROWSE:CREATE(173)

Your call stack shows that you use a PopUpBrowse() class that is derived 
from a JimsBrowse() class, which is derived from the XbpBrowse() class. In 
the :Create() method of your PopUpBrowse() class you call the :RefreshAll() 
method of the JimsBrowse() class, which calls the :RefreshAll() method of 
the parent XbpBrowse() class, which results in the XbpBrowse:ForceStable() 
method being executed (inside your PopUpBrowse:Create() method).

I'm not sure why you call the JimsBrowse:RefreshAll() method from the 
PopUpBrowse:Create() method, but it seems that the Browse Column's haven't 
been Created() at that time, which causes the error when trying to determine 
their size/position in the XbpBrowse:ForceStable() method.

I would check your PopUpBrowse() and JimsBrowse() classes, to see why they 
call the :RefreshAll() method in the first place. You might want to either 
remove that call or make sure that the XbpBrowse isn't created Hidden (or 
Invisible) -- or has been :Create()d and :Show()n -- before calling the 
:RefreshAll() method. 

Without your actual code, all of the above are just (educated) guesses, 
though, but I hope this will at least point you in the right direction.

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas.GP@Charter.net
web:   http://www.Aerospace-History.net
James LoughnerRe: XBPBROWSER problem
on Mon, 17 Nov 2014 23:48:09 -0500
I'll take a look

As I said use the same classes in another app and it runs fine.

Even tried reverting back to just the xbpbrowse and still got the error.

My Jims browse adds some small additions to help sync a brows position 
with dialog positions and visa versa. But admittedly I current am not 
using that in this app though I'd like to keep it as an option.

Now that I got some idea what the names are I'll see what is what.

Maybe I have an extra refreshall in the code that is misbehaving the 
code in the two apps are not exactly the same

I think there is a call at the end of the create but I think I put it 
there as a kludge to fix a refresh problem ie the rows were not rendered 
right at first at some past point in the past and I had to add a kludge. 
Not at all sure that is still needed. I'll investigate


Thanks
Jim




On 11/16/2014 04:01 AM, "Andreas Gehrs-Pahl" wrote:
> Jim,
>
>> Can someone tell me what is expected at XBPBROWSE:FORCESTABLE(1377)
>
> The error actually occurs in line 1378, which is:
>
> if aTmp[2] < 0
>
> The reason that the error log shows 1377 is that there is a DLLFUNCTION in
> lines 35-37, which (often) causes those incorrect line counts. That problem
> has existed since Xbase++ 1.2 and is the reason why DLLFUNCTIONs should be
> either at the bottom of your program file or should be coded as normal
> functions, instead of using the pre-processor directive. But Alaska's code
> isn't usually the cleanest and most sensible, so you'll find those issues
> quite often in their programs.
>
> Anyway, the value of "aTmp" appears to be NIL in your case. In the lines
> above 1378 "aTmp" is set to oCol:DataArea:CellRect(::RowCount), where "oCol"
> is set to ::GetColumn(1) -- after the code checks that ::RowCount > 1 and
> oCol:IsDerivedFrom("XbpColumn") -- before assigning "aTmp".
>
> But none of the above will probably help you any further, I assume.
>
>> Called from XBPBROWSE:FORCESTABLE(1377)
>> Called from XBPBROWSE:HANDLEEVENT(1901)
>> Called from JIMSBROWSE:HANDLEEVENT(1150)
>> Called from XBPBROWSE:REFRESHROWS(3036)
>> Called from XBPBROWSE:REFRESHALL(2964)
>> Called from JIMSBROWSE:REFRESHALL(1159)
>> Called from POPUPBROWSE:CREATE(173)
>
> Your call stack shows that you use a PopUpBrowse() class that is derived
> from a JimsBrowse() class, which is derived from the XbpBrowse() class. In
> the :Create() method of your PopUpBrowse() class you call the :RefreshAll()
> method of the JimsBrowse() class, which calls the :RefreshAll() method of
> the parent XbpBrowse() class, which results in the XbpBrowse:ForceStable()
> method being executed (inside your PopUpBrowse:Create() method).
>
> I'm not sure why you call the JimsBrowse:RefreshAll() method from the
> PopUpBrowse:Create() method, but it seems that the Browse Column's haven't
> been Created() at that time, which causes the error when trying to determine
> their size/position in the XbpBrowse:ForceStable() method.
>
> I would check your PopUpBrowse() and JimsBrowse() classes, to see why they
> call the :RefreshAll() method in the first place. You might want to either
> remove that call or make sure that the XbpBrowse isn't created Hidden (or
> Invisible) -- or has been :Create()d and :Show()n -- before calling the
> :RefreshAll() method.
>
> Without your actual code, all of the above are just (educated) guesses,
> though, but I hope this will at least point you in the right direction.
>
> Andreas
>