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

Multiple memory leaks in FirebaseSessions >>> FIRSESEncodeString #11027

Closed
skuske opened this issue Mar 28, 2023 · 7 comments · Fixed by #11139
Closed

Multiple memory leaks in FirebaseSessions >>> FIRSESEncodeString #11027

skuske opened this issue Mar 28, 2023 · 7 comments · Fixed by #11139
Assignees
Labels
sessions Changes pertaining to the Firebase Sessions SDK
Milestone

Comments

@skuske
Copy link

skuske commented Mar 28, 2023

Description

I am seeing multiple memory leaks in FirebaseSessions:

leaks

leaks_2

Reproducing the issue

Calling

[FIRApp configure];

in didFinishLaunchingWithOptions

causes the leaks.

Firebase SDK Version

10.7.0

Xcode Version

14.3 (14E222b)

Installation Method

CocoaPods

Firebase Product(s)

Analytics, Crashlytics, Remote Config

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

No response

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
PODS:
  - Firebase/Analytics (10.7.0):
    - Firebase/Core
  - Firebase/Core (10.7.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (~> 10.7.0)
  - Firebase/CoreOnly (10.7.0):
    - FirebaseCore (= 10.7.0)
  - Firebase/Crashlytics (10.7.0):
    - Firebase/CoreOnly
    - FirebaseCrashlytics (~> 10.7.0)
  - Firebase/RemoteConfig (10.7.0):
    - Firebase/CoreOnly
    - FirebaseRemoteConfig (~> 10.7.0)
  - FirebaseABTesting (10.7.0):
    - FirebaseCore (~> 10.0)
  - FirebaseAnalytics (10.7.0):
    - FirebaseAnalytics/AdIdSupport (= 10.7.0)
    - FirebaseCore (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - FirebaseAnalytics/AdIdSupport (10.7.0):
    - FirebaseCore (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - GoogleAppMeasurement (= 10.7.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - FirebaseCore (10.7.0):
    - FirebaseCoreInternal (~> 10.0)
    - GoogleUtilities/Environment (~> 7.8)
    - GoogleUtilities/Logger (~> 7.8)
  - FirebaseCoreExtension (10.7.0):
    - FirebaseCore (~> 10.0)
  - FirebaseCoreInternal (10.7.0):
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
  - FirebaseCrashlytics (10.7.0):
    - FirebaseCore (~> 10.5)
    - FirebaseInstallations (~> 10.0)
    - FirebaseSessions (~> 10.5)
    - GoogleDataTransport (~> 9.2)
    - GoogleUtilities/Environment (~> 7.8)
    - nanopb (< 2.30910.0, >= 2.30908.0)
    - PromisesObjC (~> 2.1)
  - FirebaseInstallations (10.7.0):
    - FirebaseCore (~> 10.0)
    - GoogleUtilities/Environment (~> 7.8)
    - GoogleUtilities/UserDefaults (~> 7.8)
    - PromisesObjC (~> 2.1)
  - FirebaseRemoteConfig (10.7.0):
    - FirebaseABTesting (~> 10.0)
    - FirebaseCore (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - GoogleUtilities/Environment (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
  - FirebaseSessions (10.7.0):
    - FirebaseCore (~> 10.5)
    - FirebaseCoreExtension (~> 10.0)
    - FirebaseInstallations (~> 10.0)
    - GoogleDataTransport (~> 9.2)
    - GoogleUtilities/Environment (~> 7.10)
    - nanopb (< 2.30910.0, >= 2.30908.0)
    - PromisesSwift (~> 2.1)
  - GoogleAppMeasurement (10.7.0):
    - GoogleAppMeasurement/AdIdSupport (= 10.7.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - GoogleAppMeasurement/AdIdSupport (10.7.0):
    - GoogleAppMeasurement/WithoutAdIdSupport (= 10.7.0)
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - GoogleAppMeasurement/WithoutAdIdSupport (10.7.0):
    - GoogleUtilities/AppDelegateSwizzler (~> 7.8)
    - GoogleUtilities/MethodSwizzler (~> 7.8)
    - GoogleUtilities/Network (~> 7.8)
    - "GoogleUtilities/NSData+zlib (~> 7.8)"
    - nanopb (< 2.30910.0, >= 2.30908.0)
  - GoogleDataTransport (9.2.1):
    - GoogleUtilities/Environment (~> 7.7)
    - nanopb (< 2.30910.0, >= 2.30908.0)
    - PromisesObjC (< 3.0, >= 1.2)
  - GoogleUtilities/AppDelegateSwizzler (7.11.0):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (7.11.0):
    - PromisesObjC (< 3.0, >= 1.2)
  - GoogleUtilities/Logger (7.11.0):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (7.11.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (7.11.0):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (7.11.0)"
  - GoogleUtilities/Reachability (7.11.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/UserDefaults (7.11.0):
    - GoogleUtilities/Logger
  - nanopb (2.30909.0):
    - nanopb/decode (= 2.30909.0)
    - nanopb/encode (= 2.30909.0)
  - nanopb/decode (2.30909.0)
  - nanopb/encode (2.30909.0)
  - PromisesObjC (2.2.0)
  - PromisesSwift (2.2.0):
    - PromisesObjC (= 2.2.0)

DEPENDENCIES:
  - Firebase/Analytics
  - Firebase/Crashlytics
  - Firebase/RemoteConfig

SPEC REPOS:
  trunk:
    - Firebase
    - FirebaseABTesting
    - FirebaseAnalytics
    - FirebaseCore
    - FirebaseCoreExtension
    - FirebaseCoreInternal
    - FirebaseCrashlytics
    - FirebaseInstallations
    - FirebaseRemoteConfig
    - FirebaseSessions
    - GoogleAppMeasurement
    - GoogleDataTransport
    - GoogleUtilities
    - nanopb
    - PromisesObjC
    - PromisesSwift


SPEC CHECKSUMS:
  Firebase: 0219acf760880eeec8ce479895bd7767466d9f81
  FirebaseABTesting: 76c8297fd026074e0366dc941d265d1be80a56d5
  FirebaseAnalytics: f8133442ee6f8512e28ff19e62ce15398bfaeace
  FirebaseCore: e317665b9d744727a97e623edbbed009320afdd7
  FirebaseCoreExtension: f17247ba8c61e4d3c8d136b5e2de3cb4ac6a85b6
  FirebaseCoreInternal: 8845798510aae74703467480f71ac613788d0696
  FirebaseCrashlytics: 35fdd1a433b31e28adcf5c8933f4c526691a1e0b
  FirebaseInstallations: 59c0e4c7a816a0f76710d83f77e5369b3e45eb96
  FirebaseRemoteConfig: d5de62211e2eaa2152d8ee85a23c301b70887a74
  FirebaseSessions: 34e5c084da010ef3802cbc062b822e513c9e6318
  GoogleAppMeasurement: fe17c92a32207dd5cdd4e8d742767f2da74857f6
  GoogleDataTransport: ea169759df570f4e37bdee1623ec32a7e64e67c4
  GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
  nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
  PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
  PromisesSwift: cf9eb58666a43bbe007302226e510b16c1e10959

PODFILE CHECKSUM: 233734da80802916263187863a831982228040cf

COCOAPODS: 1.12.0
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@rizafran rizafran added sessions Changes pertaining to the Firebase Sessions SDK and removed needs-triage labels Mar 28, 2023
@skuske
Copy link
Author

skuske commented Apr 17, 2023

Any update on this? Will this get fixed in the next release? Thanks. :o)

@morganchen12
Copy link
Contributor

@skuske can you try pulling these changes and seeing if they fix the memory leak? #11139

@skuske
Copy link
Author

skuske commented Apr 18, 2023

@morganchen12

Thanks! :o) I tried that and now I am seeing just one single leak instead of a few:

single-leak

@morganchen12
Copy link
Contributor

Thanks for checking; that should be fixed in the last commit (34380a2).

@skuske
Copy link
Author

skuske commented Apr 18, 2023

Many thanks, if you want me to check that, I can surely do that, but not before tomorrow ... 🙂

@morganchen12
Copy link
Contributor

No need; I'll do a manual check today. My attempts to write a test to check this automatically have not succeeded.

@morganchen12 morganchen12 added this to the 10.9.0 - M131 milestone Apr 18, 2023
@firebase firebase locked and limited conversation to collaborators Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
sessions Changes pertaining to the Firebase Sessions SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants