BREW: Methods to trace BPOINT error messages - brew-framework

Hi I'm new to BREW mobile development. And I want to know the methods on how to trace the BPOINT error messages in the simulator, like double free of memory which is the TYPE 3 of BPOINT, etc.
Thanks.
Kramkram

use DBGPRINTF(FILE_LINE );
As BPOINT error messages appear in the simulator log as soon as happen it is actually very effective to put DBGPRINTF(FILE_LINE ) they will give you indication of if the error is before or after the statement.
put them a lot - find & fix errors then remove - it faster than you think.

Related

How do I debug a silent VB6 crash?

I am experiencing random crashes when I use my VB6 app in runtime mode.
I have read about Dr. Watson, but I don't even find it on the internt anymore.
What could I do to track down the bug?
Edit: I am pretty sure that the crash happens because I call
SomeArray(SomeIndex)
and SomeIndex is > UBound(SomeArray)
The reason it crashes silently seem to be that this error occurs within a subclassing procedure.
But I would like to know how I could have found out about it if I had not been able to pinpoint the error.
Thank you!

PyCharm says “Unable to display frame variables” in debug mode? (not related to gevent)

PyCharm 2016.2.3 is displaying an error message while in debug mode:
Unable to display frame variables
Many others ask this question, and the answer has to do with 'gevent' In my case I am not using gevent, and their fix has no effect.
How can I fix this? (Enabling gevent compatibility has no effect)
Ok, I solved this problem. Reporting it here in case others have similar.
It seems a host of issues will get reported as Unable to Display Frame variables.
In my case it as a condition where the str method had infinite recursion.
I could see this by printing prior to getting to that step in the trace.
This generated an error with a stack trace allowing for meaningful debugging.

Access Violation when debbuging windows phone 8.1 app

recently I encountered a problem. Every time when I make some changes in page after I debug it on device when going to said page the app minimizes (crashes) and after about 30-50 seconds in output window I get
The program 'XXX' has exited with code -1073741819 (0xc0000005) 'Access violation'.
But when I uninstall and then debug again It works. I already tied reseting phone. Is it something with my debbuger or more likely with my code?
Edit:
Right now sometimes it occurs and sometime it doesnt ... I'll need to inspect code more. Is there a way to obtain more debug info with Access violation information?
I'll post as answer so others can see it easily.
You can see the dump of debug on the test device, Follow this
link.
Basically the link explains how to turn on "Save Information option" from Feedback application inside Settings of your device. After that when you debug the app, you will find dump file of your application inside,Phone -> Documents ->Debug.
Please post a sample of your code. I had similar problems when I tried using {unsafe code} and included pointers. They are extremely useful, but often lead you to memory problems (reading from a NULL pointer or something like that), so check if that's your problem.
Good luck

Core Data: Updating max pk failed

I have a cocoa app which uses core data. Everything seems to be working fine.
However, in a very specific scenario the app was behaving very strangely for our client.
In particular the logs shows this appearing in the output many times (which I've never seen in my testing):
Core Data: annotation: -executeRequest: encountered exception = Updating max pk failed: with userInfo = {
NSSQLiteErrorDomain = 14;
}
Has anyone ever seen this message and do you know what it means? I've tried googling it but found no information other than a few message boards regarding the Growl app having similar problems, with no solution yet available.
Sorry that I can't be more specific regarding what causes this as I'm not even sure myself. I know how to reproduce this on the client's machine but this message seems very random.
I was hoping someone could give me some more information as to what this error means exactly so that I can maybe narrow it down some more. Right now I'm pretty clueless.
Note: This appears on a macbook pro running 10.7.2 (if that matters).
Thanks for any kind of help you can provide, even something vague would help me at this point.
Update:
The managed context "save" method also fails with the following error:
The operation couldn’t be completed. (Cocoa error 134030.)
This is not really a Core Data problem as such, but more an issue of you process running out of file descriptors.
Each process has a limited number of file descriptors. If you run out, Core Data (and many other things) will stop working, because they can no longer open files -- any they'll fail.
First of all, make sure you're not leaking file descriptors, i.e. make sure you close files when you no longer need them.
I'm not sure what kind of changes you're trying to track. Take a look at Tracking File-System Changes.
If you're on 10.7, take a look at dispatch sources and DISPATCH_SOURCE_TYPE_VNODE for a very powerful tool to track file system changes (corresponds to kqueue, but is easier to use).
Core Data also gives this error in a Sandboxed app when it tries to save DB to a location where it doesn't have full read/write access to (if a user opens file for example, Core Data will be able to read/write this file, but not anything else to the same folder).
Core Data fails to write the temporary _journal file to this folder and reports this error.

Why would an application popup an error, "Control doesn't have parent window," after running for 3 weeks?

I have been running an application developed under Windows 7 in Delphi XE on Windows 7 machine for about 3 weeks non-stop, but it stopped working after that and popped up a message box with "Control doesn't have parent window." After that nothing seem to work right in the software, unless it is shutdown and restarted.
I have an idea of what that error means, but I am trying to figure out. Why?
Any hints or suggestions will be greatly appreciated. Thank you.
Sign of a resource leak, window handles most likely. Diagnose with TaskMgr.exe, Processes tab. View + Select Columns and tick Handles, USER Objects and GDI Objects. Keep on eye on the values for your program while you are using it. A steady increase spells trouble, Windows stops giving more after 10,000.
If that doesn't help then improve your exception handling so you can get a better diagnostic, a stack trace is important to diagnose trouble like this.
You should install a copy of MadExcept, JclExcept, or other exception handling library that supports displaying/logging the call stack when an uncaught exception is raised (if you cannt reproduce the exception while running inside the IDE debugger, that is). Then you can figure out what your app was trying to do at the time of the exception, and hopefully narrow it down to the spot in your code that is accessing the specific UI control that is missing its Parent window.

Resources