[GRASS-dev] 64bit image issues (WAS: Re: grass-dev Digest, Vol 2, Issue 19)

Brad Douglas rez at touchofmadness.com
Mon Jun 12 03:41:14 EDT 2006


On Mon, 2006-06-12 at 06:34 +0100, Glynn Clements wrote:
> Brad Douglas wrote:
> > On Sun, 2006-06-11 at 13:19 +0100, Glynn Clements wrote:
> > > Glynn Clements wrote:
> > > 
> > > > > Export to image formats are still broken (some segv(), some write bad
> > > > > data).  Animation via ffmpeg 'works', but again, writes bad data.
> > > > > The 64bit data corruption and segv() issues needs to be fixed before 6.2
> > > > > goes gold.  I'll see if I can't hunt down and correct the segv()s this
> > > > > weekend.
> > > > 
> > > > I'm looking into the OGSF image handling stuff right now.
> > > 
> > > I've committed some changes which should fix the 64-bit issues in the
> > > image dumping code.
> > 
> > Thank you!  I now have complete images, not quadrants.  High resolution
> > PPM still crashes, tho:
> > #0  0x00002aaab2612d6e in _mesa_GetIntegerv ()
> >    from /usr/lib64/dri/radeon_dri.so
> > #1  0x00002aaaaaad762d in gsd_getViewport (tmp=0xffc4b910,
> > num=0xffc4b900)
> >     at gsd_prim.c:750
> > #2  0x00002aaaaaac7276 in GS_zoom_setup (a=0x7fffffc4c64c,
> > b=0x7fffffc4c648,
> >     c=0x7fffffc4c644, d=0x7fffffc4c640, maxx=0x7fffffc4c63c,
> >     maxy=0x7fffffc4c638) at GS2.c:2395
> 
> Try the attached patch.
> 
> plain text document attachment (GS_zoom_setup.diff), "GS_zoom_setup
> 64-bit patch"
> Index: lib/ogsf/GS2.c
> ===================================================================
> RCS file: /grassrepository/grass6/lib/ogsf/GS2.c,v
> retrieving revision 1.8
> diff -u -r1.8 GS2.c
> --- lib/ogsf/GS2.c	31 Mar 2006 20:51:25 -0000	1.8
> +++ lib/ogsf/GS2.c	12 Jun 2006 05:32:24 -0000
> @@ -37,7 +37,7 @@
>   */
>  #define NVIZ_HACK 1
>  
> -int gsd_getViewport(GLint, GLint);
> +int gsd_getViewport(GLint *, GLint *);
>  
>  static int Surf_ID[MAX_SURFS];
>  static int Next_surf = 0;
> @@ -2392,7 +2392,7 @@
>  {
>      GLint tmp[4];
>      GLint num[2];
> -    gsd_getViewport(&tmp, &num);
> +    gsd_getViewport(tmp, num);
>      *a = tmp[0];
>      *b = tmp[1];
>      *c = tmp[2];

Although, I still cannot create high resolution PPM images, this is the
right thing to do (no longer segv()s and I added some temp debug code to
check the validity of the returned values).  Please commit.

FYI, it is exiting with status 01 and I can only assume the error has
nothing to do with GRASS (looks like the xorg GLX module needs work?):

% Creating PBuffer Using GLX 1.3
X Error of failed request:  GLXUnsupportedPrivateRequest
  Major opcode of failed request:  143 (GLX)
  Minor opcode of failed request:  16 (X_GLXVendorPrivate)
  Serial number of failed request:  21
  Current serial number in output stream:  22


-- 
Brad Douglas <rez touchofmadness com>                      KB8UYR
Address: 37.493,-121.924 / WGS84    National Map Corps #TNMC-3785




More information about the grass-dev mailing list