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

Crash on notification service extension While saving Content in DB as " Thread 4: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=24 MB)" #8693

Open
skvalibabu opened this issue Oct 1, 2024 · 1 comment

Comments

@skvalibabu
Copy link

skvalibabu commented Oct 1, 2024

How frequently does the bug occur?

Always

Description

Thread 4: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=24 MB)

My Existing app got impacted in IOS 18 , when notification received in app is crashing.
So in order to debug this , I have recently updated my Xcode from 15.0 to Xcode 16.

I have tried to compile it , it got error like "Compiling for iOS 15.0, but module 'RealmSwift' has a minimum deployment target of iOS 18.0: " So in have changed RealmSwift pod minimum deployment target to IOS 15.6 . Then I am able to compile it.

Now the next step I have tried it , to reproduce the issue , I have sent a notification to IOS 18 device , I am able to reproduce the issue "Thread 4: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=24 MB)"

App is crashing and DB is not updated.

but it is working fine in Xcode 15 and IOS 17 and below devices

Screenshot 2024-10-01 at 11 55 29 AM

Stacktrace & log output

+ (Class)classForString:(NSString *)className {
    if (Class cls = s_localNameToClass[className]) {
        return cls;
    }

    if (Class cls = NSClassFromString(className)) {
        return RLMIsObjectSubclass(cls) ? cls : nil;
    }

    // className might be the local name of a Swift class we haven't registered
    // yet, so scan them all then recheck
    {
        unsigned int numClasses;
        std::unique_ptr<__unsafe_unretained Class[], decltype(&free)> classes(objc_copyClassList(&numClasses), &free);

// HERE I GOT CRASH AS "The operating system stopped the process because the process exceeded a limit on resource consumption, like CPU time or memory." in the framework.


        RLMRegisterClassLocalNames(classes.get(), numClasses);
    }

    return s_localNameToClass[className];
}

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

pod 'RealmSwift', '~> 10.0'

What Atlas Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Xcode 16.0
Mac OS 15.0
IOS 18.0
Swift Version 5.6

Build environment

Xcode version: 16.0
Dependency manager and version: COCOA PODS - 1.14.3
Realm 10.54.0

Found couple of warnings like this
Screenshot 2024-10-01 at 12 34 16 PM

Copy link

sync-by-unito bot commented Oct 1, 2024

➤ PM Bot commented:

Jira ticket: RCOCOA-2439

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

No branches or pull requests

1 participant