comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: histogram crashes (example code)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: histogram crashes (example code) [message #22527] Thu, 16 November 2000 00:00
Stein Vidar Hagfors H[1] is currently offline  Stein Vidar Hagfors H[1]
Messages: 56
Registered: February 2000
Member
"R.G.S." <rgs1967@hotmail.com> writes:

> Here is a main level code that does crash IDL 5.3.1 on WinNT4 SP5
> So if anyone cares to see if it runs on other platforms, please
> let me know how it works out.

Crashes here, too:

IDL> print,!version
{ sparc sunos unix 5.3 Nov 11 1999}

(Or rather, it crashes when you try to do anything *after* executing
that histogram call).

By the way, talking to Bill Thompson I just learned that it's now
possible to say:

IDL> a=fltarr(1,1,1,1,1,1,1,2)
IDL> help,a[0,0,0,0,0,0,0,0]

which used to give some kind of syntax error in previous IDL versions
(4.x, at least) whereas it would work with 7 subscripts, but not 8.
However, look at this:

IDL> help,[0,0]
<Expression> INT = Array[2]
IDL> help,[[0],[0]]
<Expression> INT = Array[1, 2]
IDL> help,[[[0]],[[0]]]
<Expression> INT = Array[1, 1, 2]
IDL> help,[[[[0]]],[[[0]]]]

help,[[[[0]]],[[[0]]]]
^
% Only eight levels of variable concatenation are allowed.

Obviously, they forgot to fix all aspects of the parser...

------------------------------------------------------------ --------------
Stein Vidar Hagfors Haugan
ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO

NASA Goddard Space Flight Center, Email: shaugan@esa.nascom.nasa.gov
Mail Code 682.3, Bld. 26, Room G-1, Tel.: 1-301-286-9028/240-354-6066
Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
------------------------------------------------------------ --------------
Re: histogram crashes (example code) [message #22529 is a reply to message #22527] Thu, 16 November 2000 00:00 Go to previous message
mole6e23 is currently offline  mole6e23
Messages: 31
Registered: December 1998
Member
> Here is a main level code that does crash IDL 5.3.1 on WinNT4 SP5
> So if anyone cares to see if it runs on other platforms, please
> let me know how it works out.

I went back and tried the code on Alpha IDL 5.3 and 5.1. In both cases,
the same "crash on exit" phenomenon as I saw on the Mac took place (as per
my previous post). I was actually able to print the results, etc, and do
other commands, but when I typed "exit", IDL exited with a segmentation
fault. Odd, huh?

Todd
Re: histogram crashes (example code) [message #22530 is a reply to message #22527] Thu, 16 November 2000 00:00 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
"R.G.S." wrote:
>
> Here is a main level code that does crash IDL 5.3.1 on WinNT4 SP5
> So if anyone cares to see if it runs on other platforms, please
> let me know how it works out.
>
> Cheers,
> bob
>
> ; An example of histogram error crashes (kills IDL 5.3.1, Winnt)
>
> ;create fake data
> nscan = 1624
> nwide = 76
> lat = randomn(seed,nwide,nscan)*50
>
> ;create NANs in data
> ind = randomu(seed,43293L)
> ind = ind(UNIQ(ind, SORT(ind)))
> ind = ind*n_elements(lat)
> lat(ind) = !values.f_nan
>
> ; create binning ranges
> latrange = [-70,-20]
> deltalat = 4
>
> ;offending histogram call
> hlat = histogram(lat(*),binsize = float(deltalat), min =float(latrange(0)),$
> max = float(latrange(1)),REVERSE_INDICES = R,omax = omax,omin=omin,/nan)
>
> end

Ran just fine on my machine (IDL 5.4, linux RH6.1). I don't know if the results were any
good or not but nothing untoward happened.

IDL> help
% At $MAIN$
DELTALAT INT = 4
HLAT LONG = Array[13]
IND FLOAT = Array[43255]
LAT FLOAT = Array[76, 1624]
LATRANGE INT = Array[2]
NSCAN INT = 1624
NWIDE INT = 76
OMAX FLOAT = -20.0000
OMIN FLOAT = -70.0000
R LONG = Array[22970]
SEED LONG = Array[36]
Compiled Procedures:
$MAIN$

Compiled Functions:
UNIQ



paulv

--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.207, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746
Re: histogram crashes (example code) [message #22531 is a reply to message #22527] Thu, 16 November 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
R.G.S. (rgs1967@hotmail.com) writes:

> Here is a main level code that does crash IDL 5.3.1 on WinNT4 SP5
> So if anyone cares to see if it runs on other platforms, please
> let me know how it works out.

Oh, oh. Works great in IDL 5.4 on WinNT4, SP 6. :-)

Cheers,

David

P.S. It did crash IDL 5.3.1 on same platform.

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: histogram crashes (example code) [message #22532 is a reply to message #22527] Thu, 16 November 2000 00:00 Go to previous message
mole6e23 is currently offline  mole6e23
Messages: 31
Registered: December 1998
Member
The code did not crash IDL 5.4 on Alpha, but DID crash IDL 5.03 on Mac
(crashed hard - for those who know, the debugger said it ended up in the
infamous (but non-existent, according to apple) "Bowels of the memory
manager"), although oddly enough, it didn't crash instantly. I ran the
code and it was OK...my next command was 'exit', and that's when it went
down.

Todd

> Here is a main level code that does crash IDL 5.3.1 on WinNT4 SP5
> So if anyone cares to see if it runs on other platforms, please
> let me know how it works out.
Re: histogram crashes (example code) [message #22533 is a reply to message #22527] Thu, 16 November 2000 00:00 Go to previous message
R.G.S. is currently offline  R.G.S.
Messages: 46
Registered: September 2000
Member
Here is a main level code that does crash IDL 5.3.1 on WinNT4 SP5
So if anyone cares to see if it runs on other platforms, please
let me know how it works out.

Cheers,
bob




; An example of histogram error crashes (kills IDL 5.3.1, Winnt)

;create fake data
nscan = 1624
nwide = 76
lat = randomn(seed,nwide,nscan)*50

;create NANs in data
ind = randomu(seed,43293L)
ind = ind(UNIQ(ind, SORT(ind)))
ind = ind*n_elements(lat)
lat(ind) = !values.f_nan

; create binning ranges
latrange = [-70,-20]
deltalat = 4


;offending histogram call
hlat = histogram(lat(*),binsize = float(deltalat), min =float(latrange(0)),$
max = float(latrange(1)),REVERSE_INDICES = R,omax = omax,omin=omin,/nan)


end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Active X with Excel VBA
Next Topic: Re: IDL Shapiro-Wilks test ?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:40:05 PDT 2025

Total time taken to generate the page: 0.00671 seconds