Re: IDL 6.3 Intel in Mac + IDLWAVE + graphics = CRASH [message #50094] |
Thu, 14 September 2006 03:21  |
Edd Edmondson
Messages: 50 Registered: January 2003
|
Member |
|
|
jgc <javier_corripio@yahoo.fr> wrote:
>> Your solution is to do whatever it is you need to do to get the DISPLAY
>> variable set in the shell environment in which IDLWAVE is running. My
>> wild guess is that you are starting emacs/IDLWAVE from either a Terminal
>> app or some desktop shortcut and you're not getting the DISPLAY variable
>> set.
>>
>> Karl
> That makes sense and it was so simple!
> It works beautifully now
> alias Emacs='/Applications/Emacs.app/Contents/MacOS/Emacs &'
> and calling it from the xterminal.
Bit off topic, but you may like to replace that with 'open -a
Emacs'. Sort of 'more proper', quicker to type, and will still open
Emacs if you decided for some reason to move it to another location.
--
Edd
|
|
|
|
Re: IDL 6.3 Intel in Mac + IDLWAVE + graphics = CRASH [message #50112 is a reply to message #50107] |
Wed, 13 September 2006 08:09   |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
On Sun, 10 Sep 2006 23:56:33 -0700, jgc wrote:
> Dear All,
>
> IDL 6.3 Intel native is running fine when called from the Xterminal or
> from idlde. However, when run from IDLWAVE it crashes (better
> implodes and collapses) whenever a graphic command is issued. It used
> to be fine with IDL 6.2.
>
> I have tried setting DISPLAY equal to both ":0.0" an ":0", in .bashrc
> and in .MacOSX/environment.plist. Curiosly, if Xwindows is not running
> it looks for it appropriately,
> % PLOT: Unable to connect to X Windows display: :0.0
> % PLOT: Unable to open X Windows display.
> Is your DISPLAY environment variable set correctly?
>
> but when it is running it collapses on every graphic command. Then
> when IDL is recalled, it displays a bus error from the previous
> session.
>
> If I enquire the system from the xterminal within IDL I get
> IDL> $env
> TERM=xterm
> DISPLAY=:0.0
>
> from IDWAVE, first, I need to call twice the idl shell (C-c C-s is
> undefined on first call), then the environment variables are different:
> IDL> $env
> TERM=dumb
> there is no DISPLAY variable
>
> Any help in solving this is much appreciated.
>
> all the best,
> Javier
>
>
> IDL 6.3 for Mac OS X for Intel, last release (2 days ago)
> MacBook Pro Intel duo OS X 10.4.7
> GNU Emacs 22.0.50.1
> IDLWAVE 6.0
There is a known bug, introduced in 6.3 and fixed in the Next Release,
that will cause IDL to crash on OS X if the DISPLAY variable is not set.
In most Unix/X environments, IDL is usually launched from a shell running
under the control of an X client that has the DISPLAY variable set. So,
this is not usually an issue. On OS X however, some people launch IDL
from the Terminal app, rather than an xterm, and then run into this
problem.
Your solution is to do whatever it is you need to do to get the DISPLAY
variable set in the shell environment in which IDLWAVE is running. My
wild guess is that you are starting emacs/IDLWAVE from either a Terminal
app or some desktop shortcut and you're not getting the DISPLAY variable
set.
Karl
|
|
|
Re: IDL 6.3 Intel in Mac + IDLWAVE + graphics = CRASH [message #50288 is a reply to message #50107] |
Tue, 19 September 2006 10:26  |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Wed, 13 Sep 2006 12:08:24 -0700, jgc wrote:
>
>> Your solution is to do whatever it is you need to do to get the DISPLAY
>> variable set in the shell environment in which IDLWAVE is running. My
>> wild guess is that you are starting emacs/IDLWAVE from either a Terminal
>> app or some desktop shortcut and you're not getting the DISPLAY variable
>> set.
>>
>> Karl
>
> That makes sense and it was so simple!
>
> It works beautifully now
> alias Emacs='/Applications/Emacs.app/Contents/MacOS/Emacs &'
> and calling it from the xterminal.
>
> Many, many thanks and apologies for being so thick.
The other option for setting global system-wide environment variables,
is to use environment.plist, which would also fix this. This is a
"plist" XML type file, but a simple way to set DISPLAY there is like
this:
% mkdir ~/.MacOSX
% defaults write ~/.MacOSX/environment DISPLAY :0
Now *all* processes will have this in their environment, no matter how
they were opened.
As a side note, if you use fast user switching, :0 may not always be
correct here (since each X11 process increments it, e.g. :1 for the second
user to run X11 simultaneously). The following trick should work in that
case, especially if you have X11 start up automatically on login:
http://lists.sourceforge.jp/mailman/archives/macemacsjp-engl ish/2006-June/000586.html
In IDL, you should check what environment variables are set with:
IDL> print,getenv('DISPLAY')
rather than $env, since that first starts a shell (which may define
environment through configuration files which the IDL process itself does
not share).
Another simple fix (for IDL only) would be to put:
setenv,'DISPLAY=:0'
in your IDL startup file.
BTW, this issue only applies to "Emacs.app" carbon app on OSX, which is
run directly by the OS. In that case, IDLWAVE and the IDL process
are run in an environment which does not know about X11, which of
course IDL needs. Those of you who (like me) still use Emacs under X11
should be fine.
JD
|
|
|