WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: jtrask on May 18, 2014, 10:38:14 AM

Title: Nesting of structures is too complexe - sometimes
Post by: jtrask on May 18, 2014, 10:38:14 AM
I have a script that runs perfectly on my Windows 7 system.  I copy it to the netlogon folder on my domain controller and immediately get ee53: Struct Error: Nesting of structures is too complex.

I don't think that my structure is too complex.  I'm not using gotos or GoSubs.  When this error occurs, the system hasn't even completed all of the boilerplate code that is includes all of my other scripts, creating system constands, checking the command line, etc.

Any idea why this would fail on my DC but not on my Windows 7 system?
Title: Re: Nesting of structures is too complexe - sometimes
Post by: Deana on May 19, 2014, 08:24:35 AM
WinBatch allows you to nest structures (If, For, While) up to 100 levels deep. You mention that your script does not have any explicit Gotos or GoSubs...however does the script have error handling that might be improperly structured?

Also you mention it fails loading "boilerplate code". I recommend minimizing code down to a script with a reproducible error on this problem system. Then add DebugTrace(@on,"trace.txt") to the beginning of the script, any Call'd scripts and inside any UDFs, run it until the error, then inspect the resulting trace file for clues as to the problem

Feel free to post the trace file here ( removing any private info) if you need further assistance.
Title: Re: Nesting of structures is too complexe - sometimes
Post by: kdmoyers on May 20, 2014, 07:52:34 AM
Quote from: jtrask on May 18, 2014, 10:38:14 AM
Any idea why this would fail on my DC but not on my Windows 7 system?

I once had a similar problem -- the "structure too deep" error depended upon the situation the program ran in. Whaaaa?

It turned out there was a subtle way for my program to restart a for/next loop that depended upon the data itself.  Took me weeks to see it!

Anyway, I guess my point is, "structure too deep" errors can happen in a program that appears to be structured perfectly, if there is an exception that makes it jump into or out of a structure.

just my $0.02
-Kirby
Title: Re: Nesting of structures is too complexe - sometimes
Post by: jtrask on May 23, 2014, 07:21:29 AM
kdmoyers, your two cents worth may be right on the money.  I'm reading an INI file and processing drive mappings based on the results.  I'm not sure that I was using the same INI file in both environments, but with each user being a member of different groups, even using the same INI file, I could get different results for different users.
Title: Re: Nesting of structures is too complexe - sometimes
Post by: Deana on May 23, 2014, 07:32:11 AM
jptrask,

These types of errors can be difficult to debug ( especially without seeing any of the code ). If you still need assistance, please post the code so we can offer further suggestions.