General Topics :  geo-*- Rick Richardson's Linux Tools for Geocaching The fastest message board... ever.
 
geo-map memory hole? "cannot allocate" [solved]
Posted by: Steve8x8 ()
Date: August 04, 2010 04:38AM

Trying to build another map, now on my Squeeze system, I repeatedly get the following:

/home/steve8x8/bin/geo-map: xrealloc: ../bash/subst.c:4952: cannot allocate 1073741824 bytes (2148745216 bytes allocated)

This is a 2000x1600 map - nothing to worry about, I'd like to think. It worked with Lenny.

Full command line is:
geo-map -c -g 3 -abasemap-homezone.png -omap-homezone.png -ttiger -i -s15000 -W2000 -H1600 52.38 13.02

Adding "-D3" gives no additional information (trying -D5 now: same result).

Any suggestions how to proceed?

--------------------
My geo-* {patches,mirror,history} went offline Oct 1, 2010! Sorry guys...



Edited 2 time(s). Last edit at 09/04/2010 12:51PM by Steve8x8.

Options: ReplyQuote
Re: geo-map memory hole? "cannot allocate"
Posted by: Steve8x8 ()
Date: August 04, 2010 07:05AM

Update: running "bash -x geo-map ..." show that processing stops at the 500th entry of the (much longer) tiger file, last output to screen is
++ (( i < Npts && i < e ))
(while loop, line 2231 of geo-map.sh)

Reducing the number of lines to 5, the behaviour is the same (stop at last line).

The loop itself seems to be OK (its exited when running out of input=, but adding some tee commands to the pipe shows that "tiger2cvt" doesn't stop creating output - it should place a single (red) cross at the center, and some blue dots according to the input, but the output generated is full of
-fill red -draw "rectangle 0,626 -1,627"
stuff (with individual number going up to beyond 1 million), then followed by an endless sequence of
-fill red -draw "rectangle 0,0 0,-1" -fill red -draw "rectangle 0,0 -1,0"
Since this is written to a pipe it will eat up all available swap.

I have replaced mawk with gawk (remembering that non-gawk awks might cause trouble), no change.

Running out of my wits.

--------------------
My geo-* {patches,mirror,history} went offline Oct 1, 2010! Sorry guys...

Options: ReplyQuote
Re: geo-map memory hole? "cannot allocate"
Posted by: Steve8x8 ()
Date: August 04, 2010 07:52AM

Just a final (?) addition:
even without a "-t input" file, only trying to add marks with "-c -g 1", there's a single-line input to tiger2cvt
13.02,52.38^cross,red,10^52.22.800 13.01.200^NONE^52.22.800 13.01.200
resulting in a slowly growing output file (I interrupted at 1GB), with no "text" keyword inside (AFAICT).
Mysterious, since the ChangeLog doesn't list any geo-map changes.

--------------------
My geo-* {patches,mirror,history} went offline Oct 1, 2010! Sorry guys...

Options: ReplyQuote
Re: geo-map memory hole? "cannot allocate"
Posted by: rickrich ()
Date: August 04, 2010 07:56AM

Its a problem in squeese.

Options: ReplyQuote
Re: geo-map memory hole? "cannot allocate"
Posted by: Steve8x8 ()
Date: August 04, 2010 08:56AM

Can we get a bit into detail? It obviously happens inside tiger2vct which is awk code, and it happens with both mawk and gawk... I'd be happy to file a bug report if I knew against which binary/package.

Any suggestions to track this down are welcome.
Am I the only Squeeze user around?

--------------------
My geo-* {patches,mirror,history} went offline Oct 1, 2010! Sorry guys...

Options: ReplyQuote
Re: geo-map memory hole? "cannot allocate"
Posted by: Steve8x8 ()
Date: August 20, 2010 01:42PM

It is indeed a Squeeze issue, but it hid somewhere where I expected it last:
The output of "file x.png" is slightly different, it's no longer "PNG image" but "PNG image data", thus confusing the parsing code.

The attached two-line patch fixes this - it replaces a "tr -d" by a "cut" operation, and shortens a "read". Should be no additional CPU burden (compared to convert).

Rick, can you add this?

Edit: patch against geo-map.sh

--------------------
My geo-* {patches,mirror,history} went offline Oct 1, 2010! Sorry guys...



Edited 1 time(s). Last edit at 08/20/2010 01:44PM by Steve8x8.

Attachments: 20100002-map-endlessloop.diff (397 bytes)  
Options: ReplyQuote
Re: geo-map memory hole? "cannot allocate"
Posted by: rickrich ()
Date: August 20, 2010 04:20PM

committed.

Options: ReplyQuote


Sorry, only registered users may post in this forum.
This forum powered by Phorum.