• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. AWV Window close callback behavior when closing ViVA Se...

Stats

  • Replies 5
  • Subscribers 148
  • Views 491
  • Members are here 0

AWV Window close callback behavior when closing ViVA Session

TF202506034656
TF202506034656 13 days ago

Good evening,

I'm attaching an init and close procedure to each individual awvWindow. In doing so, I've found what I expect to be a bug (thoughhopefully I'm just misunderstanding the behavior), and am looking for suggestions on how to work around it.

If I collect the window ids of the individual AWV windows attached to my ViVA session, and I close the viva session (main window containing all the plots)O instead of each plot window, only the first window gets destroyed, and the rest persist.

These are my two test init/exit procedures. I've tested both with and without these and the behavior remains. I'm just leaving this for a potential idea to build off of.

procedure(wmAwvWindowHookCB(w_windowID)
hiRegCloseProc(w_windowID 'wmAwvWindowExitHookCB)
t
)

procedure(wmAwvWindowExitHookCB(w_windowID)
t
)
awvInitWindowFunctionAdd('wmAwvWindowHookCB)


Steps to reproduce
wins is the list of AWV windows returned from awvGetWindowList

> wins
(window:257 window:258 window:259 window:260 window:261
window:262 window:263 window:264 window:265
)

>hiGetWindowList
window:1 .... window:257 window:258 window:259 window:260 window:261 window:262
window:263 window:264 window:265

> Close viva session via top-right X

>wins
(window(invalid):1135496992(destroyed) window:258 window:259 window:260 window:261
window:262 window:263 window:264 window:265
)

>hiGetWindowList
window:1 .... window:258 window:259 window:260 window:261 window:262
window:263 window:264 window:265

What I would expect to happen, is for windows 257 through 265 to be invalid/destroyed. In practice this causes my callback to repeatedly trigger my exit procedures on the first window, 257 and runs a bunch of warnings.

EDIT: The ViVA sesion still closes, I cannot access the awv window anymore, but they're still valid as hiRaiseWindow etc returns t, it just doesn't visually show anything.

I'm on IC23.1
Thanks, Trevor



  • Cancel
  • Sign in to reply
Parents
  • Andrew Beckett
    Andrew Beckett 13 days ago

    Trevor,

    There are numerous problems with these triggers - clearly it hasn't been implemented properly after the change from AWD back in IC5141. For example:

    1. When I filed the internal CCR 3297118 for the exit trigger not working, I mentioned an observation that when you closed the last window within a session window (using the X on the tab rather than the session window), it auto-adds a new window without calling the init trigger
    2. I just observed that if I use the results browser in ViVA set to "New Window" then double-clicking or Right Mouse->New Window on the signal, that doesn't call the init trigger either
    3. As you say, if you have multiple tabs open and close the containing session window, it only calls the trigger on one of the windows

    You shouldn't really rely on keeping a list of windows and checking whether they are valid or not (but I would expect them to be properly destroyed, I agree). Something is a bit fishy here...

    I'm afraid this is unlikely to get fixed unless you report it to customer support.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • TF202506034656
    TF202506034656 13 days ago in reply to Andrew Beckett

    Hi Andrew, 

    Thanks for the reply! Unfortunately I can't actually contact customer support, as the portal requires 2FA and my company hasn't provided me a key. 

    I'd imagine this is a rather larger issue though, as seemingly every user using ViVA is indefinitely growing a list of windows they have no way of clearing (they also exist on the symbol space thus I'd imagine take up space)

    When you say report it to customer support, you mean the Case Creation Form right? Or is there a way to do it by email.

    Thanks, 
    Trevor

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 13 days ago in reply to TF202506034656

    Trevor,

    The information you need is the hostid of your license server (look at $CDS_LIC_FILE, ssh onto that machine and run "lmhostid"); whoever looks after your licenses should know this. Failing that, email support@cadence.com and then we may be able to help you create your login and set up the entitlements correctly.

    We don't support submitting support cases by email nowadays - using the support portal is better as it ensures that we capture all the relevant information and often gives suggestions before. submitting the case which might resolve it (not in this case though, I suspect!).

    I don't think the remaining non-destroyed window handle is a big concern - I think it's just a handle that remains (if I try to display the window, it's just empty). This forces them to cleanup:

    foreach(win hiGetWindowList() when(win~>wsId && !member(win awvGetWindowList()) hiCloseWindow(win)))

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett 13 days ago in reply to TF202506034656

    Trevor,

    The information you need is the hostid of your license server (look at $CDS_LIC_FILE, ssh onto that machine and run "lmhostid"); whoever looks after your licenses should know this. Failing that, email support@cadence.com and then we may be able to help you create your login and set up the entitlements correctly.

    We don't support submitting support cases by email nowadays - using the support portal is better as it ensures that we capture all the relevant information and often gives suggestions before. submitting the case which might resolve it (not in this case though, I suspect!).

    I don't think the remaining non-destroyed window handle is a big concern - I think it's just a handle that remains (if I try to display the window, it's just empty). This forces them to cleanup:

    foreach(win hiGetWindowList() when(win~>wsId && !member(win awvGetWindowList()) hiCloseWindow(win)))

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett 13 days ago in reply to Andrew Beckett

    I had a bright idea, so here's a workaround. Note that this doesn't solve the situation where the init trigger is not being called (if the window is opened via the results browser, or because the last tab was closed), but it does ensure that all the exit triggers are called when the overall ViVA window is closed:

    procedure(wmAwvWindowInitHookCB(windowId)
      printf("init triggered %L\n" windowId)
      ; workaround to register a close proc
      hiRegCloseProc(windowId 'wmAwvWindowExitHookCB)
      t
    )
    
    procedure(wmAwvWindowCleanupAfter()
      ; the variable in the let is a semaphore to prevent re-triggering
      ; this function as each window is closed
      let(((wmWithinAwvWindowCleanupAfter t))
        foreach(win hiGetWindowList()
          when(win~>wsId && !member(win awvGetWindowList())
    	hiCloseWindow(win)
          )
        )
      )
      t
    )
    
    procedure(wmAwvWindowExitHookCB(windowId)
      printf("exit triggered %L\n" windowId)
      ; check the semaphore and schedule the cleanup. Have to use at least
      ; a tenth of a second delay - not hiEnqueueCmd or 0 for the timer - because
      ; the awvGetWindowList() is not emptied immediately.
      unless(boundp('wmWithinAwvWindowCleanupAfter) && wmWithinAwvWindowCleanupAfter
        hiRegTimer("wmAwvWindowCleanupAfter()" 1)
      )
      t
    )
    
    awvInitWindowFunctionAdd('wmAwvWindowInitHookCB)
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 13 days ago in reply to Andrew Beckett

    I did file an internal CCR for the situation that the windows are not being closed properly - CCR 3302185.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information