-
Notifications
You must be signed in to change notification settings - Fork 133
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 when logging UserLocationOperation #121
Comments
Hi @jshier - sorry about this. I must have missed something in the logging stuff I've added recently. It's almost 2am now, but will look into this tomorrow/later. |
Hi @jshier is there any chance you could take a look at the Permissions example project on the branch in #122 I have added to the Location example your Manager class (more or less, you don't call the completion handler in the code above). And when I run this I get...
Without any crashes. According to your stack trace, it's crashing when it's figuring out the operation name which is "User Location" from the above logs. I've got to pop out for a few hours, now, but hopefully this will help us figure out what is going on. |
@danthorpe So it seems like this crash isn't really a crash but some sort of interaction with Operation's However, I do seem to occasionally be getting multiple calls to my completion handler. It was my understanding that
Perhaps related to #123? |
I take that back. I'm seeing the exception even with breakpoints disabled (but I'm still in debugging mode). I'll try your sample next. |
Yes, I get the same exception with your example project. Here's the output before it crashes on line 141 of
As an aside, is there an easy way to completely disable logging for the library? I don't usually need it as I've built my own logging |
@jshier - just going through your comments here... I don't think this is related to #123 - that is only an issue with One thing that might be relevant is that I typically never test CLLocation stuff using the simulator, so I was doing my tests with a real device. Not sure if that would make a difference though? I'm currently updating my test device to 9.2.... Aside - Regarding the logging - I'm going to do a ticket to turn the log message into an Part of my intention with the built in logger in |
Also... this kind of memoizing manager sounds pretty useful - perhaps something which could/should be added to Operations? |
Possibly. There's additional functionality it needs to be truly useful but |
Okay, running the Permissions example works for me in the simulator - Xcode 7.2, iOS 9.2 on 10.11.2 - no exceptions, no crashes, and only one location. Do you have any breakpoints setup? Could this be because you have a |
Ah! I think I've managed to re-produce it, while working on #126. Is this sort of like the crash you're seeing? But it is still a little tricky to reproduce - only managed it once. If this is the crash/stacktrace you're seeing is it consistent / every time? |
…ion_log Crash in location log - Issue #121
Hi @jshier there have been some improvements to how the logging works, including use of I'm pretty sure that the bug was due to accessing Other changes, you can do this: // Set the global log level like this
LogManager.severity = .Notice
// Disable built in logging entirely like this:
LogManager.enabled = false If you can still re-produce the crash on |
Looks good. I'm able to use my |
Okay, I'm going to close this issue now. 🙂 |
I created a simple
OperationQueue
manager to find the current user location:Attempting to run it as so:
(I have my own
log
function)Results in a crash in
Logging.swift
line 271.EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
Earlier in the call stack isLocationOperation.swift
, line 141. This is on the main thread.The text was updated successfully, but these errors were encountered: