[GRASS-dev] Re: [GRASS-user] [bug #3041] nviz max resolution ppm image dump

Hamish hamish_nospam at yahoo.com
Wed Aug 30 00:47:16 EDT 2006


Glynn Clements wrote:

> 
> Hamish wrote:
> 
> > > Note that setting the environment variables:
> > > 
> > > 	GRASS_NO_GLX_PBUFFERS
> > > 	GRASS_NO_GLX_PIXMAPS
> > > 
> > > will disable use of these features, in case of problems with your
> > > OpenGL setup (libraries or X server). Their values don't matter, only
> > > whether or not they are set.
> > 
> > These should be added to lib/init/variables.html
> 
> I'll do that.
> 
> > Setting those make no difference to this bug however:
> > 
> > #with GLX
> > G63 > nviz elevation.10m
> 
> > % Creating PBuffer Using GLX 1.3
> > Create PixMap Using GLX 1.1
> 
> > Final Assembled Image will be 1929 x 2048
> 
> > Assembling Tiles
> > pnmcat: EOF / read error reading a row of pixels
> 
> > #without GLX
> > G63> export GRASS_NO_GLX_PBUFFERS=TRUE
> > G63> export GRASS_NO_GLX_PIXMAPS=TRUE
> > G63> nviz elevation.10m
> 
> > % Final Assembled Image will be 1904 x 2048
> 
> > Assembling Tiles
> > pnmcat: Zero byte allocation
> 
> Well, it appears to make *some* difference, i.e. you're getting a
> different error message.
> 
> Does removing the following from nviz2.2_script help?
> 
> 	# Set the cancel function for drawing
> 	Nset_cancel_func update

nope. I tried that yesterday (without GRASS_NO_GLX_*), have just tried
again with that commented out + GRASS_NO_GLX_* set. It's still broken.
[..]
Writing Tile 8 of 9
Writing Tile 9 of 9
Assembling Tiles
pnmcat: Zero byte allocation
pnmcat failed to create assembled image
Check that pnmcat is installed and path is set
pnmcat: Zero byte allocation
pnmcat failed to create assembled image
Check that pnmcat is installed and path is set
pnmcat: Zero byte allocation
pnmcat failed to create assembled image
Check that pnmcat is installed and path is set
pnmcat: EOF / read error reading magic number
pnmcat failed to create assembled images
Check that pnmcat is installed and path is set


adding some G_debug(0,) messages to lib/ogsf/gsd_prim.c to check on
the *pixbuf = malloc(xsize * ysize * 4);

% Final Assembled Image will be 2048 x 2048
Writing Tile 1 of 9
D0/0: gsd_writeView(): xsize=1024  ysize=1024
Writing Tile 2 of 9
D0/0: gsd_writeView(): xsize=1024  ysize=1024
Writing Tile 3 of 9
D0/0: gsd_writeView(): xsize=0  ysize=1024
Writing Tile 4 of 9
D0/0: gsd_writeView(): xsize=1024  ysize=1024
Writing Tile 5 of 9
D0/0: gsd_writeView(): xsize=1024  ysize=1024
Writing Tile 6 of 9
D0/0: gsd_writeView(): xsize=0  ysize=1024
Writing Tile 7 of 9
D0/0: gsd_writeView(): xsize=1024  ysize=0
Writing Tile 8 of 9
D0/0: gsd_writeView(): xsize=1024  ysize=0
Writing Tile 9 of 9
D0/0: gsd_writeView(): xsize=0  ysize=0
Assembling Tiles
pnmcat: Zero byte allocation
pnmcat failed to create assembled image


the img_width, img_height are reset to 0 in nviz/src/do_zoom.c line ~128:

	    /* Re-set image width or height if required */
	    if ((maxx + XX) < c)
		img_width = maxx + XX;
	    if ((maxy + YY) < d)
		img_height = maxy + YY;



Hamish




More information about the grass-dev mailing list