Rev Classic Crashing

Karl Petersen karlpet at mac.com
Mon Apr 15 20:53:01 EDT 2002


Yes, John, the RAM allocation problem I see is beginning to look like 
a bug. My routine has the following line, which causes Rev to 
allocate a chunk of RAM that it never releases:

    export image "sample image" to file "sample file" as JPEG

So does this:

    export image "sample image" to URL ("binfile:" & pPathName) as JPEG

The amount of "lost" memory (allocated to Rev but never released) is 
driven by the size of the exported image. A 320x240 image loses about 
350K. My handler creates and exports a series of 100 images, which 
loses about 32MB of RAM each time it runs. Eventually it will cause 
the Mac to crash.

Is there some memory-management feature of 'export image' that this 
newbie has missed? (Yes, my routine remembers to delete the 100 
newly-created images, so they can't be soaking up memory.)

Karl


At 8:31 AM -0700 4/14/02, John wrote:
>This sounds more like a bug than a "feature".  It is also a bit 
>disturbing to have your built application leaking memory.  Perhaps 
>you should consider posting this bug on the "improve" list to make 
>sure the problem is noted.
>
>Just a thought,
>John Miskimins
>
>On Saturday, April 13, 2002, at 11:10 PM, Karl Petersen wrote:
>>
>>If Rev allocates more and more memory to itself the longer it runs, 
>>won't it inevitably crash? To test this, I built a MacPPC app (20MB 
>>memory allocation, dynamic memory allocation tested both checked 
>>and unchecked) whose main routine saves 100 images to jpegs. Each 
>>time it runs that routine, the app grabs 15MB more RAM, until 
>>eventually it has allocated about 150MB to itself. It always 
>>crashes when the Mac's free RAM drops below 125MB. (I.1.1, MacOS 
>>9.1, 512MB physical RAM)
>>
>>Isn't it inevitable the app will crash when either 1) it can't 
>>allocate more memory to itself; or 2) it starves the Mac OS/other 
>>apps of memory? What am I missing? This just doesn't sound right.




More information about the use-livecode mailing list