Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory not released after ActivityParser.parseActivityLogInURL call #215

Open
jrcmramos-bumble opened this issue Oct 15, 2024 · 0 comments

Comments

@jrcmramos-bumble
Copy link

jrcmramos-bumble commented Oct 15, 2024

Hi, I would like to report an issue happening on 0.2.39.

The ActivityParser.parseActivityLogInURL call seems to leak a considerable amount of system memory indefinitely. Tried to workaround the problem using previous versions of the framework, but they all seem to have the same problem (tested up to 0.2.34). (Maybe problem due to recent version of Xcode toolchain?). While trying to break down internal calls, the problem seemed to be located on the Lexer.tokenize call.

I created this playground project where we simply try to decode some .xcactivitylog located under a certain path. Even using the autorelease pool, the program is not able to release the memory efficiently after parsing each log. At the end, all logs are parsed and a huge amount of memory is still in use (around 500MB for 6.6 MB of log files). While looking at the object graph, the objects leaked are of type CFString and CFString(Storage).

Steps to reproduce:

  • Download the sample project and change the derived data directory to your settings.
  • Run the application.
  • Check the memory consumption.
  • Click on "Fetch Logs".
  • Check the memory consumption and the object graph to see the leaks.

Context:
MacOS: Sonoma 14.6.1
Device: MacbookPro M1
Xcode: 15.4.0
XCLogParser installation: 0.2.39 (SPM)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant