GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 11-Feb-2006, 01:47
coder coder is offline
New Member
 
Join Date: Jan 2006
Posts: 19
coder is on a distinguished road

assertion failure


Hi all,

What is an assertion failure? My MFC Application program with VS .net gave an assertion failure error by referencing line 231 of winsplit.cpp file which i hope is the sorce file of mfc.

thanks.
  #2  
Old 11-Feb-2006, 15:36
imbtf imbtf is offline
Junior Member
 
Join Date: Aug 2004
Posts: 41
imbtf will become famous soon enough

Re: assertion failure


In debug mode an assert triggers whenever some illegal condition occurs(in release they evaluate to nothing). MFC has them all over the place to help you catch some errors early on. Typically, any function that works with any kind of control or window will have something like:
ASSERT(::IsWindow(m_hWnd));
Meaning things will come to a screaming halt whenever the window or control isn't created properly.

Unless you provide us with more info, we can't help ya.

What does the code around the assert look like? Often there will be some text comments in the sourcefile telling you what may be the reason for that particular assert to trigger.
What code called the function that asserted?
  #3  
Old 12-Feb-2006, 01:18
coder coder is offline
New Member
 
Join Date: Jan 2006
Posts: 19
coder is on a distinguished road

Re: assertion failure


i solved the problem, thanks. In the program i create a splitter that divides the window into two parts and i create something in both parts, but my mistake was writing (2,1) instead of (1,2) when creating the splitter. So the program can not create the widgets properly.
 
 

Recent GIDBlogProblems with the Navy (Officers) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Debug assertion failed BrucePataki MS Visual C++ / MFC Forum 2 02-Nov-2008 06:01
Debug Assertion Failed! dlare9 C Programming Language 3 13-Nov-2005 23:18
MFC Assertion Failed patti_ MS Visual C++ / MFC Forum 3 21-Jul-2005 00:50
assertion error FooFighter MS Visual C++ / MFC Forum 1 17-May-2005 15:03
Non-local heaps and assertion errors Marius MS Visual C++ / MFC Forum 1 03-Sep-2004 05:45

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:29.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.