|
nvm I managed to figure it out.
|
|
|
|
|
Hi
I am relatively new to Minidumps & WinDbg. I work on a GUI application developed on VS.Net 2003 (unmanaged code) where I have added a handler for Unhandled Exceptions using SetUnhandledExcpetionFilter. The handler function creates Minidumps. (this code was found in codeproject: http://www.codeproject.com/debug/postmortemdebug_standalone1.asp)
For testing purposes, I made the app crash due to Null ptr reference in one of the screens. The problem is that when I open the dump file in WinDbg, it does not show complete stack trace.
I use WinDbg as the default debugger; So it was interesting to see that when I remove the unhandled exception handler and let the app crash, WinDbg takes over and at that time, it shows
complete stack trace for the same code. So I don't understand what I am missing when creating / viewing the minidump.
Can anyone please help? I highly appreciate any help/ideas from your side.
Thanks
Jay
|
|
|
|
|
|
Hi,
I'm using Chris MFC GridCtrl in my app in a dll.
My App is working fine in debug mode.
But as soon as I call the diolog (inside dll) - which is using the grid control - in release mode, my app crashes?
Has anyone had made the same experience, or has an idea, or even better a fix for that problem?
I've no idea how to fix this! Pressing the Retry-Button of the Assertion Dialog stops at:
-----------------------------------------------------
AFXWIN1.INL:
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetInstanceHandle()
{ ASSERT(afxCurrentInstanceHandle != NULL);
return afxCurrentInstanceHandle; }
-----------------------------------------------------
Thanks Ralph
[Reply][Email][View Thread][Get Link] [Modify|Delete]
|
|
|
|
|
So are you showing a dialog from inside the DLL? If so, have you used the AFX_MANAGE_STATE macro at the top of the method that uses the dialog?
Or if you are using a dialog that is stored inside the DLL from your EXE, have you called AfxSetResourceHandle() to tell MFC where to find the dialog template?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thanks for your reply!
I've already used the AFX_MANAGE_STATE macro before.
Now I've inserted the AfxSetResourceHandle() call, but the Assertion appeared in the same way.
I'm not sure, but I guess the resource handling should not differ between debug and release mode, or I'm wrong?
Regards Ralph
|
|
|
|
|
|
as the name says, it is when you lose some memory segments.
actually, it is when the memory is not well managed by a program, and is not entierly restituted to the system as "free" when the program leaves... this way, it cannot be re-used by another process...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
OK, I have an error in my application and somehow seem to corrupt the stack.
I have done a search on Google for a market overview. And what really really bothers me is that it seems that all vendors stopped developing their tools years ago. No new functions, no update, no nothing
I found:
- Purify
- Insure++
- BoundsChecker
- and some others.
Question:
Can you recommend me an actively supported and developed tool for checking all kind of programming errors like memory leaks, cross-threading issues, pointer issues, stack issues and so on?
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
At work we use purify, and it works quite good and is a pretty fast solution for finding memory related problems.
I tried boundschecker and its also pretty good, it integrate several error checking capabilities like the thing you mentioned, and more (deadlock detection, call validation, object tracking, .NET analysis ...)
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thank you, I will try purify! Is it still being activly developed with new versions?
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
I know that they are currently working on new features in Purify plus
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Do you have any detailed information? Like e.g. release date or supported platforms/IDEs (like VS.NET 2005 e.g.) or new features?
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
Are you saying that BoundsChecker v7.1 is out-of-date?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I do have 7.02 (or something like that) from 2002 and therefore I imply that 7.1 is out of date, too. Additionaly the sales man told me to contact me when new releases are available but I never heard from him again
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
|
I tried the following lines of code on VC++ 2003.NET:
wofstream file;
wstring filename = "whatever.xml"
file.open(filename.c_str(), ios_base::out | ios_base::trunc);
however when compiling I get an error saying that the compiler can't convert from const wchar_t* into const char*. What happened to polymorphism. When I look at the error message I can see that the file variable is correctly a basic_stream using wchar_t but the open function still wants to take a const char*. Isn't this wrong? Is this an incorrect implementation?
I am the handsome one in the crowd.
|
|
|
|
|
This looks like a Unicode problem. Try prefacing the string literal with L .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
AFAIK wofstream::open is actually a call to basic_filebuf::open(const char *_Filename, ios_base::openmode _Mode) (as declared in the file 'fstream'). As you can see it takes a const char* for the file name, I have not found a version that takes a wchar_t.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
hi,
i have small problem on pointers. Suppose i have avariable called 'varA' and i a function called 'modifyvariable'. Now when i write this:
//***********************
void main()
{
int varA;
modifyvariable(&varA);
}
void modifyvariable(int *varB)
{
int temp;
varB = &temp;
}
//************************
Okay. Example: if the address of varA is 25200, and and i pass the address of varA to modifyvariable by writing 'modifyvariable(&varA);', the address 25200 gets copied to the pointer varB. Now if the address of temp is 26200, and i change the value of the pointer varB (which is currently 25200) to 26200 using the code 'varB = &temp;', the address contained within varB does change but the address of varA does not change. how can i change the address of varA to 26200 from the fucntion?
|
|
|
|
|
You need this instead:
void modifyvariable(int **varB)
{
int temp;
*varB = &temp;
}
void main()
{
int varA;
int *p = &varA;
modifyvariable(&p);
}
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
consider varB has only a destination pointer. So when you change its address, varA itself does not change. I think you need a reference variable. This acts like an alias of the original variable itself.
Another thing, the original sample code has a fundamental bug. This involves the temp local variable. The moment your function returns, the variable goes out of scope and the pointer value set to varB will immediately become invalid. You can check this by tracing through the code.
I Dream of Absolute Zero
|
|
|
|
|
|
Friend i want to detect whether certain path or directory exists or not ? For example i like to know that following path is a valid path:
c:\Program Files\BLAH\BLAH
Please tell me how can i achieve the taks of finding out whether the path is correct OR how can i detect whether some directory exists or not ??
BTW, according to MSDN we can check the existance of direcory using CreateFile() with FILE_FLAG_BACKUP_SEMANTICS flag. But it is not supported in Windows 98.
Imtiaz
|
|
|
|
|