Debug assert error while using DoModal() ?? please help
-
Hi here is my code CDedJed d(this); //passes through constructor and member functions as well d.Domodal(); // goes into the windows files wincore.cpp dlgcore.cpp dbgrpt.cpp gives out debug assert error at the following lcation ->!::PeekMessage(pMsg, NULL, NULL, NULL, PM_NOREMOVE) -> VERIFY(RunModalLoop(dwFlags) == m_nModalResult); -> domodal(); FYI: resource IDs which are loading properly..checked with resource.h help on this regard Neel
-
Hi here is my code CDedJed d(this); //passes through constructor and member functions as well d.Domodal(); // goes into the windows files wincore.cpp dlgcore.cpp dbgrpt.cpp gives out debug assert error at the following lcation ->!::PeekMessage(pMsg, NULL, NULL, NULL, PM_NOREMOVE) -> VERIFY(RunModalLoop(dwFlags) == m_nModalResult); -> domodal(); FYI: resource IDs which are loading properly..checked with resource.h help on this regard Neel
-
thanks for ur reply i use gtalk, got no skype setup/accnt. iam online urneel@gmail.com FYI: This error occur only in debug mode but not in release mode. here is debug details VERIFY(RunModalLoop(dwFlags) == m_nModalResult); ASSERT(ContinueModal()); // pump message, but quit on WM_QUIT if (!AfxPumpMessage()) { AfxPostQuitMessage(0); return -1; } BOOL AFXAPI AfxPumpMessage() { CWinThread *pThread = AfxGetThread(); if( pThread ) return pThread->PumpMessage(); // here i end up with debug assert error else return AfxInternalPumpMessage(); } regards Neel
-
thanks for ur reply i use gtalk, got no skype setup/accnt. iam online urneel@gmail.com FYI: This error occur only in debug mode but not in release mode. here is debug details VERIFY(RunModalLoop(dwFlags) == m_nModalResult); ASSERT(ContinueModal()); // pump message, but quit on WM_QUIT if (!AfxPumpMessage()) { AfxPostQuitMessage(0); return -1; } BOOL AFXAPI AfxPumpMessage() { CWinThread *pThread = AfxGetThread(); if( pThread ) return pThread->PumpMessage(); // here i end up with debug assert error else return AfxInternalPumpMessage(); } regards Neel
-
CDed.h file ----------------- class CDedJed : public CDialog { // Construction public: CDedJed(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CDedJed) enum { IDD = IDD_DED_JED_DLG }; //}}AFX_DATA // Overrides //{{AFX_VIRTUAL(CDedJed) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL public: void XX(); void YY(); public: int m_TT; // Implementation protected: // Generated message map functions //{{AFX_MSG(CDedJed) virtual void OnOK(); virtual BOOL OnInitDialog(); afx_msg void OnWindowPosChanged(LPWINDOWPOS lpWndPos); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #endif // !defined(AFX_DELETEJED_H__20D49F0D_8F35_4A61_A493_1F332F85A293__INCLUDED_) CDedJed.cpp file ------------ ///////////////////////////////////////////////////////////////////////////// // CDedJed dialog CDedJed::CDedJed(CWnd* pParent /*=NULL*/) : CDialog(CDedJed::IDD, pParent) { //{{AFX_DATA_INIT(CDedJed) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void CDedJed::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDedJed) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDedJed, CDialog) //{{AFX_MSG_MAP(CDedJed) ON_WM_WINDOWPOSCHANGED() //}}AFX_MSG_MAP END_MESSAGE_MAP()
-
CDed.h file ----------------- class CDedJed : public CDialog { // Construction public: CDedJed(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CDedJed) enum { IDD = IDD_DED_JED_DLG }; //}}AFX_DATA // Overrides //{{AFX_VIRTUAL(CDedJed) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL public: void XX(); void YY(); public: int m_TT; // Implementation protected: // Generated message map functions //{{AFX_MSG(CDedJed) virtual void OnOK(); virtual BOOL OnInitDialog(); afx_msg void OnWindowPosChanged(LPWINDOWPOS lpWndPos); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #endif // !defined(AFX_DELETEJED_H__20D49F0D_8F35_4A61_A493_1F332F85A293__INCLUDED_) CDedJed.cpp file ------------ ///////////////////////////////////////////////////////////////////////////// // CDedJed dialog CDedJed::CDedJed(CWnd* pParent /*=NULL*/) : CDialog(CDedJed::IDD, pParent) { //{{AFX_DATA_INIT(CDedJed) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void CDedJed::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDedJed) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDedJed, CDialog) //{{AFX_MSG_MAP(CDedJed) ON_WM_WINDOWPOSCHANGED() //}}AFX_MSG_MAP END_MESSAGE_MAP()
Comment out
OnWindowPosChanged()
. What happens inOnInitDialog()
?"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Comment out
OnWindowPosChanged()
. What happens inOnInitDialog()
?"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
I removed windowpos function , Oninit function has local variables initialization nothing other than that. FYI: I found all reource IDs have been duplicated from other workspace to current work space and trying to display the dialog. could this be a probelm ?
-
I removed windowpos function , Oninit function has local variables initialization nothing other than that. FYI: I found all reource IDs have been duplicated from other workspace to current work space and trying to display the dialog. could this be a probelm ?
Neels wrote:
Oninit function has local variables initialization nothing other than that.
What does it look like?
Neels wrote:
could this be a probelm ?
I suspected that until you showed that
DoDataExchange()
was empty."Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Neels wrote:
Oninit function has local variables initialization nothing other than that.
What does it look like?
Neels wrote:
could this be a probelm ?
I suspected that until you showed that
DoDataExchange()
was empty."Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Neels wrote:
Oninit function has local variables initialization nothing other than that.
What does it look like?
Neels wrote:
could this be a probelm ?
I suspected that until you showed that
DoDataExchange()
was empty."Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
No...... resource is not causing the problem... what could be the case which asserts in debug but no in release??? my work fully stopped with this bug. :((
-
No resource is not causing the problem... what could be the case which asserts in debug but no in release??? my work fully stopped with this bug. :((
Neels wrote:
what could be the case which asserts in debug but no in release???
Assertions do not exist in Release mode.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne