in

The ORM Foundation

Get the facts!

Subtype Connector has stopped working

Last post Tue, Apr 12 2011 22:24 by Matthew Curland. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • Tue, Apr 5 2011 17:41

    • jevenere
    • Top 200 Contributor
    • Joined on Thu, Dec 16 2010
    • Posts 2

    Subtype Connector has stopped working

    I think this has more to do with a change that's happened on my system than with NORMA or Visual Studio 2008, but I've run into an annoyance that I simply can't overcome. The last time I worked in NORMA (about two weeks ago), I created a model and was able to use the Subtype Connector between two objects. Starting yesterday, however, the Subtype Connector no longer works. When I select it in the ORM Designer toolbox it highlights and the cursor changes. However, as soon as I click on the subtype object 1) the selection in the ORM Designer toolbox immediately changes to the Pointer, and 2) the cursor changes from the Subtype Connector cursor to the four-headed arrow cursor, i.e., dragging up to the supertype ends up simply moving the subtype object. I'm stumped. The only change I (knowingly) made since it last worked was to change the location of my files (the three paths listed in Tools, Options, Projects and Solutions). Changing them back didn't resolve the issue. Uninstalling and re-installing VS2008 and NORMA didn't either. I'm stumped, and stuck. Help?
  • Tue, Apr 5 2011 18:23 In reply to

    Re: Subtype Connector has stopped working

    Visual Studio manages the toolbox settings, and there doesn't seem to be a lot that NORMA can do when VS toolbox internals go wrong.

    The two things to try (one at a time):

    1. Right click on the toolbox and choose 'Reset Toolbox'
    2. Shut down VS, delete the registry key 'HKCU\Software\Microsoft\VisualStudio\9.0\ORM Solutions\Natural ORM Architect\ToolboxRevisions', restart, and load a NORMA file.

    Let's try those first, then move on from there. I've heard of this happening occasionally, but have yet to get my hands on a machine where it occurs, so I haven't been able to narrow down the state that is causing the problem.

    -Matt

  • Wed, Apr 6 2011 7:50 In reply to

    • jevenere
    • Top 200 Contributor
    • Joined on Thu, Dec 16 2010
    • Posts 2

    Re: Subtype Connector has stopped working

    I thought as much. It didn't strike me as a problem with NORMA, but I don't use VS for anything else so I'm not able to compare this to anything. No joy on the two suggestions. I followed both steps, but the behavior remains the same. I'm happy to help troubleshoot further if I can. And I'll try to resist further tinkering in case I accidentally stumble on a fix that helps me but denies you the satisfaction. -Jeff
  • Thu, Apr 7 2011 1:17 In reply to

    Re: Subtype Connector has stopped working

    Hi Jeff, thanks for the offer to help out here. If you're willing to engage in a remote debugging session then contact me privately and we can set something up. I'm at GMT-7 daylight time.

    There are several stages in the subtype connection (and other similar actions originating from the toolbox (role connector, model note connector, constraint connector), which are likely also broken). It sounds like you're getting the initial cursor, but are not able to establish the source shape.

    NORMA setup actually installs a debug build and the debug (pdb) files, so you can debug without building by pulling the source down from sourceforge and locating the pdbs. IMPORTANT: If you pull down the NORMA code, do not build or run the projects if you have a NORMA setup installation on your machine. F5 is not your friend: you'll end up hand repairing the GAC (Global Assembly Cache) to get the tool running again.

    If you're not familiar with SVN, you can find instructions at http://sourceforge.net/scm/?type=svn&group_id=158881. I use TortoiseSVN (http://tortoisesvn.tigris.org).

    Once you have the code locally, run the click scenario for creating subtypes (the subtype connector supports both the click-on-subtype/click-on-supertype and the drag-subtype/drop-on-supertype gestures). Debugging these scenarios is tricky because activating the debugger messes with the toolbox state, so it is generally done with trace statements. This seems like a long

    1. Start two instances of Visual Studio.
    2. Open a .orm file in one instance.
    3. Attach to an .orm file in the other instance:
      1. In the other VS instance, choose 'Tools/Attach to Process'
      2. Find devenv.exe in the 'Available Processes' list
      3. Make sure that 'Attach To' is set Managed code (use the Select button if it isn't)
      4. Attach the process
    4. Make sure the symbol file is loaded (this should only be necessary the first time you debug, VS should remember the symbol location):
      1. Open the 'Modules' window (Debug/Windows/Modules)
      2. Sort by the name column
      3. Select 'ORMSolutions.ORMArchitect.Core.VS2008.dll'
      4. If a symbol file is loaded you're fine. Otherwise,
      5. Right click on the row and choose 'Load Symbols'
      6. Open the symbol file in C:\Program Files\ORM Solutions\ORM Architect for Visual Studio 2008\bin\ORMSolutions.ORMArchitect.Core.VS2008.pdb
    5. From the 'trunk' directory of your NORMA sources, open ORMModel\ShapeModel\SubtypeConnectorAction.cs
    6. Add breakpoints in the the OnClicked method (starting at line 184)
      1. Click in the margin to put a breakpoint on the first code line (base.OnClicked(e))
      2. Right click the breakpoint and choose 'When hit'
      3. Select the 'Print a message' checkbox and place 'sourceShapeElement (before): {this.sourceShapeElement}' in the message file
      4. Put a breakpoint on the next line and set the message as 'sourceShapeElement (after): {this.sourceShapeElement}'
    7. Open the Output window (View/Output), select the Debug output with the dropdown, and clear the window
    8. Arrange your two VS instances so you can see the output window when the .orm file is active.
    9. Select the Subtype Connector toolbox item and click on an entity type

    You should see output along these lines:

    sourceShapeElement (before): null
    sourceShapeElement (after): "EntityType <ObjectTypeShape>: EntityType"

    The behavior you're describing sounds like you might be getting a null on the second line, but that is a wild guess at this point.

    Again, I appreciate the help. I don't ask for a remote debug very often, but I think you're the 3rd person I'm aware of who has had this issue and it is pretty debilitating, so I need to get to the bottom of it.

    -Matt

  • Tue, Apr 12 2011 22:24 In reply to

    Re: Subtype Connector has stopped working

    Hi All,

    Thanks to a remote debugging session on Jeff's machine (thanks Jeff) I've managed to track down this elusive bug. It turns out that when you use a floating toolbox window (as opposed to the default docked location) most of the gestures deactivate as soon as you click on the diagram. This affects VS2005 and VS2008, but was apparently fixed in VS2010.

    I have a fix which will be in the next public drop (changeset 1465 on sourceforge). In the meantime, if anything on the toolbox (including the subtype connector) stops working then dock your toolbox and you'll be back in business.

    -Matt

Page 1 of 1 (5 items)
© 2008-2020 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service