Skip to content

is_client_connected() always returns True in Maya #332

Closed

Description

@luabud
No description provided.

Activity

  1. int19h commented on Jul 13, 2020

    @int19h
    Contributor

    I believe this is the root cause of #166

  2. added
    bug
    on Jul 13, 2020
  3. fabioz commented on Jul 16, 2020

    @fabioz
    Collaborator

    Humm, I guess you have some specific scenario in mind as in a simple launch (without the initial debugger connection) it does seem to work for me...

    i.e.: right now, if I start a launch to run the code below (without debugging in place):

    import debugpy
    print(debugpy.is_client_connected())
    

    it prints False to me...

    By taking a look at the code I only envision something like that if the debugger is created more than once in the same process (since it should only return True after at least one configurationDone is sent to the debugger, since it's mostly a shortcut to pydevd._is_attached()).

    Locally I couldn't reproduce the issue in a simple case (even when disconnecting the debugpy.is_client_connected() did seem to start returning False).

  4. int19h commented on Jul 16, 2020

    @int19h
    Contributor

    We've seen it return true early while debugging that Maya issue. I assumed that it was basically returning true as soon as the server gets a connection to the adapter (it would also explain why tests using it sporadically failed) - but if it actually waits for "configurationDone", that shouldn't be the case.

  5. fabioz commented on Jul 17, 2020

    @fabioz
    Collaborator

    So, I guess this is probably related to #334 and #333 then.

    It seems like one of the connections got through to some point and then as Maya probably keeps everything in memory subsequent attempts didn't work.

    One thing I noted is that the report from the pydevd side to pydevd._is_attached() starts returning True only after the configurationDone request, but apparently it only becomes False in a disconnect request, so, it may be that one issue here is that if the connection is dropped without that signal, pydevd won't start returning the proper value there (should I take a look at that?)

  6. int19h commented on Jul 17, 2020

    @int19h
    Contributor

    It might be related, not sure. We kept reusing the same Maya instance at first, but then later realized that there might be some undesired caching going on, and restarted it for further repros... I think it was still giving True tho even after a restart.

    #333 came out of that as well, yeah. I just wasn't sure one way or another, hence the issue says to check it, not that there's necessarily a problem.

    I'll update the title to make this less confusing, and for now we can de-pri this, since it's a fairly narrow case if it's Maya-only.

  7. changed the title [-]is_client_connected always returns true [/-] [+]is_client_connected() always returns True in Maya[/+] on Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions