-
Notifications
You must be signed in to change notification settings - Fork 27
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
getForecast Crash #60
Comments
What platform and deployment target? Can you provide the crash log?
…On Tue, Apr 9 2019 at 2:51 PM, < ***@***.*** > wrote:
Ive updated to 6.0.1 and now I'm getting a crash in
DarkSkyClient.getForecast completion block, looks like some kind of memory
issue?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub (
#60 ) , or mute the thread (
https://github.com/notifications/unsubscribe-auth/ADU2NYed84_tun3TiJMeYxzFc6IpmAUEks5vfOEVgaJpZM4clLnL
).
|
iPhone and iOS 12.1 ill try and find the crash log now. |
Cannot find the crash logs on my device for some reason but here's a screen shot from Xcode. https://www.dropbox.com/s/ivqnz64bt2xrpxm/Screenshot%202019-04-09%20at%2020.09.14.png?dl=0 |
It seems to happen when trying to get any forecast at different locations. |
I've reinstalled 5.1.0 and everything works ok so I assume it was something added in the 6.0.1 fix last night thats causing the issue. |
I can't seem to reproduce this error. Can you send me the code that calls ForecastIO's |
Yeah the code is:
|
I get |
Which part of the switch statement does it break on? This is the sample code I'm using to test things out, and it works without errors for me. I am using my real API key, which I've replaced with "API-KEY" for this example.
|
It breaks on
|
Can you type |
Yeah get: |
Ive set breakpoints in the darksky client seeing if I can catch it before the crash |
Sure, that would be helpful! I'm still struggling to replicate the crash. |
Does not help seems to crash before anything is triggered in the darkskyclient. What was changed yesterday, anything major? |
I added explicit definitions for a few |
I comment out the switch statement and it doesn't crash and prints the result... so maybe its something happening after I've called my completion block in the switch statement. Ill investigate further and let you know, strange how it doesn't it happen in 6.0.0 or 5.1.0. Im using Xcode 10.2 & Swift 4.2 |
So if comment out the switch statement completely it doesn't crash and prints the result which is successful. If I add the switch statement It crashes again even though I commented out the completion call.... so its something to do with the switch statement.
|
Very strange. It sounds like an issue with the switch statement or the completion block rather than ForecastIO, but it's hard to say without all the code. On my end, everything with ForecastIO seems to be okay. I'll see if I can find a way to reproduce the issue, though. Let me know if you make any further progress with this. |
Ok so I tried replacing the switch statement with an |
This is the log:
|
Any ideas why there's multiple values of the same keys? I assume its because its hourly data? |
Ah, ok. That response looks good and suggests to me that ForecastIO is working okay. And yes, there are multiple values due to the hourly data. You'll receive an array of For now, I'm going to close this issue as this does not appear to be a problem with ForecastIO. I suspect the issue has to do with your completion block or implementation of the switch statement inside ForecastIO's completion block. |
Ok im not sure what is going on, because my code works fine with 5.1.0 & 6.0.0... my switch statement is the same as yours above and any time i try to access the Forecast? value it crashes no matter the method... |
Im going back to using 5.1.0 for now... |
There shouldn’t be any code/syntax changes between 6.0.0 and 6.0.1. I’m thinking the problem may be in the project settings that changed between the two versions. Can you install 6.0.1 and roll back commit-by-commit until you see the breaking change? There aren’t many commits between 6.0.0 and 6.0.1.
…On Tue, Apr 9 2019 at 5:10 PM, < ***@***.*** > wrote:
Im going back to using 5.1.0 for now...
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub (
#60 (comment) ) , or mute
the thread (
https://github.com/notifications/unsubscribe-auth/ADU2NSXoci1zHHqsiFNkLwJvAXeV2z83ks5vfQHVgaJpZM4clLnL
).
|
So I've done what you said and it seems its the changes to the Flag... making |
That is very strange. Conversion to an optional should make it safer and less likely to crash. Let me look into this some more and see why that’s happening. |
Yeah indeed... it is strange. |
Ive updated to 6.0.1 and now I'm getting a crash in DarkSkyClient.getForecast completion block, looks like some kind of memory issue?
The text was updated successfully, but these errors were encountered: