Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315805 - Scripts node sometimes likes to disappear
Summary: Scripts node sometimes likes to disappear
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M2   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-04 13:21 EDT by Michael Rennie CLA
Modified: 2010-08-12 09:53 EDT (History)
2 users (show)

See Also:
Michael_Rennie: review+


Attachments
patch (912 bytes, patch)
2010-08-11 22:09 EDT, Darin Wright CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2010-06-04 13:21:02 EDT
code from HEAD

Simon and myself have noticed that sometimes - for apparently no reason - the Scripts node goes away while debugging. You can cause it to come back double-clicking the debug target. This is a viewer problem - we just have to find out if it is our code or the platform async viewer code.
Comment 1 Michael Rennie CLA 2010-06-04 13:27:41 EDT
Here is a trace when the node disappeared. Apparently the viewer thinks the target only has 1 child (when it should have 2)

RECEIVED DELTA: Model Delta Start
  Element: org.eclipse.debug.internal.core.LaunchManager@af7a1f
      Flags: NO_CHANGE
      Index: -1 Child Count: -1
    Element: org.eclipse.debug.core.Launch@1ef55fb
        Flags: NO_CHANGE
        Index: -1 Child Count: -1
      Element: org.eclipse.wst.jsdt.debug.internal.core.model.JavaScriptDebugTarget@1a85031
          Flags: CONTENT | SELECT | STATE | 
          Index: -1 Child Count: -1
Model Delta End

RECEIVED DELTA: Model Delta Start
  Element: org.eclipse.debug.internal.core.LaunchManager@af7a1f
      Flags: NO_CHANGE
      Index: -1 Child Count: -1
    Element: org.eclipse.debug.core.Launch@1ef55fb
        Flags: NO_CHANGE
        Index: 0 Child Count: 1
      Element: org.eclipse.wst.jsdt.debug.internal.core.model.JavaScriptDebugTarget@1a85031
          Flags: NO_CHANGE
          Index: 0 Child Count: 1
        Element: org.eclipse.wst.jsdt.debug.internal.core.model.JavaScriptThread@19fbfd6
            Flags: EXPAND | SELECT | STATE | REVEAL | 
            Index: 0 Child Count: 0
Model Delta End
Comment 2 Michael Rennie CLA 2010-06-07 14:13:52 EDT
Debugging this with Darin W, we found that the viewer adapter service is not loading our UI bundle for our model proxy factory if our UI bundle is not active. 

Steps:

1. start a target workspace
2. launch a JS debug configuration from the launch history only - do not open the launch dialog

Happens:

after the launch any step / suspend / resume will cause the Scripts node to disappear

Expected:

it all works fine

To confirm it is lazy loading at play, terminate and relaunch the debug session from the steps above, or open the launch dialog to a JS config - both of the actions cause our UI bundle to be loaded, and from then on the Scripts node behaves as expected.
Comment 3 Darin Wright CLA 2010-08-11 22:09:05 EDT
Created attachment 176429 [details]
patch

This patch force loads adapters when they are not found on the first attempt.
Comment 4 Darin Wright CLA 2010-08-11 22:10:03 EDT
Mike, please test the patch to see if this solves the problem.
Comment 5 Michael Rennie CLA 2010-08-12 09:50:57 EDT
+1 for the patch. Our model always looks correct now while stepping, etc.
Comment 6 Michael Rennie CLA 2010-08-12 09:53:26 EDT
applied patch to HEAD