Bug? callsub or wait for does not work in debugger

Discussion in 'Bugs & wishlist' started by dcoun, Jul 6, 2018.

  1. dcoun

    dcoun Member Licensed User

    I have created a class in which a CallSub sends to the calling activity a "message", ex.
    During initialiazation of this class:
    Public Sub Initialize(wd As Object)
    end sub
    In the calling activity the code is like the following
    Private wq As myclass 
    Wait For (wq) QueryDone
    If Not(wq.queryOK) Then blabla
    The above code worked oK in both debug and release. Now it works only in release.
    the "QueryDone" is not received in debug release, it works on release and in release with BridgeLogger
  2. XbNnX_507

    XbNnX_507 Active Member Licensed User

    Use CallSubDelayed.
    Erel likes this.
  3. dcoun

    dcoun Member Licensed User

    It worked but I can not see the reason.....
  4. dcoun

    dcoun Member Licensed User

    It is finaly due to LineageOS's last 15 version
  5. Erel

    Erel Administrator Staff Member Licensed User

    No bug here. Your code is wrong. You must use CallSubDelayed. Otherwise the sub will be called before the wait for line is reached.

    Note that it is better to return ResumableSub from the relevant sub. See the resumable subs video tutorial for more information.
    dcoun likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice