[bug] strange memory leak in LC

Andre Garzia andre at andregarzia.com
Wed Mar 31 12:25:08 EDT 2021


Hi Panos,

The stack that was opened is a project that has many mainstacks in it’s stackfiles. Some of those stacks make use of the browser widget but the stacks that were open during the problem were not using it. I don’t recall the dictionary being open at that time either. I simply killed LC and kept going on, I wish I took some more time to try to investigate it but the IDE was not responding.

I don’t use Safari so I can really tell anything about it leaking.

Best
A

> On 31 Mar 2021, at 15:22, panagiotis merakos via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hello all,
> 
> After a brief Google search it seems there are some other apps that have a
> similar memory leak after upgrading to Big Sur:
> 
> https://discussions.apple.com/thread/252276774
> https://discussions.apple.com/thread/252090206
> 
> The issue folks here (in this list) have mentioned does not seem to be
> specific to M1 macs. It seems specific to Big Sur, since Andrew mentioned
> he saw that in an iMac, and there are no M1 iMacs so far.
> 
> In the previous links people mention memory leaks in Safari. Do you also
> see a memory leak with Safari? Also, did you use a stack with a browser
> widget, when you experienced this issue? These 2 might be related.
> 
> Also, did you use (or did you leave open) the Dictionary stack? The
> Dictionary does use a browser widget.
> 
> So far we are not able to reproduce the issue, because we either run Big
> Sur on Parallels, and the VM is suspended when you choose "Sleep", or we
> connect to a remote M1 Mac mini via VNC, and the connection will be lost if
> we choose "Sleep" for this Mac.
> 
> Kind regards,
> Panos
> --
> 
> On Sat, 27 Mar 2021 at 06:59, Phil Davis via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> 
>> I created a little "leak test" stack that runs the "leaks" shell command
>> against the processID of the LC engine that runs the stack. It checks
>> for new leaks every 60 seconds and lists the number and size of each new
>> leak found. I'm running it in LC 9.6.1 on 3 Macs right now - Catalina,
>> High Sierra and Big Sur.
>> 
>> After about 30 minutes:
>> - LC on Big Sur (M1) has 10 leaks for a total of 688 bytes.
>> - LC on Catalina (Intel) has no leaks.
>> - LC on High Sierra (Intel) has no leaks.
>> 
>> Just FYI -
>> Phil Davis
>> 
>> 
>> On 3/26/21 7:33 PM, John Balgenorth via use-livecode wrote:
>>> I am not personally using Bug Sur but if you make a standalone does
>>> it leak  memory too or is this only with the development system?
>>> 
>>> JB
>>> 
>>>> On Mar 26, 2021, at 7:29 PM, scott--- via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>>>> 
>>>> I’m running Big Sur and just got a warning from the OS that I was out
>> of application memory. Livecode was using 133.52 GB of memory.  It had been
>> open for a couple days but it wasn’t doing anything.
>>>> --
>>>> Scott Morrow
>>>> 
>>>> Elementary Software
>>>> (Now with 20% less chalk dust!)
>>>> web       https://elementarysoftware.com/
>>>> email     scott at elementarysoftware.com
>>>> booth    1-360-734-4701
>>>> ------------------------------------------------------
>>>> 
>>>>> On Mar 26, 2021, at 6:53 AM, Andre Garzia via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>>>>> 
>>>>> Sean,
>>>>> 
>>>>> The stack was not running anything. It was simply opened. I don’t
>> believe it would leak like that. Anyway, I’m monitoring to see if it
>> happens again.
>>>>> 
>>>>> A
>>>>> 
>>>>>>> On 26 Mar 2021, at 13:01, Sean Cole (Pi) via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>>>>>> Wow, Andre, that's impressive. That amounts to about 34MB per minute
>> over
>>>>>> 48hrs. I've had a pretty massive stack (226MB file at the moment) on
>> my Mac
>>>>>> sitting here over the last week. Looking in the activity monitor, LC
>> has
>>>>>> 987MB associated with it. and watching it over a period of time it
>> remains
>>>>>> stable and even went down a tiny bit.
>>>>>> 
>>>>>> I wonder if this is more an issue with Rosetta2 in this instance.
>> Maybe
>>>>>> something in LC leaks because of the Rosetta transformation of the
>> binary.
>>>>>> Perhaps, as a test, open the same stack on a non-AppleSilicon Mac and
>> watch
>>>>>> them both for how much memory they expend over a period of time.
>>>>>> 
>>>>>> All the best with that.
>>>>>> 
>>>>>> Sean
>>>>>> 
>>>>>> On Fri, 26 Mar 2021 at 10:03, Andre Garzia via use-livecode <
>>>>>> use-livecode at lists.runrev.com> wrote:
>>>>>> 
>>>>>>> I have no idea what happened. I’m running LC 9.6.2-rc-3 on macOS Big
>> Sur
>>>>>>> on M1 ISA (so it is running under Rosetta 2). I kept the IDE opened
>> for a
>>>>>>> couple days, I was working on a gaziliion stacks at the same time
>> and was
>>>>>>> not yet ready to close them.
>>>>>>> 
>>>>>>> The stacks were not doing anything, they were not running “send in
>> time”
>>>>>>> commands or doing any kind of processing, they were just opened.
>> Then macOS
>>>>>>> showed me a dialog I have never ever seen on macOS 10.x, a memory
>>>>>>> exhaustion dialog. Looking closer at it, LiveCode was using 100 GB of
>>>>>>> memory, as in Gigabyte, as can be seen on this screenshot:
>>>>>>> 
>>>>>>> http://andregarzia.com/img/shots/lc-memory-leak.png <
>>>>>>> http://andregarzia.com/img/shots/lc-memory-leak.png>
>>>>>>> 
>>>>>>> I remember things like the “default button” causing leaks due to the
>>>>>>> animation and so on, but all I had was a bunch of custom stacks open
>> and
>>>>>>> the script editor focused. Thats it. It was open since yesterday.
>>>>>>> _______________________________________________
>>>>>>> use-livecode mailing list
>>>>>>> use-livecode at lists.runrev.com
>>>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>>>> subscription preferences:
>>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>>> 
>>>>>> _______________________________________________
>>>>>> use-livecode mailing list
>>>>>> use-livecode at lists.runrev.com
>>>>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>> 
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> use-livecode at lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> --
>> Phil Davis
>> 503-307-4363
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list