Forum Discussion

jferreira's avatar
jferreira
Occasional Contributor
8 years ago

The object invoked has disconnected from its clients.

I've recently upgraded from TC10.20 to TC12.40.

All my tests were running smoothly on TC10. Since I moved to TC12.40, I can only randomly initiate my tests without getting an error message with the text "The object invoked has disconnected from its clients", followed by an exception.

I know this has been an issue in TC 9.1, but I cannot find a solution to it.

Does anyone have any idea of what can be happening and how to solve this?

Thanks.

  • While contacting support is helpful, one thing that could be a cause has to do with the NameMapping caching... if you have something rendered on screen with a handle, then you perform an action that causes it to be re-rendered and assigned a new handle, the caching of NameMapping may not be up to date and you'll get that message.  A quick and easy solution is that, right before the code that triggers that error, call RefreshMappingInfo on the parent object.  See if that helps.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      While contacting support is helpful, one thing that could be a cause has to do with the NameMapping caching... if you have something rendered on screen with a handle, then you perform an action that causes it to be re-rendered and assigned a new handle, the caching of NameMapping may not be up to date and you'll get that message.  A quick and easy solution is that, right before the code that triggers that error, call RefreshMappingInfo on the parent object.  See if that helps.

      • jferreira's avatar
        jferreira
        Occasional Contributor

        Thanks, I was getting to that same conclusion that it was somehow related to NameMapping loading - which in our scenario is an external file shared by several projects on the same suite.

        I've tried to figure out what was going on by changing the instruction(s) that are throwing the error, to target the objects being manipulated directly by it's full path instead of using it's alias and those instructions are no longer in error.

        My gess is that whenever on the test sequence we're jumping between projects, there's a big probability of getting that error, except when it coincides with the internal refresh of NameMapping.
        I'll give a try to RefreshMappingInfo to see if it solves the problem.
        Thanks.