-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
DDLog causing bad Access errors on iOS 7 #140
Comments
I am seeing this also. 👍 |
I think I am as well. I'm seeing a mutated collection inside a fast enumeration block, as well as a corrupted object pointer when I log one of my object's properties in a log statement. I'm using a log level macro that expands to use |
Never mind my comment: I had a race condition around data source mutation that, once fixed, made my crashes around the logging macro disappear. |
I have the same problem as NikoRoberts Update: The problem disappeared when i removed the no-arc flag from the files. I did this some hours before due to a arc related error message in Xcode. With ARC enabled, the problem does not longer occur and the logging is working. |
just to let everyone know we use 1.6.2 and it is already using ARC and it still crashes |
@NikoRoberts can you share more information about what you're doing with the framework when it crashes: can you post a code snippet around the crashing callsite? Also, a full crash log will help. If you're seeing this crash reliably, is it always on the same line, or does it vary a bit? (If the latter, every different crash log will shed a bit more light on it.) |
@NikoRoberts any updates on this, I use the latest version on several projects and never got this crash. It would help a lot if you could provide some extra info. |
Status Info We Have
We were just doing DDLog calls in various places in the app in various contexts from multiple threads. |
We'll look into this and hopefully fix it. Sorry to hear you had to drop Lumberjack. |
We will pick it back up again if you can figure out how to debug it or patch it. |
@NikoRoberts I'm happy to help debug this if you want to try re-integrating it in one place you know it's broken. |
@NikoRoberts @cbowns after a short code review, I can assume the crash is due to
NSCalendar is thread-unsafe, so probably this line is getting called from 2 threads at the same time. I am trying to reproduce the issue and patch it so we can release 1.6.3 |
Ah thanks for this guys. Sorry we couldn't help you out more. We are just Glad you figured it out though. We will probably swap Lumberjack back in -- This email and any files transmitted with it are confidential and intended On 7 November 2013 11:17, Bogdan Poplauschi notifications@github.comwrote:
|
This crash is very strange. I tried creating 100 threads that access NSCalendar components:fromDate: at the same time on the same NSCalendar instance, never got a crash (simulator 7, simulator 6.1, device 7). More than that, logMessage should be called from the DDTTYLogger queue which is a serial queue. @rivera-ernesto any ideas? I'm kind of blocked |
Having seen a similar crash that turned out to be my own fault, here's some background on what I saw: DDLog was being called in a loop running on a mutating collection, and sometimes the collection would be mutated on another thread while logging was being executed. This may simply be a latent bug being exposed by Lumberjack, not a Lumberjack bug in its own right. |
As some of the recent pull request may have fixed the original reporter's issue (although we can't know as he's no longer using the library), and also as most participants here have fixed their crashes, I'll close this issue for the 1.6.3 release. Feel free to reopen it later if needed. |
@bpoplauschi I experienced the same issues when using commit 79f6d2a. The thread has EXC_BAD_ACCESS error. It stopped at DDTTYLogger.m when calculating timestamp |
now I think we have a little window in the coming weeks where we can test a reintegration of Lumberjack into the project. If @janjokela or @vascoorey find anything I am sure we will post it here |
@NikoRoberts @janjokela @vascoorey any updates here? |
Closing this one once again until it resurfaces... |
I got the same error at the same place as NikoRoberts: I'm using this version |
Changing this line:
With this:
Seems to have stopped the crashes for me. |
Could you pull request that? |
This solved issue #140 for me.
Please check again with the latest master ( |
Previously working fine on iOS 6.
Latest version through pod update did not help
The text was updated successfully, but these errors were encountered: