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

TOPIC:

bBrowser errors 01 Aug 2022 15:40 #23173

  • ic2
  • ic2's Avatar
  • Topic Author


  • Posts: 1555
  • 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
        endif
    endif

    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)})
    XSharp.Internal.WrappedException
      HResult=0x80131500
      Message=Exception of type 'XSharp.Internal.WrappedException' was thrown.
      Source=XSharp.RT
      StackTrace:
       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)

    Dick

    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: 3194
  • 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.

    Robert
    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: 3658
  • 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
    chris(at)xsharp.eu

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

    bBrowser errors 31 Aug 2022 13:08 #23539

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1555
  • Hello,

    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

    I had an error XS0208 Cannot take the address of, get the size of, or declare a pointer to a managed type which could also easily be solved by replacing the @ by REF. But when I checked this I realized that I don't know where to 'set a compiler option /vo7' (should I have whished so).

    I seem to remember that clicking in the project from Solution Explorer, right mouse, properties and then that the Language or Dialect settings had such a compiler option between brackets. Or am I looking at the wrong place? If so, how else or where am I supposed to set the compiler options?

    Dick

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

    bBrowser errors 31 Aug 2022 15:50 #23545

    • Chris
    • Chris's Avatar


  • Posts: 3658
  • Hi Dick,

    This is the checkbox in Dialect/Implicit casts and conversions
    XSharp Development Team
    chris(at)xsharp.eu

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

    bBrowser errors 31 Aug 2022 21:55 #23564

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1555
  • Hello Chris,

    Thanks.

    Am I right when I seem to remember that in older versions /vo7 was added to that checkbox caption? If in messages /vo7 is communicated as the solution and we can find that nowhere, it is going to be a bit difficult :unsure:

    Dick

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

    bBrowser errors 31 Aug 2022 22:09 #23567

    • Chris
    • Chris's Avatar


  • Posts: 3658
  • Hi Dick,

    XIDE has it in the checkbox caption, while VS has it in a tooltip when you hover over the checkbox.
    XSharp Development Team
    chris(at)xsharp.eu

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

    bBrowser errors 31 Aug 2022 22:27 #23569

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1555
  • Ah!

    That's were I saw it, thanks.

    Dick

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

    • Page:
    • 1