[GRASS-dev] NVIZ problem on Intel Macs

Lorenzo Moretti is reporting that NVIZ locks up when it tries to start on the new Intel Macs. The error is listed below. Anyone have a suggestion? Has anyone else had a problem? Should this go to the bug list? We do want to run GRASS on the new Macs

Michael


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

------ Forwarded Message
From: Lorenzo Moretti lorenzo.moretti@bologna.enea.it
Date: Wed, 31 May 2006 13:59:23 +0200
To: Michael Barton michael.barton@asu.edu
Subject: Re: GRASS on Intel Macs

snip snip …

One user, Renato Henriques rhenriques@dct.uminho.pt with Mac Intel has tested grass61cvs and his report is:

Hi Lorenzo

After the modification all menus seem to be working fine.

Nviz shows the translating message in the terminal, rises until 99% and then
shows this message:


Mapset in Location
GRASS 6.1.cvs (Aroucateste) > Loading Data
Loading Data
translating colors
X Error of failed request: BadRequest (invalid request code or no such
operation)
Major opcode of failed request: 129 (Apple-DRI)
Minor opcode of failed request: 1 ()
Serial number of failed request: 192
Current serial number in output stream: 192


Then NVIZ just don’t start.
I hope this helps.
I’ve already used the very latest cvs version
Cheers

I don’t know why… (cvs is 060527). NVIZ start but after it stops… :frowning:

snip snip …


|| Lorenzo Moretti e-mail: lorenzo.moretti@bologna.enea.it
||/|/| ENEA prot/idr Web: http://wwwamb.bologna.enea.it/
|| | via Don Fiammelli, 2 FTP: ftp://ftpamb.bologna.enea.it/ (ris.)

ENEA - Ente Nazionale per le Nuove Tecnologie, l'Energia e l'Ambiente
ENEA - The Italian Agency for New Technologies, Energy and the Environment
__________________________________________________________________________

------ End of Forwarded Message

Michael Barton wrote:

Lorenzo Moretti is reporting that NVIZ locks up when it tries to start on
the new Intel Macs. The error is listed below. Anyone have a suggestion? Has
anyone else had a problem? Should this go to the bug list? We do want to run
GRASS on the new Macs

>> X Error of failed request: BadRequest (invalid request code or no such
>> operation)
>> Major opcode of failed request: 129 (Apple-DRI)
>> Minor opcode of failed request: 1 ()
>> Serial number of failed request: 192

This indicates the OpenGL library isn't compatible with the X server.

There isn't anything which we can do to fix this, although adding the
"-indirect" switch to the "togl" commands in nviz2.2_script might
eliminate the error at the expense of performance (indirect rendering
doesn't use hardware acceleration on the stock X.org servers).

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

Lorenzo,

See Glynn's response below. I'm wondering if perhaps you need to install a
new version of x11?? Or maybe get a new version of OpenGL?? to go with the
Intel Macs

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

------ Forwarded Message

From: Glynn Clements <glynn@gclements.plus.com>
Date: Wed, 31 May 2006 22:44:12 +0100
To: Michael Barton <michael.barton@asu.edu>
Cc: GRASS developers list <grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] NVIZ problem on Intel Macs

Michael Barton wrote:

Lorenzo Moretti is reporting that NVIZ locks up when it tries to start on
the new Intel Macs. The error is listed below. Anyone have a suggestion? Has
anyone else had a problem? Should this go to the bug list? We do want to run
GRASS on the new Macs

X Error of failed request: BadRequest (invalid request code or no such
operation)
  Major opcode of failed request: 129 (Apple-DRI)
  Minor opcode of failed request: 1 ()
  Serial number of failed request: 192

This indicates the OpenGL library isn't compatible with the X server.

There isn't anything which we can do to fix this, although adding the
"-indirect" switch to the "togl" commands in nviz2.2_script might
eliminate the error at the expense of performance (indirect rendering
doesn't use hardware acceleration on the stock X.org servers).

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

------ End of Forwarded Message

That shouldn't be necessary - an Intel Mac has Intel builds of X11 and OpenGL.

How did you build your Intel GRASS Lorenzo - on a PPC Mac with the Universal SDK? Or on an Intel Mac?

I tried my build of GRASS CVS 5-27 (built on Intel). NVIZ starts for me - I get the NVIZ Options/Output screen. But when I select a raster and try to Run it, then it crashes, with nothing in the output window except the raster and the X icon to remove it, like so (sometimes the Please Wait window briefly appears):

Command: nviz
Path: /usr/local/grass-6.1.cvs/bin/nviz
Parent: wish8.4 [612]

Version: ??? (???)

PID: 648
Thread: 0

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x5c637273

Thread 0 Crashed:
0 libX11.6.dylib 0x9bd35fa1 XQueryExtension + 24
1 libGL.1.dylib 0x9be2edab glXQueryExtension + 62
2 nviz 0x000115ab Togl_CreateWindow + 56
3 com.tcltk.tklibrary 0x9ad191ad Tk_MakeWindowExist + 120
4 nviz 0x00012663 Togl_Cmd + 1046
5 com.tcltk.tcllibrary 0x9ac181a3 TclInvokeStringCommand + 121
6 com.tcltk.tcllibrary 0x9ac1a915 TclEvalObjvInternal + 733
7 com.tcltk.tcllibrary 0x9ac3d666 TclExecuteByteCode + 3101
8 com.tcltk.tcllibrary 0x9ac4244e TclCompEvalObj + 279
9 com.tcltk.tcllibrary 0x9ac6926d TclObjInterpProc + 524
10 com.tcltk.tcllibrary 0x9ac1a915 TclEvalObjvInternal + 733
11 com.tcltk.tcllibrary 0x9ac1ac1c Tcl_EvalEx + 488
12 com.tcltk.tcllibrary 0x9ac5893a Tcl_FSEvalFile + 400
13 com.tcltk.tcllibrary 0x9ac1a915 TclEvalObjvInternal + 733
14 com.tcltk.tcllibrary 0x9ac1ac1c Tcl_EvalEx + 488
15 com.tcltk.tcllibrary 0x9ac1b03a Tcl_Eval + 42
16 nviz 0x0000ca44 Ninit + 199
17 nviz 0x00002570 NVIZ_AppInit + 210
18 com.tcltk.tklibrary 0x9acef2eb Tk_MainEx + 761
19 nviz 0x0001118a main + 97
20 nviz 0x00002446 _start + 228 (crt.c:272)
21 nviz 0x00002361 start + 41

Still looks like some OpenGL problem. And, I get the exact same crash on my PowerBook, except that NVIZ processes the data a little - this appears in the output winodw below the raster names:

Loading Data
Update elev null mask
Loading Data
building color table

and the raster names item has an additional printer icon.

This is the first time I've run NVIZ, so I'm not sure what to expect, but certainly not a crash.

On May 31, 2006, at 4:47 PM, Michael Barton wrote:

Lorenzo,

See Glynn's response below. I'm wondering if perhaps you need to install a
new version of x11?? Or maybe get a new version of OpenGL?? to go with the
Intel Macs

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

------ Forwarded Message

From: Glynn Clements <glynn@gclements.plus.com>
Date: Wed, 31 May 2006 22:44:12 +0100
To: Michael Barton <michael.barton@asu.edu>
Cc: GRASS developers list <grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] NVIZ problem on Intel Macs

Michael Barton wrote:

Lorenzo Moretti is reporting that NVIZ locks up when it tries to start on
the new Intel Macs. The error is listed below. Anyone have a suggestion? Has
anyone else had a problem? Should this go to the bug list? We do want to run
GRASS on the new Macs

X Error of failed request: BadRequest (invalid request code or no such
operation)
  Major opcode of failed request: 129 (Apple-DRI)
  Minor opcode of failed request: 1 ()
  Serial number of failed request: 192

This indicates the OpenGL library isn't compatible with the X server.

There isn't anything which we can do to fix this, although adding the
"-indirect" switch to the "togl" commands in nviz2.2_script might
eliminate the error at the expense of performance (indirect rendering
doesn't use hardware acceleration on the stock X.org servers).

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

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"Those people who most want to rule people are, ipso-facto, those least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy

Michael Barton wrote:

See Glynn's response below. I'm wondering if perhaps you need to install a
new version of x11?? Or maybe get a new version of OpenGL?? to go with the
Intel Macs

If anything, you might need to use an older version.

Apparently, GLX support on MacOSX has been broken since X11R6.9:

http://lists.freedesktop.org/archives/xorg/2006-May/015716.html

"Broken" in the sense of compile errors in the DRI code, so presumably
any precompiled X servers for OSX which are newer than that will have
DRI support disabled.

Also, using:

  export LIBGL_ALWAYS_INDIRECT=1

may eliminate the error.

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

Nviz shows the translating message in the terminal, rises until 99%
and then shows this message:

FYI never getting to 100% probably is just a missing G_percent() call
after the loop is done. Several modules fail to do this (r.terraflow
e.g.).

Hamish

On Wed, 31 May 2006 20:04:43 -0500
William Kyngesburye <woklist@kyngchaos.com> wrote:

I tried my build of GRASS CVS 5-27 (built on Intel). NVIZ starts for
me - I get the NVIZ Options/Output screen. But when I select a
raster and try to Run it, then it crashes, with nothing in the output
window except the raster and the X icon to remove it, like so
(sometimes the Please Wait window briefly appears):

NVIZ debug tip:

at the start of nviz2.2_script, change the DEBUG setting to:

set DEBUG 1

You'll get more "mile-posts" that way.

Hamish

Interesting - NVIZ on my MacBook got farther this time:

Loading Data

Update elev null mask
Loading Data
building color table
Adding panels from /usr/local/grass-6.1.cvs/etc/nviz2.2/scripts
Nv_(panels)
Build toplevel window
toplevel made

Even after turning debug back off, I got the same progress as on the PowerBook. Must have been the dataset I was using on the MacBook the first time (I used the same Spearfish demo this time).

On Jun 1, 2006, at 12:26 AM, Hamish wrote:

On Wed, 31 May 2006 20:04:43 -0500
William Kyngesburye <woklist@kyngchaos.com> wrote:

I tried my build of GRASS CVS 5-27 (built on Intel). NVIZ starts for
me - I get the NVIZ Options/Output screen. But when I select a
raster and try to Run it, then it crashes, with nothing in the output
window except the raster and the X icon to remove it, like so
(sometimes the Please Wait window briefly appears):

NVIZ debug tip:

at the start of nviz2.2_script, change the DEBUG setting to:

set DEBUG 1

You'll get more "mile-posts" that way.

Hamish

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

[Trillian] What are you supposed to do WITH a maniacally depressed robot?

[Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy