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

Initialization Forecast.swift crash #48

Closed
MarcosMunoz opened this issue Oct 18, 2017 · 3 comments
Closed

Initialization Forecast.swift crash #48

MarcosMunoz opened this issue Oct 18, 2017 · 3 comments

Comments

@MarcosMunoz
Copy link

We detected yesterday that the library was crashing few hours. After that, we didn't see the crash anymore.

Crashed: NSOperationQueue 0x1740346c0 :: NSOperation 0x174c5d340 (QOS: DEFAULT)
0 ForecastIO 0x1012e710c specialized Forecast.init(fromJSON : NSDictionary) -> Forecast (Forecast.swift:69)
1 ForecastIO 0x1012dd2d0 specialized DarkSkyClient.(getForecast(url : URL, completionHandler : (Result) -> ()) -> ()).(closure #1) (Forecast.swift)
2 ForecastIO 0x1012dd084 partial apply for DarkSkyClient.(getForecast(url : URL, completionHandler : (Result) -> ()) -> ()).(closure #1) (DarkSkyClient.swift)
3 CFNetwork 0x18a7c934c __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
4 CFNetwork 0x18a7e1048 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 148
5 Foundation 0x18ac8e854 NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 16
6 Foundation 0x18abd37b0 -[NSBlockOperation main] + 96
7 Foundation 0x18abc3b68 -[__NSOperationInternal _start:] + 612
8 Foundation 0x18ac90bf0 __NSOQSchedule_f + 228
9 libdispatch.dylib 0x1890769a0 _dispatch_client_callout + 16
10 libdispatch.dylib 0x189084ad4 _dispatch_queue_serial_drain + 928
11 libdispatch.dylib 0x18907a2cc _dispatch_queue_invoke + 884
12 libdispatch.dylib 0x189086a50 _dispatch_root_queue_drain + 540
13 libdispatch.dylib 0x1890867d0 _dispatch_worker_thread3 + 124
14 libsystem_pthread.dylib 0x18927f100 _pthread_wqthread + 1096
15 libsystem_pthread.dylib 0x18927ecac start_wqthread + 4

@sxg
Copy link
Owner

sxg commented Oct 19, 2017

Hmm...not really sure what to make of that. Has the library crashed again since that time? Is the crash reproducible?

@MarcosMunoz
Copy link
Author

No, it didn't crash again. We can close the issue and keep an eye on it, to try to detect the reason if it stops working again.

It might be worth to do some "sanity checks" in the parsing of the data as it seems to be related to force unwrapping the parameters. At least we would avoid the crash of the app under these weird scenarios.

Thanks for the library.

@sxg
Copy link
Owner

sxg commented Oct 19, 2017

Sounds good. I'll look into the parsing some more as I work on a Swift 4 update.

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

No branches or pull requests

2 participants