Debugging GNTs

Is there any way to get a more specific description of whats gone wrong inside a GNT, or the exact node where it failed, more than an "object reference not set to an instance of an object" error? I'm fairly certain it has something to do with other GNT's contained within the main GNT im trying to create, but i have a few of them and its difficult to pinpoint the issue with trial and error, since the all the nodes used to define the GNT work fine by themselves.

  • Hi Dennis, 

    Checking with the GC development team and from my own experience, the available approach is to test the constituting components of GNTs in the state they were before the GNT had been created, attempting to reproduce for the assembly the conditions under which the GNT fails. The "object reference not set to an instance of an object" message is not generated in GC itself but is passed through from somewhere "below" GC in the system.  Therefore, and unfortunately, the error message itself does not help narrow down the problem. 

    If in any way possible, please post or send us the various scripts generating the component GNTs and the composite GNT and we will try to reproduce the problem (per your description) to see whether we can find a remedy.  Please let us also know which version of ABD CONNECT Edition you are using. 

    Regards, 

        Volker 

       

  • It would be difficult to, as there are quite a few component GNTs. Isnt GC able to tell me at least where in the script it encountered the error? How come the component nodes all work, but fail when in a GNT?

  • Hi Dennis,

    Often, "object reference not set to an instance of an object" is a message returned by the dot Net framework when a non-existing (or no-longer-existing) object is accessed, or an object that has not been successfully created, although it's expected to have been created.

    There could be several reasons why your specific nested GNTs fail in that way. I think the foremost reasons that come to mind are:

    (1) the nested GNTs find themselves in a situation where they fail, not anticipated during their design (e.g. orientation, non-planarity, sequence of vertices or other inputs, use of script functions that are not present in the active script, other reasons);

    (2) variable and property names/node names are the same within several nested GNTs or parent and child GNTs, or in ByFunction techniques contained therein (although there are other error message that are usually posted under such circumstances);

    (3) unforeseen memory overflow, list depth, list length, or not-a-list issues (some of these also return more specific messages).

    Over the years we have worked hard at protecting users against such errors and supporting script-debugging with more specific error messages wherever we can intercept those types of exceptions. However, the continued success of such efforts does depend on having scripts with which we can consistently reproduce such errors. Therefore, please consider zipping up the DGNs and sending them via e-mail to my e-mail address (Volker.Mueller (at) Bentley.com) specifying which version of GenerativeComponents you are using. 

    Thank you,

          Volker