Opened 6 years ago

Closed 16 months ago

#2114 closed defect (fixed)

m.nviz.image does not work on Windows

Reported by: annakrat Owned by: grass-dev@…
Priority: normal Milestone: 7.4.2
Component: LibOpenGL Version: svn-trunk
Keywords: m.nviz.image Cc:
CPU: Unspecified Platform: All

Description

Module m.nviz.image does not create valid image file on Windows. With tif format, it crashes and with ppm it creates a file only with header. So offscreen rendering doesn't seem to work. Has m.nviz.image ever worked on Windows?

Change History (19)

comment:1 in reply to:  description ; Changed 6 years ago by hamish

Replying to annakrat:

Module m.nviz.image does not create valid image file on Windows. With tif format, it crashes and with ppm it creates a file only with header. So offscreen rendering doesn't seem to work.

was the wingrass version in question built with libtiff support?

see lib/ogsf/gsd_img_tif.c, nothing too complicated in there. gsd_img_ppm.c is even simpler. If header part is ok but writing the rest of the ppm image isn't, perhaps gsd_getimage() is returning bad values for xsize and ysize?

Has m.nviz.image ever worked on Windows?

I don't know if anyone ever tested that; does saving as tiff or ppm from the G6 tcl/tk NVIZ on wingrass work?

Hamish

comment:2 in reply to:  1 ; Changed 6 years ago by annakrat

Replying to hamish:

Replying to annakrat:

Module m.nviz.image does not create valid image file on Windows. With tif format, it crashes and with ppm it creates a file only with header. So offscreen rendering doesn't seem to work.

was the wingrass version in question built with libtiff support?

see lib/ogsf/gsd_img_tif.c, nothing too complicated in there. gsd_img_ppm.c is even simpler. If header part is ok but writing the rest of the ppm image isn't, perhaps gsd_getimage() is returning bad values for xsize and ysize?

Has m.nviz.image ever worked on Windows?

I don't know if anyone ever tested that; does saving as tiff or ppm from the G6 tcl/tk NVIZ on wingrass work?

It worked I guess but I am talking here about off-screen rendering which is different than just exporting image with opened window with (wx)nviz.

comment:3 in reply to:  2 Changed 6 years ago by hamish

Replying to annakrat:

Replying to hamish:

does saving as tiff or ppm from the G6 tcl/tk NVIZ on wingrass work?

It worked I guess but I am talking here about off-screen rendering which is different than just exporting image with opened window with (wx)nviz.

I asked because G6's tcl/tk NVIZ and m.nviz.image both use libogsf's GS_write_ppm() which calls gsd_getimage() to get the image size. I was trying to narrow down if the gsd_getimage() function was where the problem lies.

Hamish

comment:4 Changed 4 years ago by martinl

Milestone: 7.0.07.0.5

comment:5 Changed 3 years ago by martinl

Still an issue?

comment:6 in reply to:  5 Changed 3 years ago by annakrat

Milestone: 7.0.57.3.0

Replying to martinl:

Still an issue?

Yes.

comment:7 Changed 3 years ago by martinl

Milestone: 7.3.07.4.0

Milestone renamed

comment:8 Changed 3 years ago by wenzeslaus

Platform: MSWindows 7All

This now seems to be an issue on Linux as well. On Ubuntu 16.04:

> m.nviz.image elevation_map=elevation output=test format=ppm size=640,480
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  24
  Current serial number in output stream:  29

Changing platform to all. New ticket more appropriate? New implementation seems to be necessary.

comment:9 Changed 22 months ago by neteler

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:10 Changed 17 months ago by neteler

Milestone: 7.4.17.4.2

comment:11 in reply to:  8 Changed 17 months ago by hcho

This specific issue on Linux is fixed by r72939.

Replying to wenzeslaus:

This now seems to be an issue on Linux as well. On Ubuntu 16.04:

> m.nviz.image elevation_map=elevation output=test format=ppm size=640,480
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  24
  Current serial number in output stream:  29

Changing platform to all. New ticket more appropriate? New implementation seems to be necessary.

comment:13 Changed 16 months ago by hcho

Resolution: fixed
Status: newclosed

In 72997:

nviz: offscreen rendering for Windows (Fix #2114)

comment:14 Changed 16 months ago by hcho

Resolution: fixed
Status: closedreopened

Please test r72997 on Windows. Works for me.

comment:15 in reply to:  14 ; Changed 16 months ago by hellik

Replying to hcho:

Please test r72997 on Windows. Works for me.

see #3600#comment:77

seems to work now

Last edited 16 months ago by hellik (previous) (diff)

comment:16 in reply to:  15 Changed 16 months ago by hcho

Replying to hellik:

Replying to hcho:

Please test r72997 on Windows. Works for me.

see #3600#comment:77

seems to work now

Great! I think we can close this ticket. Hmm.. the platform is All? Works on Linux and Windows.

comment:17 Changed 16 months ago by hcho

Resolution: fixed
Status: reopenedclosed

In 73006:

nviz, ogsf: Use framebuffer objects for off-screen GL rendering; Use Core OpenGL (CGL) for the MacOS instead of deprecated 32-bit only AGL (Fix #3600, #2114, #3606)

comment:18 Changed 16 months ago by martinl

Resolution: fixed
Status: closedreopened

Milestone set to 7.4.2. Re-opening since backport has not been done.

comment:19 Changed 16 months ago by hcho

Resolution: fixed
Status: reopenedclosed

Backported to 7.2 & 7.4.

Note: See TracTickets for help on using tickets.