Click here to Skip to main content
15,899,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionConversion VC++6.0 to VC++.net Pin
Anu_Bala21-Feb-09 0:12
Anu_Bala21-Feb-09 0:12 
AnswerRe: Conversion VC++6.0 to VC++.net Pin
Gary R. Wheeler21-Feb-09 2:39
Gary R. Wheeler21-Feb-09 2:39 
QuestionVS2008 Pin
rasmirv20-Feb-09 22:39
rasmirv20-Feb-09 22:39 
AnswerRe: VS2008 Pin
Rajesh R Subramanian21-Feb-09 21:11
professionalRajesh R Subramanian21-Feb-09 21:11 
Questionhow to display Images in ListBox Rows. [modified] Pin
hemlat20-Feb-09 22:22
hemlat20-Feb-09 22:22 
AnswerRe: how to display Images in ListBox Rows. Pin
Gary R. Wheeler21-Feb-09 2:41
Gary R. Wheeler21-Feb-09 2:41 
AnswerRe: how to display Images in ListBox Rows. Pin
SandipG 21-Feb-09 8:58
SandipG 21-Feb-09 8:58 
QuestionHelp requested: "Debug assert failed" with process hang Pin
Andrew McAuley20-Feb-09 22:20
Andrew McAuley20-Feb-09 22:20 
Hi there,
I'm new to C++ and i've got a basic project i've made up, just to play around with templates. It consists of the following classes:

- enumerable (used much like IEnumerable in .NEt Framework code)
- list<Type> [inherits from enumerable] (provides basic add & remove alongside initial sizes)

- keyValuePair<KeyType, ValueType> (is a simple struct with 2 properties - key and value...

- dictionary<KeyType, ValueType> [inherits from list] (is a list, which uses keyValuePair

No error appears to occur until the end of my program exection. At this point the program simply hangs while executing my final instruction:

delete [] pDict;

My program currently does something no more complex than adding a few initial items to a dictionary, retrieving a list object filled with keys and then cleaning up... So I pause the debugger, it warns me:

The process appears to be deadlocked (or is not running any user-mode code). All threads have been stopped.

and it then points me to:

dbgrpt.c (line 360 - 363):
/* Report the warning/error */
 nCode = __crtMessageBox(szOutMessage,
                      _T("Microsoft Visual C++ Debug Library"),
                      MB_TASKMODAL|MB_ICONHAND|MB_ABORTRETRYIGNORE|MB_SETFOREGROUND);


and points out that the line containing _T("Mi... is where the error occured. As far as i can understand, this portion of the "dbgprt.c" file displays an assertion failed error message. In case that helps any:

szOutMessage = "Debug Assertion Failed!
   Program: ...iversity for the West of Scotland\Samples\Debug\Templates.exe
   File: f:\dd\vctools\crt_bld\self_x86\crt\src\dbgdel.cppLine: 52
   Expression: _BLOCK_TYPE_IS_VALID(pHead-&gt;nBlockUse)
   For information on how your program can cause an assertion
   failure, see the Visual C++ documentation on asserts.
   (Press Retry to debug the application)";


I then proceded to search MSDN documentation and found nothing specific to help me... Unfortunately searches of this forum didn't help me get any further so here is my question:

Where should I look? and what should I be looking for as possible sources of the error?

I've checked for un-initialised variables, memory leaks, and ensured (i think) all functions that return a value have a variable to be copied into so as to clean the stack... and so far all seems fine.

Thankyou for reading.
AnswerRe: Help requested: "Debug assert failed" with process hang Pin
Gary R. Wheeler21-Feb-09 2:48
Gary R. Wheeler21-Feb-09 2:48 
GeneralRe: Help requested: "Debug assert failed" with process hang Pin
Andrew McAuley21-Feb-09 7:53
Andrew McAuley21-Feb-09 7:53 
GeneralRe: Help requested: "Debug assert failed" with process hang Pin
Gary R. Wheeler21-Feb-09 9:24
Gary R. Wheeler21-Feb-09 9:24 
GeneralRe: Help requested: "Debug assert failed" with process hang Pin
Andrew McAuley21-Feb-09 11:45
Andrew McAuley21-Feb-09 11:45 
GeneralRe: Help requested: "Debug assert failed" with process hang Pin
Gary R. Wheeler21-Feb-09 15:32
Gary R. Wheeler21-Feb-09 15:32 
GeneralRe: Help requested: "Debug assert failed" with process hang Pin
Nish Nishant22-Feb-09 7:07
sitebuilderNish Nishant22-Feb-09 7:07 
GeneralRe: Help requested: "Debug assert failed" with process hang Pin
Gary R. Wheeler22-Feb-09 7:31
Gary R. Wheeler22-Feb-09 7:31 
QuestionHow to change the property of FlexGrid ActiveX control [modified] Pin
pandit8420-Feb-09 22:18
pandit8420-Feb-09 22:18 
Questionhow to maximize window Pin
hemlat20-Feb-09 20:49
hemlat20-Feb-09 20:49 
AnswerRe: how to maximize window Pin
«_Superman_»20-Feb-09 21:02
professional«_Superman_»20-Feb-09 21:02 
GeneralRe: how to maximize window Pin
hemlat20-Feb-09 21:48
hemlat20-Feb-09 21:48 
AnswerRe: how to maximize window Pin
Perspx20-Feb-09 21:02
Perspx20-Feb-09 21:02 
GeneralRe: how to maximize window Pin
hemlat20-Feb-09 21:54
hemlat20-Feb-09 21:54 
GeneralRe: how to maximize window Pin
hemlat20-Feb-09 22:11
hemlat20-Feb-09 22:11 
QuestionHow do I know status of a service in a remote machine ? Pin
SherTeks20-Feb-09 19:00
SherTeks20-Feb-09 19:00 
AnswerRe: How do I know status of a service in a remote machine ? Pin
«_Superman_»20-Feb-09 19:52
professional«_Superman_»20-Feb-09 19:52 
GeneralRe: How do I know status of a service in a remote machine ? Pin
SherTeks20-Feb-09 20:10
SherTeks20-Feb-09 20:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.