There are a lot of questions on Stack Overflow about specific errors with this phrase, but I wasn't able to find a general description of what it is and what causes this type of errors. I just want to get a better understanding of the issue; I suspect that it's covered in depth in some document from Apple, but I wasn't able to find it as well: every google search on the matter results in pages of specific problems and solutions that are tied to specific context. Can anyone point me in the right direction?
Related
Motivation, problem
I very often cite physics Wikipedia articles - which first requires googling to get the exact form of link, followed by copy pasting it. I want to make this method fast - for which I need the list of all physics articles.
Example:
Suppose I want to give a reference to path integral formulation of quantum mechanics in a problem I am solving.
Wikipedia does have a page on it, with the name "Path integral formulation". I won't know this however until I google "path integral quantum mechanics".
This process of searching is what I want to avoid. I claim I can cite these articles on the fly if I have a list of all physics articles in some file on my computer. (This is done by using vim plugins and some regex).
My ideas on getting article links
Wikipedia does have a index of physics articles, so maybe that could be leveraged?
I guess using Wikipedia API could help, but I am not sure and have never used it before. Or maybe some other vim plugin could help achieve this?
Can anyone help?
I have been doing some tests with the path loss formula and it gives me some pretty good results so far. However, I looked at the original code and saw that the formula used is
distance = Math.pow(10.0, ((-adjustedRssi+txPower)/10*0.35))
where adjustedRssi is RSSI - adjustment. This was giving me very small values for distance so I thought that I must have modified it at some point by accident. After doing the maths and playing around a bit I found that using txPower-adjustment instead of txPower-adjustedRSSI gives me correct distances.
I figured that the error must have been my fault but looking back at an original copy of the library I am seeing that the formula was actually this way all along.
Is this a mistake or am I missing something obvious? Using the formla as is right now gives me wrong results while modifying it the way I did gives right results.
Also, why is the formula only used if the ratio<1. Shouldn't it work in either case?
Yes, you are absolutely right! Reviewing this now, I can see that this was a simple coding error I made when I originally wrote this. I paused work on the path loss formula because I was getting poor results, probably because of this error.
Since this is a development branch of an open source library hosted on Github, it is probably most appropriate to discuss this in that forum. Please feel free to comment directly on the pull request thread here: https://github.com/AltBeacon/android-beacon-library/pull/251. As the lead developer on that project, I would also welcome a pull request with the changes you are making.
I got an EXC_BAD_ACCESS in my iOS program, and I suspect that the cause is in one of my anonymous blocks, but there are quite a few of those, and I need to narrow down the candidate list a bit.
The stack trace shows the current frame as __lldb_unnamed_function4866$$ProjectName. There are no line numbers or source file names that I can see. No local variables visible either. The debugger shows machine code instructions. This was running on a background event queue, so there is none of my code anywhere else on the stack.
How do I go about finding out what function this is?
I came across a similar situation, and while I can't help (yet) with your problem, I think I know a man who can.
Check out http://www.realmacsoftware.com/blog/block-debugging, for an exposition of how to find out a lot more about the evil block in question.
It doesn't help me much, because I'm working from a crash log, but if you're still interested, this is going to give you just about as much as you can get about the unnamed block.
Warning, the above link exposes you to a lot of arcane knowledge, and may make you feel a little inadequate :)
[Editted to add]
Not good enough yet?
After searching through disassembly and doing some manual symbolication, I came to the conclusion that the ___lldb_unnamed_function is a red herring.
I followed How to manually symbolicate a crash log with atos, and it pointed the finger at a completely different function, which came from a 3rd party library, and was a very good candidate for the crash reason (killed by angry watchdog with badf00d.)
In the course of this enquiry, I also came across hopper, a great disassembler; I used the demo version to confirm what the suspicious code was doing, so I'm giving them a namecheck.
Try to set an exception breakpoint by clicking on the plus symbol within the breakpoint navigator cmd + 6.
For getting an overview of debugging best practices if found it useful to consider a Stanford Lecture on iTunes U
when trying to email contents from text fields im having exceptions thrown. I think im wiring them up wrong.
Im creating outlets for my text fields in .h, setting up my email button as an action.
In .m im implementing usual code for sending email. Ui message frame kit has been imported.
Now I need some help as thats not working for me.
To summarise: How do i email whats in my text boxes?
Im using xcode 4.3 with storyboards
Thanks
There are no tricks to emailing the contents of text boxes. You need help with some exception, you need to provide us the precise error and show us the relevant code. If you want to try to solve it on your own, you should debug the code, single stepping through the method that attempts to email the contents of your text boxes (see Xcode 4 User Guide: Debugging and Analyzing Your Code; see the section about adding breakpoints and then the section about controlling execution).
Exceptions are generally the result of memory management problems (e.g. your code is trying to use some object that has already been released) so you might want to enable zombies if you haven't already. I also think that people do not sufficiently appreciate the value of Xcode's Analyze command on the Product menu (described in the aforementioned Analyzing Your Code section). This Analyze command will identify not only dangling pointers, but also some memory leaks. It's not perfect, but it's a good start.
People really shouldn't be posting questions here if they haven't first resolved the problems raised by Analyze (unless, of course, you need help fixing issues that Analyze raises). Personally, when I went through this Analyze exercise on my first big project, it was painful to clean up all the issues that it identified, but, more importantly, I suddenly "got it". I've been an IT professional for decades, have programmed in dozens (literally) of programming languages, but only after going through this painful exercise did I finally get the subtleties of Objective C memory management. Suddenly, rereading Apple's Advanced Memory Management Programming Guide, it all made perfect sense.
So, if you're still stymied, and the Analyze command did not identify any issues, and you ran the code through the debugger you were not able to identify why the exception was generated, then just provide us a detailed error message and show us the relevant code and I'm sure we'd be happy to help.
I've seen this question posted before but all answers given where fixes to specific code errors that were posted.
I want to know what does "attempting to create use_block_in_frame" actually mean and what can generally be the cause of it.
It's a warning from the debugger itself that it could not create an info struct for a particular object. Basically it's fallout from a previous error.
It's probably a red herring. I'd suggest looking at errors referring to your code (note this one is a warning only) that happened before this and work from there. Figuring out the particulars of this warning is unlikely to help.