mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.12k stars 67 forks source link

Buggy scripts somewhere in site (or JIT failing?) #268

Closed ghost closed 2 months ago

ghost commented 6 months ago

For whatever reason, Infinite Mac will sometimes begin to rapidly leak RAM. After about a minute, this was the RAM usage image (10.5 GB!!)

This only happens on Infinite Mac. I think it is emulator related since this only happens after I run an emulator.

mihaip commented 6 months ago

Can you provide some more details: Does this happen for all emulators? As soon as launched or after a while? Does it persist if close the emulator? What does the Chrome task manager (which has per-site details) show?

Even in this screenshot, could you not crop it so aggressively -- I can't see the units for the "10,504.8…" column or what the header is.

And since no one else has reported this, can you check in an Incognito window or otherwise with extensions disabled, in case it's something specific to your setup?

ghost commented 6 months ago

Alright, so after 20 minutes of using Infinite Mac, I received this error when shutting down SheepShaver (running Mac OS 8.5) image

Checked the Chrome Task Manager after hitting "home", and... image

In more extreme cases Chrome itself would freeze, but the picture above was taken with NO emulator running.

that-ben commented 6 months ago

1GB is a lot but it's not shockingly huge... Nothing compared to the 10GB in the top post. Though, 1GB is a lot for a somewhat small HTML page with no emulator loaded, that's true. There must be a memleak in the SheepShaver.js emulator.

I repeated your experience with Firefox under W7 and it's true that if you use the emulator and crash it (I launched Battle Chess under Mac OS 9.0.4) the RAM is left completely garbage uncollected. I was at 430MB when SheepShaver.js crashed and upon clicking "Home", it was at 445MB and it remained like that after the page was loaded. After reloading the page, it only used 51MB of RAM.

In hindsight, I think it's normal for your tab to continue to use 1GB after you click "Home" because it does not reload the page, it only shows the InfiniteMac.org page on top of the emulator you were using, but the emulator is not garbage collected from the browser. If you refresh the page after using the emulator, your RAM usage will fall to 50MB-ish.

ghost commented 6 months ago

1GB is a lot but it's not shockingly huge... Nothing compared to the 10GB in the top post. Though, 1GB is a lot for a somewhat small HTML page with no emulator loaded, that's true. There must be a memleak in the SheepShaver.js emulator.

I repeated your experience with Firefox under W7 and it's true that if you use the emulator and crash it (I launched Battle Chess under Mac OS 9.0.4) the RAM is left completely garbage uncollected. I was at 430MB when SheepShaver.js crashed and upon clicking "Home", it was at 445MB and it remained like that after the page was loaded. After reloading the page, it only used 51MB of RAM.

In hindsight, I think it's normal for your tab to continue to use 1GB after you click "Home" because it does not reload the page, it only shows the InfiniteMac.org page on top of the emulator you were using, but the emulator is not garbage collected from the browser. If you refresh the page after using the emulator, your RAM usage will fall to 50MB-ish.

The weirdest thing was when I was using System 7.1.1 and moving some files and suddenly Chrome froze, so I opened the task manager and saw it rapidly eating RAM and using 100% CPU. (There were no other tabs open) That's when I took the cropped picture in the first post.