When my app calls System.Diagnostics.Process.GetCurrentProcess(), it throws this error and crashes my app:
Unregistered icall ‘System.Diagnostics.Process:GetPid_internal()’
Is there a fix for this?
System.Diagnostics.Process.GetCurrentProcess is not supported in MonoTouch, it should probably not have been available in the first place.
The fix is to not call Process.GetCurrentProcess (or even better: not use the Process class at all).
Related
After upgrading to Xcode 11.3, our app throws an exception when running on an iOS 13.3 device. The exception does not occur at the same place every time, and the log indicates the exception is coming from com.apple.CoreAnalytics (see below). The exception is only thrown once. And, the exception is NOT thrown when I run the app on the simulator. Thanks in advance for your thoughts and ideas!
Sometimes Apple's frameworks use exceptions as an internal messaging technique. They probably shouldn't do that, but the frameworks contain a lot of old code that doesn't always follow best practices. There is no harm done, because the framework, having thrown the exception, also catches it, which is why you run fine if the app just runs without the debugger. But if you run from Xcode and you have set an Exception Breakpoint, you will pause after the throw but before the catch. It looks like that's what's happening. So just remove that breakpoint.
I am getting following error all the time in my iOS app:
objc[56232]: Class VCWeakObjectHolder is implemented in both
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AVConference.framework/Frameworks/ViceroyTrace.framework/ViceroyTrace
(0x12fe564d0) and
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AVConference.framework/AVConference
(0x12ef82e38). One of the two will be used. Which one is undefined.
The app itself runs fine but the debugger will not attach to the device process. The simulator does attach but the app crashes immediately after a breakpoint is hit.
I am running out of ideas on how to deal with it. Any help would be greatly appreciated.
Simulator -> Hardware -> Erase all content and Settings...Works for me.
I submitted bug #43377301 to https://bugreport.apple.com/
Debug messages should be off in Apple frameworks (Class VCWeakObjectHolder)
I'm currently fixing bugs in an old code base and I have no idea what this internal Apple "warning" means.
It shouldn't be displayed to the 3rd party developer. I'm using CoreBluetooth and Objective-C.
I'm trying to setup Parse crash reporting on iOS, using this guide, but unfortunatly, even after several crashes, there is nothing on my dashboard.
Here is my code (i'm using sdk 1.6.3) :
- (void)crash {
[NSException raise:NSGenericException format:#"Everything is ok. This is just a test crash."];
}
...
[ParseCrashReporting enable];
[Parse setApplicationId:#"********"
clientKey:#"********"];
[self performSelector:#selector(crash) withObject:nil afterDelay:10.0];
I followed the troubleshooting guide:
Make sure you've enabled Crash Reporting in your App Delegate before you initialize Parse. DONE
If you're testing, make sure Xcode isn't catching the crash with the debugger. DONE
Build, run, stop the app, and then run it from the home screen.
Crashes are sent on the next run of the app. Make sure the app isn't crashing again before it has a chance to send the crash information. If you're testing, you can ensure this by adding a delay. DONE
Crashes may take up to a minute to show up on the dashboard.DONE
Make sure you don't have any other crash reporting solutions linked to your application, as they might interfere with each other. DONE, (disable Flurry)
I tried on both simulator and device, as recommanded here.
Finally, i've this message in my console:
+[PFAnalytics trackEventually:params:]: unrecognized selector sent to class 0x10f08ac20
Any help is highly appreciated.
Parse must have a bug in v1.6.3 because I have downloaded v1.6.0 and it works all fine.
You can download it here:
https://parse.com/downloads/ios/parse-library/1.6.0
And this is the order for enabling:
[ParseCrashReporting enable];
[Parse setApplicationId:kParse_AppID clientKey:kParse_ClientKey];
This probably doesn't count as any answer but I don't have enough rep to comment.
Have you tried enabling the crash report AFTER setting up parse with your keys? I know this was an issue for me when I was trying to enable the local datastore.
I know it goes against the guide but weirder things have happened when I use Parse...
Parse 1.7.3 is also busted... upgrade to 1.7.4!! !
EDIT: DONT UPDATE TO 1.7.5 -- that seems to be busted too !!
Latest version Parse SDK 1.6.4 fixes this problem!
https://www.parse.com/docs/downloads
On my app, when I add the googleCast SDK, the app crash at launching, on this method [[DCIntrospect sharedIntrospector] start];. But when I don't have GoogleCast SDK, everything is working fine.
Here is the assertion log :
*** Assertion failure in -[GCKPB_PBFieldDescriptor initWithFieldDescription:rootClass:], /Volumes/BuildData/pulse-data/agents/wpye22.hot/recipes/415961027/base/googlemac/iPhone/Chromecast/SDKv2/Protos/../../../../ThirdParty/ProtocolBuffers/objectivec/Classes/PBDescriptor.m:409
This works fine if I run the project on an iPhone 5C, but crashing on the simulator (32-bit simulator).
Any idea on how to solve this crash, and still continue to use DCIntrospect ?
I had the same issue.
I was able to reproduce this issue, so I filed this bug.
Introspection triggers the +initialize method of the GCKPB_PBGeneratedMessage class.
This method apparently makes some bad assumptions about when +initialize will get triggered.
While waiting for a fix you can always use the workaround suggested here and mock GCKPB_PBGeneratedMessage's +initialize method.
I know there are MANY threads that discuss this issue and trust me, I have looked at each and every one of them but none of them solved my issue.
Anyway, in my app I am receiving a message sent to deallocated instance crash. The object address follows that message and I have tried to use instruments without any success.
What I would like to do is how do I properly debug and fix this issue with the latest Xcode (4.4.1). What I would like to know is which line the app crashed on. That way, I can just focus on that one object so I can make sure it is allocated.
Does anyone know how I can do this with the latest Xcode?
Thanks!
Enable zombie. It should tell you when your code try to send message to deallocated object instance. Problem is you are using a object after it has been released. It could be autoreleased object or object you explicitly released and using after etc. Below image is the screenshot from XCode when you do "Edit Scheme"
Setting an exception breakpoint can sometimes help to zero in on the specific line of your code that is causing a problem. This Apple doc shows you how.