Interpretation of Crash Magazine Crash / Stack Trace

I am using the TestFlight SDK and have received several crash reports that are identical to this. However, it’s hard for me to understand this, and what is the main reason for the failure in the reports?

Exception SIGSEGV 2 libsystem_c.dylib 0x32862e92 _sigtramp + 42 3 Foundation 0x33750d1c -[NSError dealloc] + 60... Exception reason SIGSEGV Stacktrace 0 MyAppName 0x0013faba testflight_backtrace + 382 1 MyAppName 0x00140708 TFSignalHandler + 264 2 libsystem_c.dylib 0x32862e92 _sigtramp + 42 3 Foundation 0x33750d1c -[NSError dealloc] + 60 4 libobjc.A.dylib 0x39230488 _ZN12_GLOBAL__N_119AutoreleasePoolPage3popEPv + 168 5 CoreFoundation 0x31de9440 _CFAutoreleasePoolPop + 16 6 Foundation 0x33751f7a -[NSAutoreleasePool drain] + 122 7 CoreData 0x35e0a4b2 -[NSManagedObjectContext save:] + 1210 8 MyAppName 0x000b7168 MR_swapMethodsFromClass + 18076 9 CoreData 0x35e0dbc0 developerSubmittedBlockToNSManagedObjectContextPerform + 88 10 libdispatch.dylib 0x335974b6 _dispatch_client_callout + 22 11 libdispatch.dylib 0x33598dca _dispatch_main_queue_callback_4CF$VARIANT$up + 226 12 CoreFoundation 0x31e79f3a __CFRunLoopRun + 1290 13 CoreFoundation 0x31decebc CFRunLoopRunSpecific + 356 14 CoreFoundation 0x31decd48 CFRunLoopRunInMode + 104 15 GraphicsServices 0x36e092ea GSEventRunModal + 74 16 UIKit 0x320db2f8 UIApplicationMain + 1120 17 MyAppName 0x00099122 main (main.m:17) 18 MyAppName 0x000990d7 start + 39 

Additional Information:

  • Users report that this failure occurs 1-2 seconds after the application starts.
  • The application uses master data and a MagicalRecord (where the MR_swapMethodsFromClass method comes from)
  • I can not reproduce this problem on any test devices when working with Xcode (iPhone 3GS, iPhone 4 or iPhone 5) with different versions of iOS (iOS 5.1, 6.0, 6.1).

EDIT

Still working on a solution to this problem ... I was able to recreate it (but not with an attached debugger).

Here's the weirdest part - if the user has an older version of the application and installs the update (distributed via Test Flight), they get this error.

However, if they first uninstall the old application and install the update, an error does not occur.

+4
source share
2 answers

Go through it:

 0 MyAppName 0x0013faba testflight_backtrace + 382 1 MyAppName 0x00140708 TFSignalHandler + 264 

This is TestFlight. This happens after a failure occurs, so this, of course, is not the reason.

 2 libsystem_c.dylib 0x32862e92 _sigtramp + 42 

This is the moment when we are faced with collapse. Sigtramp is a trampoline signal. This is a fancy way of saying, "I caught a signal (accident), and now I'm going to bounce elsewhere in the code."

 3 Foundation 0x33750d1c -[NSError dealloc] + 60 

Oh. It is important. We crashed on releasing a NSError . This means that NSError was too released or underexposed.

 4 libobjc.A.dylib 0x39230488 _ZN12_GLOBAL__N_119AutoreleasePoolPage3popEPv + 168 5 CoreFoundation 0x31de9440 _CFAutoreleasePoolPop + 16 6 Foundation 0x33751f7a -[NSAutoreleasePool drain] + 122 

Sadly ... this manifested itself by omitting the pool of abstracts. This means that the real mistake can be far from here. But at least we know the type of object. NSZombies can be useful to try to find a specific object.

 7 CoreData 0x35e0a4b2 -[NSManagedObjectContext save:] + 1210 

And the auto-advertisement pool merged while saving the MOC. This suggests that this is probably related to your Core Data code. This, at least, is where you looked first.

What you need to remember:

  • An error in your code is almost certain.
  • If it's not in your code, maybe it's in Magical Record
  • Do not assume that this is in Core Data. This is the least likely place for an error indicated on this stack.

Here's the weirdest part - if the user has an older version of the application and installs the update (distributed via Test Flight), they get this error.

However, if they first uninstall the old application and install the update, an error does not occur.

Maybe in your update code. Most likely in master data transfer materials. Audit every use of NSError in this area of ​​code. Eliminate all warnings from the compiler and analyzer. And try NSZombies if it is playing.

+14
source

You should try to add a model model to your data model. This worked for me, I had a similar problem with Magical-Record.

0
source

Source: https://habr.com/ru/post/1482657/


All Articles