Nesting of structures is too complexe - sometimes

Started by jtrask, May 18, 2014, 10:38:14 AM

Previous topic - Next topic

jtrask

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?

Deana

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.
Deana F.
Technical Support
Wilson WindowWare Inc.

kdmoyers

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
The mind is everything; What you think, you become.

jtrask

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.

Deana

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.
Deana F.
Technical Support
Wilson WindowWare Inc.