-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 "freeing unallocated pointer" in FMDatabase.m line 1073 #538
Comments
@georgbachmann Same here. Have you found a solution? |
Please show the full backtrace, and code snippets that are calling FMDB would be helpful as well. |
I don't have more than the snipped above. I also can't reproduce it myself. I only have crashlogs and they all look the same. But it's affecting quite a lot of my users!!! |
You don't have the source to the app anymore? |
Ah... I meant stack trace... give me a sec... I'll post my code in a second |
Here's the snippet I'm using:
It logs Let me go find the crash log, |
My code is basically this:
And the |
I'm on
|
Jup, for me it also only happens on iOS10 |
@roblav96 - Error 14 is For example: NSString *path = [NSTemporaryDirectory() stringByAppendingPathComponent:@"tmp.db"];
FMDatabase *db = [FMDatabase databaseWithPath:path]; |
@georgbachmann There's not enough in your code to be able to guess what might be going on, sorry. A full backtrace, and the actual code you're using might help. |
@robertmryan That did it :D I'm a n00b at this. I've been doing web development for 6 years and just started experimenting with native programming. Thank you!!! |
@roblav96 - No problem. By the way, you should never call In ARC code, remove your strong references (e.g. if it's a property, set that property to |
@georgbachmann that's a partial backtrace of a single thread. Can you show them all? Preferably linking to a text file with them all? It's hard to copy and search for them when given images. |
@ccgus and as far as the code goes... basically it's just the code above. It's shitty that I don't have more on that... It's just that since iOS10 I start getting a lot of crashed here... |
Here's a full stacktrace: http://pastebin.com/fX76Xuh2 |
@georgbachmann Thanks for that. I would make sure that the values you're using for the update aren't spontaneously going away (like being deallocated on the main thread). I would also make sure that the database isn't being closed on another thread somehow. It's generally safe to use the queue on multiple threads- but it's maybe possible to close things. |
@robertmryan So in this snippet,
I think the method Thanks for the tip mate!!! |
@roblav96 - Sorry for the confusion. The if (![db open]) {
db = nil;
return;
} |
@robertmryan Thanks for the pointers! There's sooo much to learn. haha |
@ccgus just had a look at a few more crashlogs... they don't have nano and tiny frees My database never get's closed by me... Also the values I pass into the update are extracted from an Also I only use one single background queue for reading and writing... So concurrency shouldn't be a problem there... |
Sounds like things are fine then. I'm stumped. |
I am also facing lot of crashes in FMDB class, I am not using FMDatabaseQueue, PLEASE HELP TO RESOLVE ISSUE ASAP, PLEASE FIND LOG MY ERROR LOG 13 libdispatch.dylib 0x18c819200 _dispatch_call_block_and_release + 24 |
@ccgus I found one more different crash: http://pastebin.com/YTEvncMi |
Alright.... one more different iOS10 Crashlog: http://pastebin.com/8swk7pg7 |
@georgbachmann I don't ship any iOS apps. I haven't heard from anyone else, besides those in this thread, about these crashes. |
@ccgus Hey, did you or anyone else manage to find whats the problem, how to solve it or how to reproduce it? Since the iOS10 we are having the same problems as described above (hundreds of users experiencing these kinds of crashes and we are unable to reproduce the issue). Attaching some crash logs (we have quite a lot of them) 2016-11-22_16-37-18.6350_-0800-4f864ea5c1bbe73b1228ce0b0c330bd6320398d4.txt 2016-11-22_16-42-53.8877_-0500-34806c94fc8de740bdd3bcddd64a15e4758423f4.txt 2016-11-22_17-59-23.9039_-0800-4cbe9c6b827a2c6e643509a1a27308ab6112a854.txt There are several other crashes on other places that seems to be related (also iOS10 only) but there is not that many like the one above 2016-11-20_13-53-59.1439_-0500-ff304c5beb06579d2dfb02e6d43e95d67e069ed1.txt |
I've not been able to find the problem, or reproduce it. A reproducible case would go a long way. |
I think it's the same problem like these guys https://github.com/Adobe-Marketing-Cloud/mobile-services/issues/187 have faced. We are also storing the analytics data from application and extensions to the database in shared container and accessing it from background. Like the reporter said there "It seems like this happens when the app is in background and SDK tries to access its database when it's located in a shared container" I will try to reproduce it in some example as soon as I have some free time to do so. Hope it helps a little. |
My app wasn't yet recompiled for iOS10, but since iOS10 got released, I have a lot of those crashes:
in
FMDatabase.m line 1073
I am using Version 2.6.2The main problem is that I can't reproduce the crash...
Also the stacktrace isn't very helpful to me...
Does anybody else have this crash? Any help is very appreciated as I'd like to update my app soon to fix this problem!
The text was updated successfully, but these errors were encountered: