Opened 11 years ago

Closed 6 years 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)

in reply to:  description ; comment:1 by hamish, 11 years ago

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

in reply to:  1 ; comment:2 by annakrat, 11 years ago

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.

in reply to:  2 comment:3 by hamish, 11 years ago

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 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:5 by martinl, 8 years ago

Still an issue?

in reply to:  5 comment:6 by annakrat, 8 years ago

Milestone: 7.0.57.3.0

Replying to martinl:

Still an issue?

Yes.

comment:7 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:8 by wenzeslaus, 8 years ago

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 by neteler, 7 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:10 by neteler, 6 years ago

Milestone: 7.4.17.4.2

in reply to:  8 comment:11 by hcho, 6 years ago

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 by hcho, 6 years ago

Resolution: fixed
Status: newclosed

In 72997:

nviz: offscreen rendering for Windows (Fix #2114)

comment:14 by hcho, 6 years ago

Resolution: fixed
Status: closedreopened

Please test r72997 on Windows. Works for me.

in reply to:  14 ; comment:15 by hellik, 6 years ago

Replying to hcho:

Please test r72997 on Windows. Works for me.

see #3600#comment:77

seems to work now

Last edited 6 years ago by hellik (previous) (diff)

in reply to:  15 comment:16 by hcho, 6 years ago

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 by hcho, 6 years ago

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 by martinl, 6 years ago

Resolution: fixed
Status: closedreopened

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

comment:19 by hcho, 6 years ago

Resolution: fixed
Status: reopenedclosed

Backported to 7.2 & 7.4.

Note: See TracTickets for help on using tickets.