Comments (14)
@luisescamilla13 thank you!
If possible, can you create a new issue, so we won't bother issue author on a non-related topic?
from swift.
It crashed for me at the same line: self?.privateListeners.remove(listener)
Here is a hint of how it was precisely caught: before the app was in the state sceneWillResignActive
and on switching to sceneDidBecomeActive
it crashed.
from swift.
It didn't crash for me but cos of retain loop and caching the subscription didn't clean itself and was stuck providing the app with duplicate/invalid values. I fixed it by somehow cleaning the subscription manually. I will post a workaround when I'll be next time around my working device.
from swift.
There will be fix for this, so as soon as subscription
listener instance will go out of scope, it will be removed from list of listeners and free-up resources properly.
from swift.
@AirBlack this issue is addressed in 6.0.3
from swift.
Still getting the error with 6.0.3 :(
In $specialized Set._Variant.update(with:)
from swift.
@luisescamilla13 hello. What exactly error do you get?
This issue was about retain cycle.
from swift.
@luisescamilla13 is it possible to show place. where you experience issue in same way, as shown in first message?
from swift.
@parfeon sure
This is the crash:
SIGSEGV : Crash due to signal: SIGSEGV(SEGV_MAPERR) at 00000010
$specialized Set._Variant.update(with:) (<compiler-generated>:0 )
This is the code where I initialize pubnub:
// Setup PNConfiguration
var configuration = PubNubConfiguration(publishKey: keys.publishKey, subscribeKey: keys.subscriptionKey, uuid: email)
configuration.authKey = keys.token
pubnub = PubNub(configuration: configuration)
listener = SubscriptionListener(queue: .main)
pubnub.add(listener)
from swift.
@luisescamilla13 do you store somewhere reference on listener
? Without reference to it, the object will be deallocated right away.
from swift.
@parfeon yes sir, my class has the following variable
let listener: SubscriptionListener
And the value is initialized in the init of my class
from swift.
@luisescamilla13 is there any chance to have some minimum app which is able to reproduce this issue? With memory leak, we were able to reproduce it and fix, but I can't reproduce this one.
from swift.
@parfeon to be honest I haven't been able to reproduce it by myself, we just get this random crash every two or three weeks from different users. I'll let you know if I get more details. Thanks for the response.
from swift.
Continue getting crashes with the 6.0.5
latest version.
Please pay attention that the app crashes on com.apple.root.user-initiated-qos.cooperative
thread + when going to the background state.
![Screenshot 2023-05-30 at 7 07 04 PM](https://user-images.githubusercontent.com/9823122/242029091-e7872491-efea-4717-95af-cbde97052052.png)
![Screenshot 2023-05-30 at 7 07 37 PM](https://user-images.githubusercontent.com/9823122/242029246-aca1aa3a-e694-48df-9804-d6abaf74f3bf.png)
cc @parfeon
Can you please re-open this issue?
from swift.
Related Issues (11)
- Can't integrate with swift5
- PubNubPackage schemes reference missing targets, cause DVTAssertion failure in Xcode 14 beta which prevents Carthage builds HOT 4
- Building example app fails if the repo is checked out as directory with a name besides "swift" HOT 3
- Xcode 14 warning
- PubNub.add(_:) - $specialized Set._Variant.update(with:) HOT 2
- Add `push_type` header in PubNubPushConfig struct
- N/A
- Using multiple PubNub instances is not possible HOT 4
- convert a JSONCodable object to JSONCodableScalar
- Push Notifications are not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift.