1

Having a slight issue. My app is working fine in debug mode but if I change it and set the scheme to release instead of debug my app crashes. Does anyone know what might be causing this? I've searched all morning and failed to find a solution... Log included below.

Dec 30 14:26:46 Curtis-iPhone kernel[0] : xpcproxy[14458] Container:
/private/var/mobile/Containers/Data/Application/75DF32AD-00B2-423A-B00E-5DC3B2063311 (sandbox) Dec 30 14:26:46 Curtis-iPhone uDropOff2N[14458] : assertion failed: 12B440: libxpc.dylib + 71820 [A4F17798-F3DE-3FBC-85E3-F569762F0EB9]: 0x7d Dec 30 14:26:46 Curtis-iPhone Unknown[14458] : Dec 30 14:26:46 Curtis-iPhone uDropOff2N[14458] : Unknown class GMSMapView in Interface Builder file. Dec 30 14:26:46 Curtis-iPhone uDropOff2N[14458] : -[UIView setMapType:]: unrecognized selector sent to instance 0x170186ce0 Dec 30 14:26:46 Curtis-iPhone uDropOff2N[14458] : * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setMapType:]: unrecognized selector sent to instance 0x170186ce0' * First throw call stack: (0x18281659c 0x192f6c0e4 0x18281d664 0x18281a418 0x18271eb6c 0x100095004 0x186fc8aa0 0x18707dfb4 0x18707deb0 0x18707d34c 0x18707cff8 0x18707cd18 0x18707cc98 0x186fc5648 0x18691d994 0x186918564 0x186918408 0x186917c08 0x18691798c 0x187252dbc 0x187253c68 0x187251dec 0x18aa8562c 0x1827cea28 0x1827cdb30 0x1827cbd30 0x1826f90a4 0x1870333c8 0x18702e3c0 0x100094d20 0x1935daa08) Dec 30 14:26:46 Curtis-iPhone ReportCrash[14459] : task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument) Dec 30 14:26:46 Curtis-iPhone ReportCrash[14459] : ReportCrash acting against PID 14458 Dec 30 14:26:46 Curtis-iPhone locationd[10937] : client 'udropoffbundleindent' starting significant location changes Dec 30 14:26:46 Curtis-iPhone ReportCrash[14459] : Formulating crash report for process uDropOff2N[14458] Dec 30 14:26:46 Curtis-iPhone SpringBoard[53] : BSXPCMessage received error for message: Connection invalid Dec 30 14:26:46 Curtis-iPhone locationd[10937] : Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0 Dec 30 14:26:46 Curtis-iPhone com.apple.xpc.launchd[1] (UIKitApplication:udropoffbundleindent[0xe822][14458]) : Service exited due to signal: Abort trap: 6 Dec 30 14:26:46 Curtis-iPhone ReportCrash[14459] : Saved report to /var/mobile/Library/Logs/CrashReporter/uDropOff2N_2014-12-30-142646_Curtis-iPhone.ips Dec 30 14:26:46 Curtis-iPhone SpringBoard[53] : Application 'UIKitApplication:udropoffbundleindent[0xe822]' crashed.

Thanks,

Curtis

3
  • What is this method setMapType() ? setMapType: is no method of UIView class. Do you added this method to a UIView category ? Commented Dec 30, 2014 at 14:38
  • Seems you set custom class GMSMapView for UIView in xib or storyboard. How GMSMapView is included inside the project? As source file? Commented Dec 30, 2014 at 14:40
  • Is it when you are trying to launch from Xcode ? In that case it is normal that the app crashes if you try to do debugging in release mode. Commented Dec 30, 2014 at 14:43

1 Answer 1

2

The likely problem is a dangling pointer to a deallocated object. This might be showing up in a release build because Xcode's optimization settings are at maximum there (in a default project.)

The reason you get "[UIView setMapType:]: unrecognized selector" is the original object that accepted setMapType: messages has been deallocated. In the same RAM location, a UIView has been created. When the dangling pointer is used to send the setMapType message, the UIView receives it, but does not know how to handle it.

To find the problem, choose "Edit Scheme" from the schemes list. (Or menu Product -> Scheme -> Edit Scheme). In the "Diagnostics" tab, turn on "Enable Scribble" and "Enable Zombie Objects". These will help find the source of the problem. (You can find excellent information about these by searching StackOverflow and the internet.)

Also helpful would be to add a symbolic breakpoint for "objc_exception_throw". (Type "symbolic" into Xcode's Help menu for more.) This will cause execution to stop just before the breakpoint is thrown, so you can see where it is coming from.

Sign up to request clarification or add additional context in comments.

5 Comments

Do Zombie Objects still work correctly when using arc? I haven't been able to use them successfully for a while but I may just be doing it wrong.
Yes. My current project is ARC and I've used them.
I have tried what you said, but I am still in basically the same position... The app returns the following log, cut some of it out but it's the same as last time apart from the top... uDropOff2N(910,0x104a82300) malloc: enabling scribbling to detect mods to free blocks 2014-12-31 01:15:23.058 uDropOff2N[910:16395] Unknown class GMSMapView in Interface Builder file. 2014-12-31 01:15:23.076 uDropOff2N[910:16395] -[UIView settings]: unrecognized selector sent to instance 0x7fb91143c130
It changed from '-[UIView setMapType:]: unrecognized selector' to '[UIView settings]: unrecognized selector'? If zombies were on, there should be a zombie message about deallocated instance.
I've reproduced my bug thanks to: "This might be showing up in a release build because Xcode's optimization settings are at maximum there (in a default project.)"

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.