[GRASS-user] nviz max resolution ppm image dump

My nviz dies with a segfault when I try to dump an image as maximum resolution ppm.

I have this same problem with grass 6.1 under FC 5, and under grass 5.4 under FC 4.

I can dump the other formats just fine.

The map products look great on the screen, but aren't much use if I can't get them into a high-res image file.

Does anyone have any advice on this problem?

Thanks,

Bill H.

--
William W. Hargrove hnw@fire.esd.ornl.gov
Environmental Sciences Division (865) 241-2748
Oak Ridge National Laboratory (865) 574-4665 (fax)
P.O. Box 2008, M.S. 6407 http://research.esd.ornl.gov/~hnw
Oak Ridge, TN 37830-6407 FedEx/UPS, use "Bethel Valley Rd."

William Hargrove wrote:

My nviz dies with a segfault when I try to dump an image as maximum
resolution ppm.

I have this same problem with grass 6.1 under FC 5, and under grass
5.4 under FC 4.

what's the date on the 6.1? 6.1.0 or 6.1-cvs? This was an old known
problem on 64bit &/or big endian (Mac G5), I had thought that it was
fixed by Glynn & crew some months ago.

I can dump the other formats just fine.

The map products look great on the screen, but aren't much use if I
can't get them into a high-res image file.

Does anyone have any advice on this problem?

http://intevation.de/rt/webrt?serial_num=3041

perhaps that bug referes to a slightly different problem?

Hamish

This is 6.1.0 built from source, running under 64-bit FC 5.

Here is what happens when I try to dump a max-res ppm:

recalculating normals...
Diagnostic: invalid command name "Nviz_animation_save" -- Save procedure for panel animation may not be defined
Diagnostic: invalid command name "Nviz_kanimator_save" -- Save procedure for panel kanimator may not be defined
Diagnostic: invalid command name "Nviz_query_save" -- Save procedure for panel query may not be defined
Diagnostic: invalid command name "Nviz_sdiff_save" -- Save procedure for panel sdiff may not be defined
Diagnostic: invalid command name "Nviz_label_save" -- Save procedure for panel label may not be defined
Diagnostic: invalid command name "Nviz_scale_save" -- Save procedure for panel scale may not be defined
Diagnostic: invalid command name "Nviz_pos_save" -- Save procedure for panel pos may not be defined
Diagnostic: invalid command name "Nviz_resize_save" -- Save procedure for panel resize may not be defined
Diagnostic: invalid command name "Nviz_pick_save" -- Save procedure for panel pick may not be defined
Diagnostic: invalid command name "Nviz_highlight_save" -- Save procedure for panel highlight may not be defined
Creating PBuffer Using GLX 1.3
Final Assembled Image will be 1 x 1
Writing Tile 1 of 1
Assembling Tiles
GLX -- destroy pbuffer
./donviz: line 2: 10088 Segmentation fault nviz elevation=elev48.new color=neon2.25 vector=states100,neondomains_states

Any ideas?

Thanks,

Bill H.

Hamish wrote:

William Hargrove wrote:

My nviz dies with a segfault when I try to dump an image as maximum resolution ppm.

I have this same problem with grass 6.1 under FC 5, and under grass
5.4 under FC 4.
   
what's the date on the 6.1? 6.1.0 or 6.1-cvs? This was an old known
problem on 64bit &/or big endian (Mac G5), I had thought that it was
fixed by Glynn & crew some months ago.

I can dump the other formats just fine.

The map products look great on the screen, but aren't much use if I can't get them into a high-res image file.

Does anyone have any advice on this problem?
   
http://intevation.de/rt/webrt?serial_num=3041

perhaps that bug referes to a slightly different problem?

Hamish

--
William W. Hargrove hnw@fire.esd.ornl.gov
Environmental Sciences Division (865) 241-2748
Oak Ridge National Laboratory (865) 574-4665 (fax)
P.O. Box 2008, M.S. 6407 http://research.esd.ornl.gov/~hnw
Oak Ridge, TN 37830-6407 FedEx/UPS, use "Bethel Valley Rd."

William Hargrove wrote:

>>My nviz dies with a segfault when I try to dump an image as maximum
>>resolution ppm.
>>
>>I have this same problem with grass 6.1 under FC 5, and under grass
>>5.4 under FC 4.

..

>>I can dump the other formats just fine.
>>
>>The map products look great on the screen, but aren't much use if I
>>can't get them into a high-res image file.
>>
>>Does anyone have any advice on this problem?

Hamish wrote:

>what's the date on the 6.1? 6.1.0 or 6.1-cvs? This was an old known
>problem on 64bit &/or big endian (Mac G5), I had thought that it was
>fixed by Glynn & crew some months ago.

I guess it is this bug after all:

> http://intevation.de/rt/webrt?serial_num=3041

William Hargrove wrote:

This is 6.1.0 built from source, running under 64-bit FC 5.

Here is what happens when I try to dump a max-res ppm:

recalculating normals...
recalculating normals...
Diagnostic: invalid command name "Nviz_animation_save" -- Save
procedure for panel animation may not be defined
Diagnostic: invalid command name "Nviz_kanimator_save" -- Save
procedure for panel kanimator may not be defined
Diagnostic: invalid command name "Nviz_query_save" -- Save procedure
for panel query may not be defined
Diagnostic: invalid command name "Nviz_sdiff_save" -- Save procedure
for panel sdiff may not be defined
Diagnostic: invalid command name "Nviz_label_save" -- Save procedure
for panel label may not be defined
Diagnostic: invalid command name "Nviz_scale_save" -- Save procedure
for panel scale may not be defined
Diagnostic: invalid command name "Nviz_pos_save" -- Save procedure
for panel pos may not be defined
Diagnostic: invalid command name "Nviz_resize_save" -- Save procedure

for panel resize may not be defined
Diagnostic: invalid command name "Nviz_pick_save" -- Save procedure
for panel pick may not be defined
Diagnostic: invalid command name "Nviz_highlight_save" -- Save
procedure for panel highlight may not be defined
Creating PBuffer Using GLX 1.3
Final Assembled Image will be 1 x 1
Writing Tile 1 of 1
Assembling Tiles
GLX -- destroy pbuffer
./donviz: line 2: 10088 Segmentation fault nviz
elevation=elev48.new color=neon2.25
vector=states100,neondomains_states

Any ideas?

I get a segfault too: (32bit P4, 2gig RAM, Debian/stable)

Speafish with nviz window made to be large:

G63> nviz elevation.10m
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
r200_makeX86Normal3fv/197 CVAL 0 OFFSET 14 VAL 8260df0
r200_makeX86Normal3fv/198 CVAL 4 OFFSET 20 VAL 8260df4
r200_makeX86Normal3fv/199 CVAL 8 OFFSET 25 VAL 8260df8
r200_makeX86Normal3fv done
% recalculating normals...
Creating PBuffer Using GLX 1.3
Create PixMap Using GLX 1.1
Final Assembled Image will be 1935 x 2048
Writing Tile 1 of 9
Writing Tile 2 of 9
Writing Tile 3 of 9
MALLOC Failed
Segmentation fault

(hard to replicate)

The "MALLOC Failed" message comes from lib/ogsf/gsd_prim.c

/************************************************************************/
int gsd_writeView(unsigned char **pixbuf, unsigned int xsize,
                  unsigned int ysize)
{

    /* Malloc Buffer for image */
    *pixbuf = malloc(xsize * ysize * 4);

    if (!*pixbuf) {
        fprintf(stderr, "MALLOC Failed\n");
        return (0);
    }

    /* Read image buffer */
    glReadBuffer(GL_FRONT);

    /* Read Pixels into Buffer */
    glReadPixels(0, 0, xsize, ysize, GL_RGBA, GL_UNSIGNED_BYTE, *pixbuf);
    return (1);
}

/************************************************************************/

with window left at starting size: [note larger "Final Assembled Size"]

G63> nviz elevation.10m
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
r200_makeX86Normal3fv/197 CVAL 0 OFFSET 14 VAL 82613f8
r200_makeX86Normal3fv/198 CVAL 4 OFFSET 20 VAL 82613fc
r200_makeX86Normal3fv/199 CVAL 8 OFFSET 25 VAL 8261400
r200_makeX86Normal3fv done
% Creating PBuffer Using GLX 1.3
Create PixMap Using GLX 1.1
Final Assembled Image will be 2048 x 2048
Writing Tile 1 of 9
Writing Tile 2 of 9
Writing Tile 3 of 9
Writing Tile 4 of 9
Writing Tile 5 of 9
Writing Tile 6 of 9
Writing Tile 7 of 9
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
Destroy Pixmap and GLXPixmap

no segfault, NVIZ keeps running, these files are left behind:
(easy to replicate)

      0 Aug 29 17:24 spearNVhi2.ppm
3145745 Aug 29 17:24 spearNVhi2_1_1.ppm
3145745 Aug 29 17:24 spearNVhi2_1_2.ppm
     14 Aug 29 17:24 spearNVhi2_1_3.ppm
3145745 Aug 29 17:24 spearNVhi2_2_1.ppm
3145745 Aug 29 17:24 spearNVhi2_2_2.ppm
     14 Aug 29 17:24 spearNVhi2_2_3.ppm
     14 Aug 29 17:24 spearNVhi2_3_1.ppm
     14 Aug 29 17:24 spearNVhi2_3_2.ppm
     11 Aug 29 17:24 spearNVhi2_3_3.ppm
      0 Aug 29 17:24 spearNVhi2tmp1.ppm
      0 Aug 29 17:24 spearNVhi2tmp2.ppm
      0 Aug 29 17:24 spearNVhi2tmp3.ppm
      0 Aug 29 17:30 spearNVhi3.ppm.ppm

assembly of rows then full image fail as partials are not valid images
(14 byte ones). Images with data assemble, but contain random x-window
buffer weirdness: multi-virtual-desktop collages.

Summary: the partial tiles are broken.

I haven't tried it with just one workspace.

minimizing the NVIZ window (before clicking "ok" for the output
filename) gives the same result.

at the end of the bug report Glynn offers a reason, but I have no idea
where to go from there. Dumb debugging effort: I still get the broken
result if I comment out "Nset_cancel_func update" in
  visualization/nviz/scripts/nviz2.2_script
and rebuild nviz.

?
Hamish

Thanks, Hamish:

Notice that my error:

Creating PBuffer Using GLX 1.3
Final Assembled Image will be 1 x 1
Writing Tile 1 of 1
Assembling Tiles

is a little different from your error:

Create PixMap Using GLX 1.1
Final Assembled Image will be 1935 x 2048
Writing Tile 1 of 9
Writing Tile 2 of 9
Writing Tile 3 of 9
MALLOC Failed

Mine does not seem to read the PBuffer screen size correctly from GLX, while yours does.
Yours fails on the MALLOC, while mine just segfaults.

The relevant code seems to be in do_zoom.c, but I can't make much sense out of it.

Perhaps Covill can help?

Bill H.

Hamish wrote:

William Hargrove wrote:

My nviz dies with a segfault when I try to dump an image as maximum resolution ppm.

I have this same problem with grass 6.1 under FC 5, and under grass
5.4 under FC 4.
       

..

I can dump the other formats just fine.

The map products look great on the screen, but aren't much use if I can't get them into a high-res image file.

Does anyone have any advice on this problem?
       
Hamish wrote:

what's the date on the 6.1? 6.1.0 or 6.1-cvs? This was an old known
problem on 64bit &/or big endian (Mac G5), I had thought that it was
fixed by Glynn & crew some months ago.
     
I guess it is this bug after all:

http://intevation.de/rt/webrt?serial_num=3041
     
William Hargrove wrote:

This is 6.1.0 built from source, running under 64-bit FC 5.

Here is what happens when I try to dump a max-res ppm:

recalculating normals...
Diagnostic: invalid command name "Nviz_animation_save" -- Save procedure for panel animation may not be defined
Diagnostic: invalid command name "Nviz_kanimator_save" -- Save procedure for panel kanimator may not be defined
Diagnostic: invalid command name "Nviz_query_save" -- Save procedure for panel query may not be defined
Diagnostic: invalid command name "Nviz_sdiff_save" -- Save procedure for panel sdiff may not be defined
Diagnostic: invalid command name "Nviz_label_save" -- Save procedure for panel label may not be defined
Diagnostic: invalid command name "Nviz_scale_save" -- Save procedure for panel scale may not be defined
Diagnostic: invalid command name "Nviz_pos_save" -- Save procedure
for panel pos may not be defined
Diagnostic: invalid command name "Nviz_resize_save" -- Save procedure

for panel resize may not be defined
Diagnostic: invalid command name "Nviz_pick_save" -- Save procedure
for panel pick may not be defined
Diagnostic: invalid command name "Nviz_highlight_save" -- Save procedure for panel highlight may not be defined
Creating PBuffer Using GLX 1.3
Final Assembled Image will be 1 x 1
Writing Tile 1 of 1
Assembling Tiles
GLX -- destroy pbuffer
./donviz: line 2: 10088 Segmentation fault nviz elevation=elev48.new color=neon2.25
vector=states100,neondomains_states

Any ideas?
   
I get a segfault too: (32bit P4, 2gig RAM, Debian/stable)

Speafish with nviz window made to be large:

G63> nviz elevation.10m
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
r200_makeX86Normal3fv/197 CVAL 0 OFFSET 14 VAL 8260df0
r200_makeX86Normal3fv/198 CVAL 4 OFFSET 20 VAL 8260df4
r200_makeX86Normal3fv/199 CVAL 8 OFFSET 25 VAL 8260df8
r200_makeX86Normal3fv done
% recalculating normals...
Creating PBuffer Using GLX 1.3
Create PixMap Using GLX 1.1
Final Assembled Image will be 1935 x 2048
Writing Tile 1 of 9
Writing Tile 2 of 9
Writing Tile 3 of 9
MALLOC Failed
Segmentation fault

(hard to replicate)

The "MALLOC Failed" message comes from lib/ogsf/gsd_prim.c

/************************************************************************/
int gsd_writeView(unsigned char **pixbuf, unsigned int xsize,
                 unsigned int ysize)
{

   /* Malloc Buffer for image */
   *pixbuf = malloc(xsize * ysize * 4);

   if (!*pixbuf) {
       fprintf(stderr, "MALLOC Failed\n");
       return (0);
   }

   /* Read image buffer */
   glReadBuffer(GL_FRONT);

   /* Read Pixels into Buffer */
   glReadPixels(0, 0, xsize, ysize, GL_RGBA, GL_UNSIGNED_BYTE, *pixbuf);
   return (1);
}

/************************************************************************/

with window left at starting size: [note larger "Final Assembled Size"]

G63> nviz elevation.10m
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
r200_makeX86Normal3fv/197 CVAL 0 OFFSET 14 VAL 82613f8
r200_makeX86Normal3fv/198 CVAL 4 OFFSET 20 VAL 82613fc
r200_makeX86Normal3fv/199 CVAL 8 OFFSET 25 VAL 8261400
r200_makeX86Normal3fv done
% Creating PBuffer Using GLX 1.3
Create PixMap Using GLX 1.1
Final Assembled Image will be 2048 x 2048
Writing Tile 1 of 9
Writing Tile 2 of 9
Writing Tile 3 of 9
Writing Tile 4 of 9
Writing Tile 5 of 9
Writing Tile 6 of 9
Writing Tile 7 of 9
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
Destroy Pixmap and GLXPixmap

no segfault, NVIZ keeps running, these files are left behind:
(easy to replicate)

     0 Aug 29 17:24 spearNVhi2.ppm
3145745 Aug 29 17:24 spearNVhi2_1_1.ppm
3145745 Aug 29 17:24 spearNVhi2_1_2.ppm
    14 Aug 29 17:24 spearNVhi2_1_3.ppm
3145745 Aug 29 17:24 spearNVhi2_2_1.ppm
3145745 Aug 29 17:24 spearNVhi2_2_2.ppm
    14 Aug 29 17:24 spearNVhi2_2_3.ppm
    14 Aug 29 17:24 spearNVhi2_3_1.ppm
    14 Aug 29 17:24 spearNVhi2_3_2.ppm
    11 Aug 29 17:24 spearNVhi2_3_3.ppm
     0 Aug 29 17:24 spearNVhi2tmp1.ppm
     0 Aug 29 17:24 spearNVhi2tmp2.ppm
     0 Aug 29 17:24 spearNVhi2tmp3.ppm
     0 Aug 29 17:30 spearNVhi3.ppm.ppm

assembly of rows then full image fail as partials are not valid images
(14 byte ones). Images with data assemble, but contain random x-window
buffer weirdness: multi-virtual-desktop collages.

Summary: the partial tiles are broken.

I haven't tried it with just one workspace.

minimizing the NVIZ window (before clicking "ok" for the output
filename) gives the same result.

at the end of the bug report Glynn offers a reason, but I have no idea
where to go from there. Dumb debugging effort: I still get the broken
result if I comment out "Nset_cancel_func update" in
visualization/nviz/scripts/nviz2.2_script
and rebuild nviz.

?
Hamish

--
William W. Hargrove hnw@fire.esd.ornl.gov
Environmental Sciences Division (865) 241-2748
Oak Ridge National Laboratory (865) 574-4665 (fax)
P.O. Box 2008, M.S. 6407 http://research.esd.ornl.gov/~hnw
Oak Ridge, TN 37830-6407 FedEx/UPS, use "Bethel Valley Rd."

William Hargrove wrote:

Thanks, Hamish:

Notice that my error:

Creating PBuffer Using GLX 1.3
Final Assembled Image will be 1 x 1
Writing Tile 1 of 1
Assembling Tiles

is a little different from your error:

Create PixMap Using GLX 1.1
Final Assembled Image will be 1935 x 2048
Writing Tile 1 of 9
Writing Tile 2 of 9
Writing Tile 3 of 9
MALLOC Failed

Mine does not seem to read the PBuffer screen size correctly from GLX, while yours does.
Yours fails on the MALLOC, while mine just segfaults.

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.

--
Glynn Clements <glynn@gclements.plus.com>

Binbit S.A de C.V
Antoni Muntaner
C.E.O
http://www.binbit.com

Dear friends from GrassList we are located on Mexico and we are looking for
find several partners in other countries, interested in be partners with us,
and make business with SMS premium solutions... If somebody is interested..
Please send us a details request.

Best regards

Alfonso Ruiz
Binbit S.A de C.V
http://www.binbit.com

Glynn Clements 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

Setting those make no difference to this bug however:

#with GLX
G63 > nviz elevation.10m
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
r200_makeX86Normal3fv/197 CVAL 0 OFFSET 14 VAL 8260df0
r200_makeX86Normal3fv/198 CVAL 4 OFFSET 20 VAL 8260df4
r200_makeX86Normal3fv/199 CVAL 8 OFFSET 25 VAL 8260df8
r200_makeX86Normal3fv done
% Creating PBuffer Using GLX 1.3
Create PixMap Using GLX 1.1
Final Assembled Image will be 1929 x 2048
Writing Tile 1 of 9
Writing Tile 2 of 9
Writing Tile 3 of 9
Writing Tile 4 of 9
Writing Tile 5 of 9
Writing Tile 6 of 9
Writing Tile 7 of 9
Writing Tile 8 of 9
Writing Tile 9 of 9
Assembling Tiles
pnmcat: EOF / read error reading a row of pixels
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
Destroy Pixmap and GLXPixmap

#without GLX
G63> export GRASS_NO_GLX_PBUFFERS=TRUE
G63> export GRASS_NO_GLX_PIXMAPS=TRUE
G63> nviz elevation.10m
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
r200_makeX86Normal3fv/197 CVAL 0 OFFSET 14 VAL 8254e28
r200_makeX86Normal3fv/198 CVAL 4 OFFSET 20 VAL 8254e2c
r200_makeX86Normal3fv/199 CVAL 8 OFFSET 25 VAL 8254e30
r200_makeX86Normal3fv done
% Final Assembled Image will be 1904 x 2048
Writing Tile 1 of 9
Writing Tile 2 of 9
Writing Tile 3 of 9
Writing Tile 4 of 9
Writing Tile 5 of 9
Writing Tile 6 of 9
Writing Tile 7 of 9
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

      0 Aug 30 11:44 test7.ppm
     13 Aug 30 11:44 test7_3_1.ppm
     13 Aug 30 11:44 test7_3_2.ppm
     11 Aug 30 11:44 test7_3_3.ppm
5925905 Aug 30 11:44 test7tmp1.ppm
5925905 Aug 30 11:44 test7tmp2.ppm
      0 Aug 30 11:44 test7tmp3.ppm
      0 Aug 30 11:45 test8.ppm
2924560 Aug 30 11:45 test8_1_1.ppm
2924560 Aug 30 11:45 test8_1_2.ppm
     14 Aug 30 11:45 test8_1_3.ppm
2924560 Aug 30 11:45 test8_2_1.ppm
2924560 Aug 30 11:45 test8_2_2.ppm
     14 Aug 30 11:45 test8_2_3.ppm
     13 Aug 30 11:45 test8_3_1.ppm
     13 Aug 30 11:45 test8_3_2.ppm
     11 Aug 30 11:45 test8_3_3.ppm
      0 Aug 30 11:45 test8tmp1.ppm
      0 Aug 30 11:45 test8tmp2.ppm
      0 Aug 30 11:45 test8tmp3.ppm

Note partials are constructed in the output save dir, not $MAPSET/.tmp/.
I guess that's not a problem.

Hamish

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

--
Glynn Clements <glynn@gclements.plus.com>

Hamish, Glynn:

The 6.1.0 version of nviz dumps high res ppms perfectly after I comment out the off-screen section.

So the bug that remains in the subsequent versions must come from code changes introduced since then.

Bill H.

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

--
William W. Hargrove hnw@fire.esd.ornl.gov
Environmental Sciences Division (865) 241-2748
Oak Ridge National Laboratory (865) 574-4665 (fax)
P.O. Box 2008, M.S. 6407 http://research.esd.ornl.gov/~hnw
Oak Ridge, TN 37830-6407 FedEx/UPS, use "Bethel Valley Rd."

William Hargrove wrote:

The 6.1.0 version of nviz dumps high res ppms perfectly after I comment
out the off-screen section.

So the bug that remains in the subsequent versions must come from code
changes introduced since then.

The biggest change since 6.1 is that Togl has been updated to version
1.7.

Have you tried commenting out the following from nviz2.2_script (line
879)?

  # Set the cancel function for drawing
  Nset_cancel_func update

--
Glynn Clements <glynn@gclements.plus.com>