Welcome, Guest
Username: Password: Remember me
This forum is the place to discuss issues related to ReportPro, Xs2Ado, Vo2Ado, bBrowser and other 3rd party products
  • Page:
  • 1


bBrowser errors 01 Aug 2022 15:40 #23173

  • ic2
  • ic2's Avatar
  • Topic Author

  • Posts: 1424
  • I was trying to solve some issues, see www.xsharp.eu/forum/public-product/3081-debugging-horror. It looked like the default installation of bBrowser consists of Debug instead of Release versions.

    To be sure I tried to create the bBrowsers DLL's from the source. Unfortunately that ends in the following compiler error, in bConvertLogicToUsual:

    Error XS9109 Argument 3 may not be passed with the '@' prefix
    if IsLogic(uValue)  .and. !IsLogic(uTemp)
        if bConvertLogicToUsual(uValue, self:PropertyGet(#LogicValueIdentifier, NULL_ARRAY), @uTemp)
           uValue := uTemp

    1 Not sure how I solve this without compromising the working. It is also a bit frustrating that this latest download (although from april 2021) isn't compiling in the latest X#.
    How do I solve this?

    2 The next step I tried is to re-include the latest bBrowser DLL in our project, from C:\Program Files (x86)\bBrowser.NET 4 (XSharp Edition)\Assemblies. If I do that VS complains that the .Net version (of the bBrowser DLL's) is newer than the version of my project. VS doesn't tell me the actual versions, that was too much effort for the programmers, but I changed the project 4.7 which seemed fine. However, it looked like VS doesn't have any problem with a solution full of 4.6 based projects!

    Why do I get a warning when I add a reference of a DLL targeting a newer .Net version but can I simply continue with everything else on the previous target version? Can't I change all target version at once for example?

    3 As written I eventually ended up bDataColumn (Class).prg appearing in VS during my debug because it crashed at line 1250 (See some lines of the code, the last line is where it crashed) with the error below it. What is wrong with that?
    access Value as usual
    		// aktuellen Spaltenwert zur├╝ckgeben
    		local uValue				as usual
    		local cbEBPrevious		as usual
    		// Wert ermitteln
    		cbEBPrevious := ErrorBlock({|| _Break(NIL)})
      Message=Exception of type 'XSharp.Internal.WrappedException' was thrown.
       at XSharp.RT.Functions._Break(__Usual uValue)
       at bTools.bBrowser.bDataColumn.<>c.<get_Value>b__107_0() in C:\Temp\Visual Studio 2019\bBrowser.NET 4 (XSharp Edition)\bBrowser\Columns\bDataColumn (Class).prg:line 1520
       at <>f__AnonymousType0.Eval(__Usual[] Xs$Args)
       at XSharp.RT.Functions.Eval(ICodeblock block, __Usual[] args)
       at XSharp.RT.Functions.Eval(__Usual uCodeBlock, __Usual[] args)
       at VO.DbServer.Error(__Usual[] Xs$Args)
       at VO.DbServer.FIELDGET(__Usual[] Xs$Args)


    Please Log in or Create an account to join the conversation.

    Last edit: by ic2.

    bBrowser errors 01 Aug 2022 15:55 #23175

    • robert
    • robert's Avatar

  • Posts: 2974
  • Dick,
    A quick reply

    1) To pass variables by reference with the @ operator you need to set the compiler option /vo7. Or you need to change the @ to the REF keyword
    2) No
    3) The codeblock that is assigned to cbEBPrevious calls _Break(). When the codeblock is evaluated inside the BDataColumn:Value access the exception occurs.
    The _Break() function is part of the BEGIN SEQUENCE.. RECOVER .. END construct in VO.
    Such as construct does not exist in .Net.
    We are emulating by generating a special kind of TRY .. CATCH .. ENDTRY and with a special kind of exception (XSharp.Internal.WrappedException)
    This compiler generated TRY .. CATCH catches the "special" exception and gets the value out of the exception.
    Apparently there is no TRY .. CATCH .. ENDTRY in your app and no BEGIN SEQUENCE .. RECOVER.. END as well, so you get the error.

    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    bBrowser errors 01 Aug 2022 17:03 #23176

    • Chris
    • Chris's Avatar

  • Posts: 3404
  • Hi Dick,

    To add to what Robert said, if I recall correctly, there was a bug in bBrowser, which was found recently. In line 528 of \Misc\bTools (Func).prg, there,s the definition:

    function bConvertLogicToUsual(lValue as logic, uConvertRule as usual, uValue as usual) as logic pascal

    this was a typo in the code wrong, the last parameter is supposed to be passed by reference, so REF should be used instead of AS:

    function bConvertLogicToUsual(lValue as logic, uConvertRule as usual, uValue ref usual) as logic pascal

    Make this change, and the bBrowser solution will compile with no errors (although with some warnings in the latest X# build, but you can ignore those).
    XSharp Development Team

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1