Re: Mac OSX and IDL6.3 [message #48771 is a reply to message #48762] |
Thu, 18 May 2006 10:17   |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
On Thu, 18 May 2006 12:19:48 -0400, Ben Tupper wrote:
> Karl Schultz wrote:
>> On Thu, 18 May 2006 10:17:51 -0400, Ben Tupper wrote:
>>
>>> Hello,
>>>
>>> I have installed IDL 6.3 onto a Mac OSX (10.4) G4 laptop. In the past
>>> (pre 6.3) I have used Terminal.app for the command line - which works
>>> great as long as X11 is running. Now I have bumped into a problem with
>>> where IDL 6.3 starts and runs from the Terminal.app command line, but
>>> when I invoke any graphics commands (PLOT, TV, etc.) IDL exits with a
>>> "bus error". Oddly, a HELP, !D,/STRUCT shows that X is the graphics
>>> device but HELP, /DEVICE results in the bus error problem. I *can*
>>> run IDL 6.3 just fine from the X11 command line - but that command line
>>> is quite limited compared to Terminal. I am holding off on installing
>>> other places until this gets resolved.
>>>
>>> The error is logged in /Library/Logs/idl.crash.log but it is all Greek
>>> (or is it Latin?) to me. Any thoughts on what might be going on?
>>>
>>> Thanks!
>>> Ben
>>
>> Ben,
>>
>> Did you report this to Tech Support?
>>
>> We had a similar report a few days ago.
>>
>> How do you set your DISPLAY variable in the Terminal application and what
>> value do you set it to?
>>
>> We're finding that certain values in the DISPLAY variable can cause this
>> problem. You might try setting DISPLAY to :0 to see if that helps.
>>
>> Let us know if that works.
>>
>> Karl
>>
>>
>>
> Hi Karl,
>
> I have not reported it yet to tech support.
No need to now. I suggested it because they may have already seen the
problem and would be able to give you an immediate solution. Just to get
ya back working faster :-).
>
> I set IDL_PREF_OBSOLETE_WARN = false and now I get the bus error without
> the warning. Well, that worked!
I had hoped you would have also set DISPLAY to :0 to avoid the crash.
We're mixing two issues here.
1) Set DISPLAY to :0 to avoid the crash when launching IDL from a
Terminal. (Or use the script Edd mentioned)
2) Set IDL_PREF_OBSOLETE_WARN to false to quiet warnings about overriding
X rdb settings with preference settings.
I think that you need to do them both to get where you want.
> I confess that I haven't ever actually set my display variable (at least
> not so I knew it). You have to understand that display means the
> monitor to a dope like me - where else would I display stuff? I'll give
> the solutions offered by Mark and Edd a whirl.
All X client programs, including IDL, need to know what X server to
connect to. If you open a Terminal on OS X and type:
xclock
whether an X server is running on your OS X workstation or not, you'll get:
Error: Can't open display:
The proper approach is to start the X server, and if you intend to start X
clients from the Terminal, you need to either set the DISPLAY env var to
the server's connection address, e.g., :0, or myhost:0, or specify the
connection address with a -display kwd parm, e.g., xclock -display
myhost:0.
It turns out that IDL 6.2 and prior somehow connected to the X server
running on your OS X desktop WITHOUT specifying the DISPLAY env var. At
this exact second, I don't know how this was accomplished. While
convenient, one can argue that the behavior is incorrect. IDL should
politely fail to create the window and let the user correct the problem.
(It is possible that IDL is simply using :0 in the absense of a DISPLAY
env setting and that's why it worked. But IDL's going out on a limb
here and making an assumption that you may not want)
OS X provides a rather unusual desktop environment, because the desktop is
not controlled by the X server, even when X11 is running. In a more
conventional X desktop, any xterm or other client started from a
desktop menu inherits the DISPLAY env var setting from the server
and so DISPLAY is set in the xterm environment. Any clients launched from
that xterm will show up on that server.
So, you can do it either way. You just need to be aware of the extra step
involved in Terminal to set DISPLAY the way you want it.
The problem was introduced as a side-effect of the new multi-monitor
functionality and it happens even if there is only one monitor. I'll
look into restoring the 6.2 behavior in the next release, but in the
meantime, you really need to set that DISPLAY variable. It is the right
thing to do from an X11 point of view.
Karl
|
|
|