Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Memory leak

Open
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
ios, swift

Research direction

Start by tracing annotationManager's handling of nodes during session.pause() from the AR view controller's viewDidDisappear and during removeAllAnnotations. Reproduce repeated UIPopoverPresentationController presentation and dismissal, then verify that resources are released and the repeated flow no longer reaches the CoreAnimation IOSurface allocation failure.

Written by the indexing model from the issue text.

Description

I am encountering a persistent memory allocation issue with this otherwise awesome library.

Specifically, when a UIPopoverPresentationController (showing a modal VC with extended data on a given node, in response to user interaction) is presented and dismissed repeatedly, the app crashes with a [Render] CoreAnimation: failed to allocate IOSurface error.

This appears to be an issue related to the handling of nodes on calling the session.pause() method from the AR VC's viewDidDisappear code. I suspect this problem is related to the the issue discussed here:
https://stackoverflow.com/questions/28738551/how-can-i-remove-all-nodes-from-a-scenekit-scene

It looks like the annotationManager class here is not fully deallocating resources when the session is paused (nor on on calling removeAllAnnotations). Unfortunately I haven't been able to resolve this based on the SO answer.

Dominant language
Swift
Stars
227
Forks
45
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/mapbox-arkit-ios

All issues in mapbox/mapbox-arkit-ios

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.