no error messages in xcode? - xcode

I'm coming from using visual studio. When I run in XCode and I get an error, it just says something like SIGABRT, but there are no helpful error messages like in VS, it doesn't point me to any code. There is just a list of memory addresses and threads.
How do I make it display messages like VS?

You put in your own error catchers, or use breakpoints. There's no way to make it give you helpful error messages. The best you can usually do is figure out which line it failed on, through trial and error using breakpoints.

You should look at Exception Breakpoints. Usually you want to add an exception throw Breakpoint to see which line threw the exception. More details in this answer: Xcode doesn't show the line that causes a crash
You should also always scan your code for errors and post some code! If you don't post code, most of the times nobody will be able to help you, especially when the problem is a code related crash.

Related

Scintilla error message on unrelated code

First off, ScintillaNET v2.6 was installed as a control and I have been able to use it and compile, so I assume the installation is ok:
This app is targeting the full .NET 4.0 framework, not the client profile)
Environment variable
ScintillaNT folder content
The error message:
The code triggering the error:
The error happens on the second line when I "step-in" the load method. Looks completely unrelated, but highly reproducible: the error always happens at that exact step.
The problem turned out to be a corrupted XML file. I still don't know why the crash page was all about ScintillaNET, but it appears this had nothing to do with Scintilla.
I am not deleting this question because I could not find any indication that this could happen (errors in different parts of the code triggering a Scintilla error page) and it would have saved me a lot of time trying to track back the "scintilla" problem.

ReleaseHandleFailed was detected when debugging with MSTest

When I run my unit tests in debug mode, I get a recurrent exception like this:
I click "Continue" and then the test goes on without any problem. I have to do this around 10 to 15 times per test I want to debug. If I simple RUN the test, I get no exception whatsoever.
The test does well anyway, I click "Continue" on the recurrent exception and the test ends gracefully.
The exception has no stack trace. All the information I can get about it is in that screenshot. Even if I choose to "Copy MDA message to clipboard", it is the same as appears on the screenshoot.
The test is using Entity Framework Code First, and dropping and creating the database each time.
What could be the problem? I am not using any kind of encryption, but the test connects to the SqlServer and do some operations with it.
Thanks.
I got to disable the warning: http://msdn.microsoft.com/en-us/library/d21c150d.aspx
But I would like to know what is going on.
Cheers.

Getting object reference error in my MVP application

I am receiving random object reference error in different modules of my application.The errors m facing is intermittent. I did debug of my code it looks all correct. Moreover, whenever I run into that error and I try again (immediately after I got error) with same steps with same input conditions that error does not come up. This is something which is happening not only in in development regions but also in production regions. I tried to analyze and I got some leads that there might be problem with temporary ASP. But I don't know how that can cause object reference errors. Sometimes I see Source error information like App_Web_ighjds[some kind of ID I guess]. I don't know where exactly the problem is? As far as my code is concerned It looks all fine. I believe if there was problem with my code then it should be reproducible every time. Does anybody have any idea why such error might be happening? If it is issue with temporary asp.net files then what I should do to avoid such error?? Any help is much appreciated. Thanks.
You're looking for ideas: I would suspect your module initializers or any DI container initialization.
Look for code that runs only on application start.
I would recommend to reset your web server completely before starting new debugging session.
I would also recommend setting Visual Studio debugger to "Break when an exception is thrown", by going to "Exceptions" settings (Ctrl-Alt-E) and checking the "CLR Exception" "Thrown" checkbox.

Visual Studio: How to activate compile errors?

sorry, this is not a very nice question for here, but I'm very stressed right now and i have to finish sth. now, so...
I accidentially deactivated compile errors in Visual Basic and I cannot find the option to reactivate. Google doesn't help, and manuals, too.
Please help :(
Thx very much!
fLo
EDIT:
It's about the errors when, for example, I run the following code:
Dim a As Integer
a = 9999999999999999999
Then, usually, the program gets stopped and a given error message shows (what type of exception, which row etc.).
You're probably looking for View, Error List.

How to debug a program that doesn’t throw any error

I’m having trouble to find a bug in my application.
The problem is random and don’t throw any error. The web site just keeps loading and loading and eventually gets a timeout.
Is a web application using MVC 3 in VS 2010 Pro.
Some time ago, I see a friend to write something in the url, and gets all the trace of the program…
Sadly, I don’t remember what the command was.
Anyone has an idea of what command is it?
Any suggestion on what to use to debug?
Thanks!
Edgar.
UPDATE!
I finally found the command... is trace.axd
But Its behave the same way... sometimes load without problems and show me all the trace info... and sometimes.. it keep loading and loading...
Maybe something related with IIS?
Turn on break on every thrown exception, run your application in debug mode and wait. If it executes too long then pause application and check where you are or wait for exception that is handled somewhere.
Your friend may have had something like the following built into his application, to dynamically set tracing on.
Trace.IsEnabled = Request.QueryString["trace"] != null ? true : false;
This provides info only if the page is fully loaded. It's probably best if you use the VS debugger to step through code.
If all you loops look ok, investigate code that could result in circular references or deadlocks. These can be difficult to spot sometimes, look for functions or constructors that require results from a calling class. So code that needs the result from a function which in turn need results from the first.
Well, this sounds like you have an infinite loop somewhere.
Look at the code that runs when you visit the URL that gives you trouble. See if there is any loops in there (for/while). If yes, see why if they never exit. You can do this by putting a breakpoint inside the loop and examining its behavior over the iterations.
in MVC the bugs you do not see are most of time (especially in Razor and Ajax work) view compile errors. Sometimes syntax bugs on views just does not show that view and do not stop working.
Try that:
put a breakpoint in view.
If program stops in there it means this view is working. Othervise there is a syntax error in this view.
Another way to see some bug information more than in visual studio is use browser tools.
I use google Chrome. Just open developer tools in it. Open network. And do your request. It will list the requests and responses. Click the response and see the information. After style (it is written Verdana etc) read exception details. Sometimes there is more information :)
I am using MVC 3 in Razor from start. So this is a small bug in asp.net mvc.

Resources