![]()  | 
 
Assert when exiting a MDI app | 
 
    Post Reply  
   | 
  
| Author | |
   
   Alex  
   
   Groupie  
   Joined: 12 May 2004 Status: Offline Points: 54  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Assert when exiting a MDI appPosted: 22 June 2007 at 11:18am  | 
 
| 
   
    
   Hello,
 
   
  sometimes, when I close my app, I got an ASSERT : 
#ifdef _DEBUG 
void CHandleMap::RemoveHandle(HANDLE h) { // make sure the handle entry is consistent before deleting CObject* pTemp = LookupTemporary(h); if (pTemp != NULL) { // temporary objects must have correct handle values HANDLE* ph = (HANDLE*)((BYTE*)pTemp + m_nOffset); // after CObject ASSERT(ph[0] == h || ph[0] == NULL); if (m_nHandles == 2) ASSERT(ph[1] == h); <<<<<< } The stack is like : 
> mfc80d.dll!CHandleMap::RemoveHandle(void * h=0xb8012aca)  Line 218 + 0x1e bytes C++ It's a MDI app with 3 open documents / frame windows. 2 different doc types. 
Any ideas ? 
Thx ín advance, 
Alex  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 22 June 2007 at 1:27pm | 
 
| 
   
    
   Hi, 
 
   
  Do you have another thread that can cleanup MFC GDI maps? 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   Alex  
   
   Groupie  
   Joined: 12 May 2004 Status: Offline Points: 54  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 25 June 2007 at 3:15am | 
 
| 
   
    
   Hello,
 
   
  not really. I have only the main thread which resposible for the GUI. 
There are other threads, but they are not gui related. BTW, they are not active anymore when the app is about to exit. 
Do you think a parallel thread is causing the problem ? 
Alex 
    | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 26 June 2007 at 1:18am | 
 
| 
   
    Hi, Difficult to say without any code :( Send your mainfrm.cpp and full stack  to support@codejock.com. 
    | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |