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

Home » Public Forums » archive » Re: Readu, Writeu Causing Segmentation Fault
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Readu, Writeu Causing Segmentation Fault [message #68002 is a reply to message #67870] Fri, 11 September 2009 01:51 Go to previous messageGo to previous message
Wout De Nolf is currently offline  Wout De Nolf
Messages: 194
Registered: October 2008
Senior Member
On Wed, 9 Sep 2009 14:41:58 -0700 (PDT), "A.R." <alromens@gmail.com>
wrote:

> In response to Wox (post below) I can also writeu that file, but for
> some reason when I have a large number of actual ELEMENTS in the
> volume (apparently not file size) is when I get the segmentation
> fault. And the magic number seems to be ~2,300,000,000 (~2^32) . . .
> coincidence? Doubtful. But how do I fix it?

data=make_array(4600000000LL,value=1b)
openw,lun,'c:\test.dat',/get_lun
writeu,lun,data
free_lun,lun

The memory allocation is fine (~4GB in memory), however the filesize
obtained is: 305032704 bytes = 4600000000LL-2LL^32 =
long(4600000000LL)

So there is indeed a 32bit limitation on the number of elements
written by writeu even on a 64bit system (IDL 7.1 doesn't crash
however).

Btw, reading the file doesn't crash either, it just reads the
305032704 available bytes and puts them in the 305032704 first
elements, no crashing or error messages:

data=make_array(4600000000LL,value=0b)
openr,lun,'c:\test.dat',/get_lun
readu,lun,data
free_lun,lun
print,total(data) eq long(4600000000LL)

I'd say: send ITTVIS a bug report.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stacking Map Projections for 3D depiction
Next Topic: Re: referencing structure arrays

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

Current Time: Fri Oct 10 09:03:38 PDT 2025

Total time taken to generate the page: 1.20051 seconds