Crashing issue (using core data) - iphone

i am getting a serious issue
Program received signal: “EXC_BAD_ACCESS”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")
kill
quit
The Debugger has exited with status 0.(gdb)
Note:
Problem occurs when i am fetching approx more than 5000+ data on tableview (using Core data)
If data is not huge then application doesnt crash.

EXC_BAD_ACCESS means: Exception Bad Access.
This is not a Core Data error. It is an exception from trying to access an object that has been released.
Turn on NSZombie, set a breakpoint on objc_exception_throw. Then run your app again in the debugger and track down the over-release.

Don't know, but it appears to be happening because of the amount of data you are loading. This sounds like a lot of data to be loading on an iPhone. Is there anyway you can reduce the volume? Perhaps you could create a table that contains summaries of your data. Or perhaps page load 20 or 30 records at a time rather than the full 5000.

Related

Crash in CoreData:- NSCocoaErrorDomain, 134093

Recently we detected a crash report in firebase with underlying possible reason being, accessing CoreData fault values in a different thread.
CoreData crashed with Fatal Exception: NSInternalInconsistencyException at _PFFaultHandlerLookupRow.
My doubt is, will firebase collect a non-crashing report associated with CoreData faulting. Such a doubt came into light because, we are not able to produce this manually. We have detected a concurrency error in code but app crash is simply not reproducible. This specific behaviour of firebase logging of above error happens in iOS 16 devices only.
I have tried debug tools of coredata and found concurrency error and detected faulting is happening in entity and code was trying to access an entity's attribute whose values are at fault state.
Question is :- Will firebase collect a non-crashing report associated with CoreData faulting?

Library error in my iPad application

I am getting the following error:
Program received signal: “0”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")
What does it mean?
It's due to short memory while running, in this case please look for leaks.
The Message pasted in saying "Data Formatters" will get in several situations, possibly most commonly when unable to find a linked in shared library at launch time.
Please check this link too, similiar question,
Data Formatters temporarily unavailable

sqlite query results in crash in iPhone app - Memory Issue

I am using a sqlite query to get nutrient values for a specific food item from USDA database.
The query works fine, when tried in simulator, but results in crash on device sometimes.
I am including the USDA database in the app itself. Also the table on which the query is getting executed holds more than 5 lac records. I am getting 'Level 1 Memory Warning' at the launch of application. I cannot go for webservices, as the requirement is to give offline support.
Any suggestions how to handle this situation??
Edit :
In the log I get Signal 0 message
Program received signal: “0”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib")
You are exhausting your app's memory. I am not a DB expert but you will have to use some special techniques to access your huge data base. Perhaps execute multiple queries serially in different sections of the DB. Or divide the DB into segments. Following are some references related to the crash you are seeing-
Program received signal: “0”. Data Formatters temporarily unavailable
Data Formatters temporarily unavailable
Data Formatters temporarily unavailable, will re-try after a 'continue'
There are more if you search for the error message.
I guess the size of the database is causing the crash...
If you are using this database as read only then you can use the compressed and encrypted form ... you can get more details from here http://www.hwaci.com/sw/sqlite/cerod.html
this might help you get rid of the memory warnings..
here is another link which can help you reduce the size of the database....
How to reduce the size of an sqlite3 database for iphone?
Memory Related Crashes are quite common for ios apps I've noticed that more stable apps tend to manually manage memory alot over just letting the device manage it. I think if you split it up into sections instead of reading off one file and like akshay said index the tables it will be more stable. You could try reading files from compressed zips which would be more efficient over just plain old reading.

didReceiveMemoryWarning not being called before memory crash

I'm loading a couple of large csv files when my app loads for the first time and this works fine on the simulator but when running on my phone it crashes about 30% through with the message 'Program received signal "0"' which implies a memory crash. However, when I put a breakpoint in the didReceiveMemoryWarning event it doesn't seem to be called.
Am I missing anything or will the program normally shut down without the event being called?
If you're loading the file in a synchronous call on your app's main thread, that would prevent it from receiving other messages (such as memory warnings) before the synchronous call completes. Try making loading the CSV files an asynchronous task. (A good starting point would be reading up on NSOperation.) That will allow your app to receive memory warnings during the loading process.
What's happen if you try loading small csv instead. If it work fine then your csv is too large and cause memory issue. If so you may have to read the csv file chunk by chunk and release the memory of the old one before reading the new one.

What does the following error mean?

Program received signal: “EXC_BAD_ACCESS”.
[Switching to process 388]
kill
error while killing target (killing anyway): warning: error on line 2179 of "/SourceCache/gdb/gdb-1472/src/gdb/macosx/macosx-nat-inferior.c" in function "macosx_kill_inferior_safe": (os/kern) failure (0x5x)
quit
The Debugger has exited with status 0.(gdb)
Program received signal:
“EXC_BAD_ACCESS”. [Switching to
process 388] kill error while killing
target (killing anyway): warning:
error on line 2179 of
"/SourceCache/gdb/gdb-1472/src/gdb/macosx/macosx-nat-inferior.c"
in function
"macosx_kill_inferior_safe": (os/kern)
failure (0x5x) quit
Note where the error is; gdb has crashed. This is potentially due to a crash in your application, but that particular messages is certainly not useful to debugging the real problem.
And, more likely than not, the actual crash has nothing to do with an over-release of an object. Maybe so, but likely not.
Typically, when GDB crashes in this fashion, it is because you trashed the heap or stack in a fashion that gdb trips over the corruption trying to figure out what is going on. Or your app has entered a state that gdb can no longer communicate with it (which might be the case here given the crash location).
In this case, some things to try:
using latest dev tools? If not, do so and rebuild your app from clean, too.
can the crash be reproduced on the simulator and the device? If so, can it be debugged properly on one but not the other?
if you run the app without the debugger, can you get it to crash and then extract the crash log from the device?
does the behavior change between debug and non-debug builds? That can greatly impact memory corruption.
did this just start happening? If so, what did you change most recently?
Thought of another trick;
try setting the MallocScribble environment variable. This will scribble values into memory upon allocation/deallocation and can often, at the least, cause a memory corruption related crasher to crash earlier or different enough to catch it.
EXC_BAD_ACCESS usually means you are trying to access something that doesn't exist anymore. We'd need your stack dump and probably some code to help you figure it out.
To quote a co-worker, "Something went wrong somewhere".
This means that you have attempted to access a pointer that is no longer valid. Perhaps you forgot to retain an object, or released it one too many times?