-
Notifications
You must be signed in to change notification settings - Fork 26
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 in ARTOSReachability #593
Comments
@escfrya Thanks for the report! Is this happening always/often? If so, could you tell us how? Logs with ARTClientOptions.logLevel set to .Debug would be ideal. |
@tcard I can't reproduce this bug on my device. |
@tcard line 15 - class AppDelegate: UIResponder, UIApplicationDelegate { |
@tcard Unfortunately, crash reproduced in new app version(ably version 1.0.3)
|
Hi @escfrya. That's disappointing to hear. We're working on a release right now that will help us a) prevent crashes across the board and instead emit an error and fail, b) allow us to debug the issues in more detail by capturing the state and what has happened prior to the failure. I am sure @tcard will be in touch on Monday with details on that. |
@tcard it seems this error is still happening according to our internal error reporting.
See https://errors.ably.io/ably/ably-ios/issues/100893/ for the details. @tcard this is reported in 1.0.3. @tcard do you think an upgrade to 1.0.4 may fix this, or is this issue unrelated to any fixes in 1.0.4? |
@mattheworiordan I've been seeing those errors, but they have nothing to do with this. In fact, if you look at the stack trace (which for some reason Sentry thinks is invalid; we should migrate to the official Sentry library now that it's in Obj-C —anyway, it's visible as JSON if you expand the error on the top) there's a bunch of "" functions, so we don't know if it's Ably's fault at all. |
Any ideas how we can isolate that in the future so we do know then? |
@tcard additionally, could we modify the error sent to our exception tracker so that the errors are grouped? I believe the reference is what is preventing that. Perhaps look at the fingerprinting feature. |
@escfrya Can you confirm this is still happening? We haven't had any other reports of this, and cannot reproduce ourselves. |
@tcard sorry, but i doesn't use Ably anymore |
@escfrya sorry to hear that Igor. Mind if I ask why? |
@mattheworiordan i leaved project. The reason is not in Ably :) |
Ok, that's a shame, thanks for the response @escfrya |
@mattheworiordan This crash is still happening on the latest version 1.2.3, any ideia as to why it happens?
|
Hi @cdinarte and thanks for letting us know. We'll take a look. Is there any further context you can give us in respect of how you got this? |
@QuintinWillison we believe the bug is happening when returning to the app after it has been on the background for some time, but we're not sure. |
From the stacktrace, it seems it is waiting indefinitely for a lock. The lock occurs inside the |
@QuintinWillison Probably, #1100 might fix this issue too. |
Hey guys, this issue is not gone. It is still happening, can you please check it? |
Looks like this crash has the same nature as the one that was fixed here #1453 |
Hi team, the issue is still there. What I did are:
Thanks so much. |
Thanks for getting in touch, @xinjiesg. 😁 I'm reopening this issue so that we can look at this again. Are you able to enable verbose logging from the Ably SDK as that might provide more information to us? Or, even, perhaps provide us with a crash report? (you can supply this to us by raising a support ticket, in order not to need to share potentially sensitive information here in the public domain) |
@xinjiesg Glad to hear that! But couldn't you provide little bit more details about how you setup ably stack? I assume you re-create |
Hi Marat,
I did something like this:
Step 1: declare object
private var ably: ARTRealtime?
Step 2: call connection func in viewDidAppear
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
connectAbly()
}
Step 3: do connection
private func connectAbly() {
ably = ARTRealtime(options: options)
ably?.connection.on { stateChange in
...
}
}
If it is the case, should I check if ably == nil in viewDidAppear, before call connection?
|
I would suggest to have some wrapper around |
Hi @maratal ok, I will try it. Thanks for the update |
Closing this issue because the work is being tracked in another issue #1380 |
Seems like ARTOSReachability_Callback has referance to deallocated object.
ably version: 1.0.1
{code}
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000010
0 Ably -[ARTOSReachability internalCallback:] + 80
1 Ably ARTOSReachability_Callback + 124
2 SystemConfiguration reachPerformAndUnlock + 580
3 CoreFoundation CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
4 CoreFoundation __CFRunLoopDoSources0 + 540
5 CoreFoundation __CFRunLoopRun + 744
6 CoreFoundation CFRunLoopRunSpecific + 424
7 GraphicsServices GSEventRunModal + 100
8 UIKit UIApplicationMain + 208
9 test AppDelegate.swift line 15
10 libdyld.dylib start + 4
{code}
The text was updated successfully, but these errors were encountered: