[GRASS5] [bug #2937] (grass) v.in.ogr, GUI, fails at building areas due to 'too many nested evaluations (infinite loop?)'

Hi!

I've just had this "too many nested evaluations" error with v.extract. It hang
my v.extract GUI window for good, I couldn't even scroll it or select text
from it. After I forced it to close it printed to the terminal the following
stuff:

---

bgerror failed to handle background error.
    Original error: too many nested evaluations (infinite loop?)
    Error in bgerror: can't invoke "grab" command: application has been destroyed
bgerror failed to handle background error.
    Original error: too many nested evaluations (infinite loop?)
    Error in bgerror: can't invoke "tk" command: application has been
destroyedbgerror failed to handle background error.
    Original error: too many nested evaluations (infinite loop?)
    Error in bgerror: can't invoke "tk" command: application has been
destroyedbgerror failed to handle background error.
    Original error: too many nested evaluations (infinite loop?)
    Error in bgerror: can't invoke "tk" command: application has been
destroyedbgerror failed to handle background error.

---

... and so on for hundreds of lines ...

Using Grass 6.1 cvs 2006-02-20 built from source, Ubuntu Breezy. Only TCL/TK
8.3 used at build time and at run time, no 8.4 at all (so my theory of the
"too many nested evaluations" bug being connected with only 8.4 seems wrong;
though it still seems to me that when I'm now using 8.3/Ubuntu(Debian) it pops
up much less frequently than when I was using 8.4/Mandriva, whatever the
reason is).

The CLI equivalent and output of the command that made v.extract GUI fail with
such a hasty abandon is:

---

v.extract input=rogow_parcels_05_water_addcat_bnd_ln_poly_addcat
output=rogow_parcels_05_water_addcat_bnd_ln_poly_addcat_diss
type=point,line,boundary,centroid,area,face layer=1 new=-1 -d -t
Building topology ...
Registering lines:
55 primitives registered
Building areas:

0 areas built
0 isles built
Attaching islands:
Attaching centroids:

Topology was built.
Number of nodes : 48
Number of primitives: 55
Number of points : 0
Number of lines : 55
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
Removing duplicate centroids ...Building topology ...
Registering lines:
55 primitives registered
Building areas:

0 areas built
0 isles built
Attaching islands:
Attaching centroids:

Topology was built.
Number of nodes : 48
Number of primitives: 55
Number of points : 0
Number of lines : 55
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0

---

The funniest part is I cannot reproduce the error at will. But sometimes when
I keep on trying over & over again I get the following (in the terminal):

too many nested evaluations (infinite loop?)
    (procedure "GlobalVar::exists" line 1)
    invoked from within
"GlobalVar::exists $_widget($path,var)"
    (procedure "ProgressBar::_modify" line 4)
    invoked from within
"ProgressBar::_modify .progress"
    ("eval" body line 1)
    invoked from within
"eval ProgressBar::$cmd .progress $args"
    (procedure ".progress" line 1)
    invoked from within
"$opt($dlg,progress) _modify"
    (procedure "progress" line 7)
    invoked from within
"progress $dlg $val"
    invoked from within
"if [eof $fh] {
                close $fh
        } else {
                set str [gets $fh]
                append str "\n"
                if { [fblocked $fh] } { set str [read $fh] }
                while {[set idx [string f..."
    (procedure "prnout" line 5)
    invoked from within
"prnout 1 file6"

---

There has never been any comments from Grass devs regarding this issue. And it
seem quite a common bug (browse grass5 and grasslist archives, also see:
https://intevation.de/rt/webrt?serial_num=3117). Any ideas how to fix so the
current Grass gui could be operational?

Maciek

-------------------------------------------- Managed by Request Tracker

Maciek,

I don't know exactly what causes this error because I haven't really worked
with the code that creates the TclTk dialogs for modules. But I have seen
this problem crop up before.

For me, it seems to happen when I try to do something rapidly and
repeatedly, as you indicate below. I kind of think that an increasingly
large number of events get backed up in an event buffer while the process is
trying to complete. The other thing, kind of related, is that the process
has set a variable value to use, then before it is completed a new instance
of the process (doing it again in rapid succession) trys to unset it.

Not sure if that's the correct explanation or if I explained it well, but
this is the kind of impression I get. In other words, if your v.extract (or
other process) has not yet finished and you try to run it again, and repeat
this, you may get this kind of error.

My advice is to wait until this particular process is finished before trying
to rerun it over and over again.

I don't know what would be causing it to crop up in other settings.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Maciek Sieczka via RT <grass-bugs@intevation.de>
Reply-To: Maciek Sieczka via RT <grass-bugs@intevation.de>
Date: Fri, 3 Mar 2006 12:06:55 +0100 (CET)
Cc: <grass5@grass.itc.it>
Subject: [GRASS5] [bug #2937] (grass) v.in.ogr, GUI, fails at building areas
due to 'too many nested evaluations (infinite loop?)'

The funniest part is I cannot reproduce the error at will. But sometimes when
I keep on trying over & over again I get the following (in the terminal):

too many nested evaluations (infinite loop?)
    (procedure "GlobalVar::exists" line 1)
    invoked from within

On Sat, 04 Mar 2006 09:12:46 -0700
Michael Barton <michael.barton@asu.edu> wrote:

Maciek,

I don't know exactly what causes this error because I haven't really
worked with the code that creates the TclTk dialogs for modules. But
I have seen this problem crop up before.

"Crop up before" - what does that mean? Sorry for my poor English.

For me, it seems to happen when I try to do something rapidly and
repeatedly, as you indicate below.

I believe this is not a cause of the problem. The very first "v.extract
error" occured when my overall actvitity in Grass GUI was equal zero.
Same for the original "v.in.ogr error", which I was able to reproduce at
will (in oppsite to v.extract case), which was occuring not matter if I
was using the d.m extensively or not.

Summarising, I don't think this "too many nested evaluations" bug pops
up at user's specific activity.

I kind of think that an
increasingly large number of events get backed up in an event buffer
while the process is trying to complete. The other thing, kind of
related, is that the process has set a variable value to use, then
before it is completed a new instance of the process (doing it again
in rapid succession) trys to unset it.

Maybe there is something on here, but it is not dependent on users
level of activity, I believe.

Not sure if that's the correct explanation or if I explained it well,
but this is the kind of impression I get. In other words, if your
v.extract (or other process) has not yet finished and you try to run
it again, and repeat this, you may get this kind of error.

My advice is to wait until this particular process is finished before
trying to rerun it over and over again.

I press "Run" key again only once the previous command run completes -
acoording to command's output.

I don't know what would be causing it to crop up in other settings.

Thanks Michael for your interest. I hope this annoying issue
will be worked out somehow one time. Thanks for your great work.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/