Find out sigabrt message - swift

After xcode update my api methods stop work. I can't even see error message. I got this:
What i want is, to see something like usually typed in console:
Programm terminated due to uncaught exception.. etc. But i can't understand what error is and how to fix it. How to print out error message?
After i click on "next" breakpoint button, programm just exit and still there is no error.

Usually with SIGABRTs I go to the top of the error message in console to actually find out the error.

Related

ACRA toast appearing, but cannot explain why

I have a complex Android app that uses ACRA for error reporting, which generally works fine.
Except, on one test device, I now see the ACRA toast appearing, during app startup, and then disappearing. But the app keeps running, and I get no report. It's as if an error happened, but nothing but a toast appeared. I find no clues in logcat.
But if I force a report by throwing an exception, I get the same toast, and I get the report posted to my server, and the app quits, all of which is desired behavior.
I've tried to track this down by adding a custom ReportingAdministrator just for the purpose of getting a stack trace. This works for my forced exception, but does get called for the mystery toast - the toast is displayed, but my administrator class method does not get called.
Any suggestions on how to find the cause of this errant toast event?
Note: ACRA is normally called by MyExceptionInterceptor. On an uncaught exception, it grabs some text and puts it uses the ACRA error report to add it to the report. It then calls ACRA.getErrorReporter().handleException(t, true);
Whatever is causing the ACRA toast to appear is not going through this path. I have not been able to find anywhere to set a breakpoint to catch it.
Setup code:
int acraLimitPerTime = VersionHelper.isDevelVersion() ? 1000 : 2;
CoreConfigurationBuilder builder = new CoreConfigurationBuilder(this)
.setBuildConfigClass(BuildConfig.class)
.setReportFormat(StringFormat.KEY_VALUE_LIST)
.setStopServicesOnCrash(true)
.setReportSendFailureToast("Error report could not be sent")
.setReportSendSuccessToast("Error report was sent")
.setEnabled(true)
.setExcludeMatchingSharedPreferencesKeys("^lat$", "^lng$");
builder.getPluginConfigurationBuilder(HttpSenderConfigurationBuilder.class)
.setUri(ISOL.URL_ACRA_REPORT)
.setHttpMethod(HttpSender.Method.POST)
.setBasicAuthLogin("*****")
.setBasicAuthPassword("*****")
.setEnabled(true);
builder.getPluginConfigurationBuilder(ToastConfigurationBuilder.class)
.setLength(Toast.LENGTH_LONG) //===jrm
.setText("An error has occurred and a report is being sent to the developer.")
.setEnabled(true);
builder.getPluginConfigurationBuilder(LimiterConfigurationBuilder.class)
.setPeriodUnit(TimeUnit.HOURS)
.setPeriod(1)
.setOverallLimit(acraLimitPerTime)
.setEnabled(true);
// The following line triggers the initialization of ACRA
ACRA.init(this, builder);
ACRA.getErrorReporter().putCustomData("BUILDDTG", MyBuildConstants.buildDTG);
new MyExceptionInterceptor().setUpFatalExceptionHandling();
I have been observing this very same behavior on my application. From the code base, I could track down that Toast message is triggered due to an unapproved report during startup.
I am not sure how it got to this state, but I guess that application has been shutted down before report was sent. It happens that this report is never treated, so I consistently get Toast notification on app startup.
Anyway, I could avoid startup notification by two means: set checkReportsOnApplicationStart to false on ACRA.init call, or clean acra unapproved folder inside your app data.
You may refer to this pull request (https://github.com/ACRA/acra/pull/1078) to better locate methods that cause this behavior.

Zend Error controller stopped working for 500

My Zend application was running fine until today, when I changed something which caused the error controller to stop working.
I have debugged every part of the code but I can not find any traces as to why is it happening
If I produce a 404 error, the error controller runs perfectly. But in case of 500, the control does not go to error controller.
I have tried many things but am still unable to find out what's wrong. I have searched the internet but people who encountered this problem, seemed to get no answer :(
Any help would be much appreciable
I have debugged the application step by step and found out that in case of 500, the execution stops instantly when it encounters a fatal error or exception
(UPDATE)
If I do something like...
$blabla->getInfo();
where $blabla is not defined, I don't get redirected to error controller.
But if I do something like...
Zend_Registry::get('blabla');
where no key is set for 'blabla' in Zend_Registry, then I get redirected
500 is a general server error, so no wonder the control does not go to your controller.
You will need to check your server logs to find out what is causing the error.
Also, try to recall whether you have altered your .htaccess file(s) recently and/or created an infinite redirect loop by accident.

How to show error page when exception happens in JSF beforephase?

The JSF2 specs are pretty clear in that exceptions thrown in a beforephase method are swallowed by the container. All I see is a small message in the console log.
However, I threw an exception in the beforephase because data could not be retrieved, and of course I want to show an error page with some more information. Unfortunately I'm unable to work it out.
Throwing the Exception from anywhere else works fine, my error page and errorhandler are setup fine to catch these errors, but I can't pick them up from any beforephase method (fortunately I only have a few).
Any hints how this can be done?
Thanks!

Prevent error messages logged by system framework

The following message keeps getting logged to the console:
-[__NSCFSet minusSet:]: This app appears to be calling this method with
a non-set parameter. Please wait while the system corrects this...
I don't know what I did to this appear. I never call this function and don't know what things call this.
For me, this appear when a touch anything in my UIWebView. This can be a touch in text box, or just a simple touch in any area of the page. Any new touch will produce it.
Anyone have an idea how to solve it?
You should be able to find out whether your code is causing the log message or not. You can do this by interrupting the app when the message is logged and looking at the stack backtrace of the logging thread. Then, investigate what code created the object that is prompting the log message using malloc history or Instruments.
To start with, you can try adding a symbolic breakpoint on -[__NSCFSet minusSet:]. You could narrow it down to the actual code doing the logging if you looked at the disassembly for a call to NSLog and placed the breakpoint there.
Once you've ruled out your code, it's not your fault: it's time to file a bug report and move on. If the log messages are swamping more interesting log messages, you might try patching the binary so it doesn't log, but just living with it is likely to be easier (though much less fun).

Weird Error from Xcode Debugger

I am using SQL lite database in my iPhone app. I have a refresh button on my Home screen and upon click of then refresh button I parse data from my web service and store the results into a SQL lite database. When I click on refresh button repeatedly I get an error. The error occurs after a variable number of clicks/refreshes each time. The error is:
Failed to load debugging library at:
/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib
Custom data formatters are disabled.
Error message was: 0xe00805 "dlopen(/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib, 10): image not found"`
After this error, my app crashes and when I logged the error it gives me an error "Unable to open database"
Please help me to resolve this error.
Thanks
Sandy
It would appear that the debugger is having a problem loading the data formatters that create the displays for various datatypes in the debugger window's variable display panel. If you've added any customer formatters, you should remove them.
Try running the program without the debugger and see if you get a crash. If so, the problem is in the app. If not, it's most likely in Xcode itself. I would test a dummy project and see if you get the same error.
It's possible there is hellish recursion somewhere in your code. I have seen that bring the debugger down but not with this error message.