Memory exception in ios on chating more than 100 messages

Memory exception in ios on chating more than 100 messages, Sample app is also having the same. Memory is getting reduced after each API operation. Please help :frowning:

SDK version : ‘CometChatPro’. ‘2.0.7’

Hello @jibin.jose, Can you provide us with the error log or the short video of the issue which you’re facing so that we can look into this and resolve it as early as possible.


Here is the video url

In the video, you can see the memory is increasing on each message but it is not decreasing after sending the message, SO after sending nearly 100 message app is getting crashed.

In this video Ipad Mini is receiving the message and the stimulator is sending the message.

Hello @jibin.jose,

Thanks for sharing the video. We will investigate this at our end as early as possible. Also, will try to provide the fix for this in our next UI Kit release.

Let me know if you have any other queries.

When is the next release

We have completed all the functionality for the app , This is only issue blocking us for live release , Please update us athe date of release of one which will be really helpful.

Hi @jibin.jose,

As per the video, I can see you are checking it in the memory monitor of Xcode. You need to check the profiling of memory usage using the allocations instrument. Believe Instruments and the Allocations information - not the memory monitor in Xcode. The memory monitor graph is completely irrelevant. Ignore it.

This is not because the memory monitor in Xcode is useless or wrong. It is because memory management is completely different for a debug build than for a release build (Instruments uses a release build). This is especially true in Swift (you don’t say whether you’re using Swift).

Hope this helps.


I have tested it in the release build in my iPad Mini. Still, I have crash after sending 300 - 400 messages.

Device log is attached

“kernel” : “Darwin Kernel Version 17.4.0: Fri Dec 8 19:35:52 PST 2017; root:xnu-4570.40.9~1/RELEASE_ARM64_S5L8960X”,
“tuning” : {

“incident” : “68DDD53E-3A84-4D29-9B47-2B81B9F26674”,
“crashReporterKey” : “86b420bac67dd17ba26fb0944ccbfd8045187544”,
“date” : “2020-05-14 11:59:43.28 +0530”,
“reason” : “Power assertion timeout for “RTLocationAwarenessManager”. Simply releasing it now.\nBacktrace for power assertion: pid 29 (0x1883721a4 0x1ac253070 0x1ac33ca60 0x18578ea54 0x18578ea14 0x18579896c 0x1857992fc 0x185799d20 0x1857a203c 0x185a36f1c 0x185a36b6c)”,
“frontmostPids” : [
“exception” : “0xdeaffeed”,
“absoluteTime” : 8831648497833,
“thermalData” : {“sensors”:[0],“thermalLevel”:0},
“memoryStatus” : {“compressorSize”:25569,“compressions”:11318185,“decompressions”:7402337,“busyBufferCount”:0,“pageSize”:4096,“memoryPressure”:false,“memoryPages”:{“active”:111850,“throttled”:0,“fileBacked”:83315,“wired”:47170,“purgeable”:1365,“inactive”:17078,“free”:22063,“speculative”:24681}},
“processByPid” : {
“0” : {“timesThrottled”:415,“pageIns”:1,“waitInfo”:[“thread 587: mach_msg receive on port set 0x5e12c9932f80a1d3”],“timesDidThrottle”:70,“procname”:“kernel_task”,“copyOnWriteFaults”:0,“threadById”:{“292”:{“continuation”:[0,68842187604],“userTime”:9.9159999999999996e-06,“systemTime”:0,“id”:292,“basePriority”:81,“name”:“ApplePMGRTempSensor”,“user_usec”:9,“schedPriority”:81,“system_usec”:0,“state”:[“TH_WAIT”,“TH_UNINT”],“waitEvent”:[1,6778702023134242635]},“470”:{“continuation”:[0,68842187604],“userTime”:0.012008833,“systemTime”:0,“id”:470,“basePriority”:81,“name”:“AppleCS42L81MikeyBus”,“user_usec”:12008,“schedPriority”:81,“system_usec”:0,“state”:[“TH_WAIT”,“TH_UNINT”],“waitEvent”:[1,6778702023133816491]},“284”:{“continuation”:[0,68842187604],“userTime”:1.1916000000000001e-05,“systemTime”:0,“id”:284,“basePriority”:81,“name”:“ApplePMGRTempSensor”,“user_usec”:11,“schedPriority”:81,“system_usec”:0,“state”:[“TH_WAIT”,“TH_UNINT”],“waitEvent”:[1,6778702023134283595]},“437”:{“userTime”:22.842812791,“systemTime”:0,“system_usec”:0,“id”:437,“basePriority”:81,“user_usec”:22842812,“kernelFrames”:[[0,68837759936],[0,68837754864],[0,68837715580],[0,68841017820],[0,68841019368],[0,68834560532],[0,68837520352]],“schedPriority”:81,“state”:[“TH_WAIT”,“TH_UNINT”],“waitEvent”:[0,68844593824]},“276”:{“continuation”:[0,68842187604],“userTime”:0.58907304100000002,“systemTime”:0,“id”:276,“basePriority”:81,“name”:“AppleAE2MCA”,“user_usec”:589073,“schedPriority”:81,“system_usec”:0,“state”:[“TH_WAIT”,“TH_UNINT”],“waitEvent”:[1,6778702023134312907]},“390”:{“continuation”:[0,68841018836],“userTime”:2.8329999999999998e-06,“systemTime”:0,“id”:390,“basePriority”:81,“user_usec”:2,“system_usec”:0,“schedPriority”:81,“state”:[“TH_WAIT”,“TH_UNINT”],“waitEvent”:[0,68839486112]},“357”:{“continuation”:[0,68842187604],“userTime”:90.802369916000004,“systemTime”:0,“id”:357,“basePriority”:81,“name”:“AppleCT819”,“user_usec”:90802369,“schedPriority”:81,“system_usec”:0,“state”:[“TH_WAIT”,“TH_UNINT”],“waitEvent”:[1,6778702023134055019]},“446”:{"continuation

Hi Team,

Any update on this issue.For purchasing the cometchat the stopblocker is this issue, its very very critical for us.Do this issue will be resolved ASAP ??

Jibin Mathew jose

Hello @jibin.jose,

Yes. we are working on the issue reported by you. We are testing with a multiple scenarios with a different devices including older devices.

We will update you once this issue gets fixed.

Hello @jibin.jose,

We have created github ticket for the issue reported by you. Kindly, watch this repo as well as issue so that you’ll get notified once we resolve this issue.