Re: objects, crashes, and negative memory oh my [message #51643 is a reply to message #51640] |
Fri, 01 December 2006 10:41   |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
Pete Warner wrote:
> Here's a program that crashes me every time. The key part seems to be
> the "file_search" followed by the "and" statement. Take either out and
> it doesn't cause me trouble. I'm creating the .txt file because I don't
> know what to search for on your computers, and file_search needs to
> find something. I run between 1 and 10 loops before IDL dies on my
> computer. Tested on 6.1 and 6.3.
even a 1 line
IDL> a = file_search() & print, 'test ' and a
makes IDL crash...
IDL> print, !version
{ x86 Win32 Windows Microsoft Windows 6.3 Mar 23 2006 32 64}
Jean
>
> pro testfailure
>
> a = 'test_file.txt'
> openw, 1, a
> close, 1
> free_lun, 1
>
> key = 'b'
> count = 0
> print, 'Starting Memory: ', memory(/current)
> while (key ne 'a') do begin
> count++
> b = file_search(a)
> print, 'anystring' and b
> print, 'Memory after iteration ', count, ', ', memory(/current)
> print, 'Hit "a" to exit, anykey to continue'
> key = get_kbrd(1)
> endwhile
> print, 'ending'
>
> end
>
> On Dec 1, 9:42 am, Paolo Grigis <pgri...@astro.phys.ethz.ch> wrote:
>
>> Just to be sure there's no hardware problem, you might
>> want to do a tough memory test (e.g. memtest86) to see
>> if the physical RAM is ok...
>>
>> Ciao,
>> Paolo
>>
>> Pete Warner wrote:
>>
>>> Some more information:
>>> I'm running 32 bit IDL 6.3 on Windows 2000 with only 512MB of non
>>> imaginary RAM. The file I'm reading and storing data from with this
>>> object is only about 2MB, and the Windows Task Manager does not show
>>> idlde.exe using unusual amounts of memory.
>>
>>> If I step through my obj::destroy routine IDL locks up only after the
>>> final END statement or if I try to use /RETALL before the end of the
>>> cleanup routine. Once it is locked up I must use Task Manager to end
>>> idlde.exe.
>>
>>> If instead of returning to $MAIN$ I type .reset I get 1 to 3 "The
>>> instruction at bla referenced memory at bla. The memory could not be
>>> read/written. Click on OK to terminate the program" messages and I'm
>>> back to the desktop.
>>
>>> I'll find out what tech support can do for me here.
>>
>>> On Dec 1, 8:27 am, "Pete Warner" <warner.p...@yahoo.com> wrote:
>>
>>>> I guess I've been thinking about asking for an upgrade. Maybe I already
>>>> got it. Anybody know if Windows Vista can address 16 exabytes or will I
>>>> need Linux for that?
>>
>>>> On Dec 1, 2:53 am, Paolo Grigis <pgri...@astro.phys.ethz.ch> wrote:
>>
>>>> >Paolo Grigis wrote:
>>
>>>> >>Pete Warner wrote:
>>
>>>> >>>Hopefully one day I'll join the crowd of you helpful people who answer
>>>> >>>questions instead of coming up with them, but that day is not today.
>>
>>>> >>>I've got an object that should hold and organize a large number of
>>>> >>>arrays and pointers and arrays of pointers and then clean them up when
>>>> >>>I'm done. I know I have enough memory for the data in question because
>>>> >>>I can load it without using pointers. I want the objects and pointers
>>>> >>>for flexibility and to make the overall program easier to work with.
>>
>>>> >>>The problem is that I'm crashing IDL. I create the object, and then
>>>> >>>destroy it to check for leaks. Using help, /heap_variables I show 0
>>>> >>>pointers and objects. Then if I create and destroy it again IDL locks
>>>> >>>up or crashes to desktop with some memory errors. I figured there must
>>>> >>>be crazy leaking going on but I can't find it.
>>
>>>> >>>1. Restart computer
>>>> >>>2. Load IDL
>>>> >>>3. Load project with objects
>>>> >>>4. Compile project
>>>> >>>5. IDL> print, memory(/l64, /current)
>>>> >>> 845185
>>>> >>>6. IDL> test = obj_new('mtgv_lodat', 'model.txt',
>>>> >>>'c:/rsi/projects/gicvu idl/system models/')
>>>> >>>7. IDL> print, memory(/l64, /current)
>>>> >>> 412234
>>>> >>>8. IDL> obj_destroy, test
>>>> >>>9. IDL> print, memory(/l64, /current)
>>>> >>> -1077816
>>
>>>> >>Maybe is not negative, but just overflowing for
>>>> >>18446744073708473800LL... now that's a nice
>>>> >>rig you have, just one megabyte short of 4 exabytes ;-)well, that should have been 16...
>>
>>>> >>Ciao,
>>>> >>Paolo
>>
>>>> >>>If I repeat the process starting at 5 IDL blows up after a repetition
>>>> >>>or two. If anyone has had this problem before and knows a solution I'd
>>>> >>>be grateful. I couldn't find a solution searching the board, the IDL
>>>> >>>help, or the ITTVIS IDL memory allocation FAQs.
>>
>>>> >>>On the other hand, if anyone wants to buy a program that uses negative
>>>> >>>memory this is your lucky day.
>
>
|
|
|