Display related crash on Mac

This is a discussion on Display related crash on Mac within the Idl-pvwave forums in Programming Languages category; I am running IDL 7.0 on a MacOS X 10.5.4 (2.8 GHz Intel Core 2 Duo) through an X11 terminal (xterm). I've been trying to use some code that involves interacting with the display (mouse clicks, drawing a box to define an area, etc). After about 5-10 minutes, it always crashes and quits not only IDL but completely out of X11. I restart X11, type IDL at the prompt and get the following error: % DEVICE: Unable to connect to X Windows display :0 % DEVICE: Unable to open X Windows display. Is your DISPLAY environment variable set correctly? % ...

Go Back   Application Development Forum > Programming Languages > Idl-pvwave

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-28-2008, 09:17 PM
cosmic.thespian
Guest
 
Default Display related crash on Mac

I am running IDL 7.0 on a MacOS X 10.5.4 (2.8 GHz Intel Core 2 Duo)
through an X11 terminal (xterm).

I've been trying to use some code that involves interacting with the
display (mouse clicks, drawing a box to define an area, etc). After
about 5-10 minutes, it always crashes and quits not only IDL but
completely out of X11. I restart X11, type IDL at the prompt and get
the following error:

% DEVICE: Unable to connect to X Windows display :0
% DEVICE: Unable to open X Windows display.
Is your DISPLAY environment variable set
correctly?
% Execution halted at: $MAIN$

Followed by the IDL prompt. Quitting X11 and restarting doesn't
help. The only thing that seems to fix the problem at the moment is
restarting the computer.

I have the display set in my .cshrc file as follows:
setenv DISPLAY ":0"

I only ever see this problem *after* one of these crashes so something
somewhere is getting corrupted, but I haven't a clue what. Does
anyone have any insight as to what might be going on?
Reply With Quote
  #2  
Old 08-28-2008, 09:32 PM
cosmic.thespian
Guest
 
Default Re: Display related crash on Mac

Just to follow up, I found the location in the code where it is most
likely crashing and I've included the snippet below. I'm always doing
the same thing when it crashes: releasing the mouse button after
clicking and dragging to define a box around points on a plot which
need to be flagged. I release the mouse button, nothing happens for a
few seconds, then the Mac spinning frisbee appears for a few more
seconds, and then everything crashes, as described above.


good = (m_f gt 0)
print, 'Draw box containing outliers to reject'
done = 0
repeat begin
igd = where(good eq 1)
plot, m_p(igd), resid(igd), /ps, xsty=3, ysty=3, chars=1.5 $
, xtit='Pixel Number', ytit='Residual (pixels)'
cursor, cx1, cy1, wait=3
if cx1 lt min(!x.crange) or cx1 gt max(!x.crange) then done
= 1
if cy1 lt min(!y.crange) or cy1 gt max(!y.crange) then done
= 1
if done eq 0 then begin
cx2 = cx1
cy2 = cy1
repeat begin
cx2o = cx2
cy2o = cy2
cursor, cx2, cy2, wait=2
oplot, [cx1, cx1, cx2o, cx2o, cx1] $
, [cy1, cy2o, cy2o, cy1, cy1], co=!p.background
oplot, m_p(igd), resid(igd), /ps
oplot, [cx1, cx1, cx2, cx2, cx1] $
, [cy1, cy2, cy2, cy1, cy1], co=!p.color
cursor, junk, junk, /nowait
endrep until !err eq 0
ibad = where(m_p gt (cx1<cx2) and m_p lt (cx1>cx2) $
and resid gt (cy1<cy2) and resid lt (cy1>cy2),
nbad)
if nbad gt 0 then good(ibad) = 0
endif
endrep until done eq 1
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 03:19 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.