How do I debug a silent VB6 crash? - vb6

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!

Related

Stm32 CubeIDE debbuging not working. Tracing Not supported

I am using cubeIDE version 1.8.0 and NucleoF746ZG microcontroller for my project. I have made the codes and when I compile and run they work properly without errors and warnings. But the problem is that when I try to debug, It doesn't work. I mean the debug code uploads to the board but no cursor shows up at the breakpoints. I have tried to make some breakpoints and hault the program at them but no cursor comes to them.
I have opened a trace control tab and it says "Tracing is not supported". I don't know why that happens. The only thing that I know is that after installing the software, It didn't recognized my st-link. It was fixed after replacing the libusb-1.0.dll to a newer version of it. That was the thing that I have changed. But I don't think that it will affect since compiling and running works properly.
If anyone has encountered this issue or if you have any clues about a cause for this matter, please let me know. And request me if you need any more details from my side. I have attached two screenshots for reference.
Thanks and Kind Regards...
Screnshot1
Screenshot2

How to find out why a MFC program closes silently

I have the following bug in a program:
An MDI MFC program closes silently on Windows 7 (terminates the process without prompting to save changes and without displaying any "crash" dialog) when the user performs this operation : Click a context menu item.
But this happens only on that PC, at least, for the moment. No other PC has encountered that problem. However the bug can always be reproduced following the same steps but only on that PC.
I want to know the reason but probably the customer won't allow me to install many programs to debug, so I need to be able to log when the program terminates, or print the stack in Release version but I'm quite lost.
I had faced a similar bug before and eventually I fixed it logging line by line and changing the problematic part, but I guess there are much better ways to find bug reasons than this.
I have tried on my development PC to create minidumps on Release mode but if there is no exception thrown on that PC, (I haven't confirmed that yet, though...) maybe it's pointless.
Also used an available class on codeproject (Stackwalker) but I don't manage to print all the function calls. Only on simple console programs, but not on MDI or even SDI.
Any ideas on how to find out the reason? Thanks in advance.

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

Rational Functional Tester vb6 - Stackhash Crash on Win7

Ive got an issue using RFT with VB6 on Win7 (32,64) bit. This isnt is not present on Windows XP.
I am unable to highlight objects, or call verification points as the VB6 application crashes with a stackhash error. I have done weeks of research and have tried various things(DEP, Compatibility mode, clean boots etc) but am thus far unable to isolate the issue.
It seems that certain properties, these can vary, are not available once the program has been compiled. Running the application through VB6 IDE in debug mode does not result in a crash. Once compiled though, the crash occurs constantly.
I have used Windbg to debug the error to see what happens, and can see that there is a call to unallocated memory, resulting in heap corruption. What causes this? Is there anyway around this?
Any help would be appreciated :)

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