|  | 
| Access Violation in CXTPTabManager::DeleteItem | 
| Post Reply   | 
| Author | |
| jayhamiltoniv   Newbie   Joined: 24 March 2009 Location: United States Status: Offline Points: 3 |  Post Options  Thanks(0)  Quote  Reply  Topic: Access Violation in CXTPTabManager::DeleteItem Posted: 24 March 2009 at 3:37pm | 
| 
   Hello, 
 We currently are seeing a crash when using the tab manager, are there any current workarounds for this?  The comments describe the issue. Thanks, Jay Version 9.7 - June 25, 2005 BOOL CXTPTabManager::DeleteItem(int nItem) { if (nItem < 0 || nItem >= GetItemCount()) return FALSE; BOOL bSelected = m_pSelected == m_arrItems[nItem];                 m_arrItems[nItem]->InternalRelease();                                               // m_pSelected now points to deleted memory m_arrItems.RemoveAt(nItem); if (bSelected) {                                 SetCurSel(nItem);           // Calls Setfocus on different tab.  If the tab’s OnFocus handler                                                                                  // calls GetSelectedItem, there is a possiblility of a crash.                                                                                 //                                                                                 // Additionally, if a WM_PAINT message is handled by the CXTTabManager                                                                                 // as part of the OnFocus (e.g. a message box displays in the OnFocus handler)                                                                                 // Codejock will try to use m_pSelected and crash. } OnItemsChanged(); return TRUE; } | |
|  | |
| Oleg   Senior Member   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |  Post Options  Thanks(0)  Quote  Reply  Posted: 25 March 2009 at 2:27am | 
| Hi, You can modify your sources and add if (bSelected) m_pSelected = NULL; - and rebuild. | |
| 
     Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS | |
|  | |
| jayhamiltoniv   Newbie   Joined: 24 March 2009 Location: United States Status: Offline Points: 3 |  Post Options  Thanks(0)  Quote  Reply  Posted: 10 April 2009 at 6:28pm | 
| 
   We did apply that fix, but now when upgrading to version 13 the same crash is still present so we have to apply the correction again.  Are there any plans to correct the crash? uploads/20090410_182709_codejock_tabcon.zip Thanks, Jay | |
|  | |
| 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 |