Crash on Calendar (Day Mode) Double Click |
Post Reply |
Author | |
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
Posted: 05 May 2008 at 7:04am |
Hi,
I trapped message for handling double click on Day Mode. My code is as follows: In constructor of my Calendar View CXTPNotifyConnection* ptrCalendarConn = GetCalendarCtrl().GetConnection(); ASSERT(ptrCalendarConn); if(!ptrCalendarConn) { return; } //To Trapp the DBLCLK on Calendar m_Sink.Advise(ptrCalendarConn, XTP_NC_CALENDARLBUTTONDBLCLICK, &CCalViewNew::OnEvent_Calendar); void CMyViewNew::OnEvent_Calendar(XTP_NOTIFY_CODE Event, WPARAM wParam, LPARAM lParam) { I am displaying my own dialog here for taking input data } I am getting CRASH at following location XTPNotifyConnection.cpp BOOL CXTPNotifyConnection::SendEvent(XTP_NOTIFY_CODE Event, WPARAM wParam , LPARAM lParam, DWORD dwFlags) { /* CRASH HERE*/ catch(...) { ASSERT(FALSE); TRACE(_T("EXCEPTION! CXTPNotifyConnection::SendEvent(Event = %d, wParam = %d, lParam = %d, dwFlags = %x)\n"), Event, wParam, lParam, dwFlags); } } Last call from my code before crash is: pMyTemplate->InitialUpdateFrame(pMyFrame, pMyDocument, bMakeVisible); Can you please advise. |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hello,
Can anybody please suggest the solution? Here is the call stack where it crashes on double clicking on Day View CXTPNotifyConnection::SendEvent(unsigned long 10634, unsigned int 13041917, long 0, unsigned long 0) line 195 + 34 bytes CXTPCalendarControl::SendNotification(unsigned long 10634, unsigned int 13041917, long 0) line 2711 CXTPCalendarControl::OnLButtonDblClk(unsigned int 1, CPoint {x=253 y=199}) line 734 + 27 bytes |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
Have you initialized COM in the beginning?
-- WBR, Serge |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hi,
Yes, I initialized COM at the beginning of my application. if (!AfxOleInit()) { return FALSE; } Still I am getting same error. Any solution? |
|
AndreiM
Moderator Group Joined: 18 August 2007 Status: Offline Points: 132 |
Post Options
Thanks(0)
|
Hello,
try to add
m_Sink.UnadviseAll();
to your view destructor.
|
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Thanks for your reply. But getting same problem.
Let me explain scenario: I am getting above mentioned Crash on double clicking particular Day Event. Waiting for your valuable feedback. |
|
AndreiM
Moderator Group Joined: 18 August 2007 Status: Offline Points: 132 |
Post Options
Thanks(0)
|
Try to comment your code inside CMyViewNew::OnEvent_Calendar to determine where problem is.
If problem still occur - this means that we have bad ptrSink pointer. Try to look in the debugger what is the object pointed by ptrSink. It looks like some object call Advise but does not call Unadvise when destroyed.
|
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hi,
Here is the location of Crash: XTPNotifyConnection.cpp BOOL CXTPNotifyConnection::SendEvent(XTP_NOTIFY_CODE Event, WPARAM wParam , LPARAM lParam, DWORD dwFlags) Line:- catch(...) { ASSERT(FALSE); TRACE(_T("EXCEPTION! CXTPNotifyConnection::SendEvent(Event = %d, wParam = %d, lParam = %d, dwFlags = %x)\n"), Event, wParam, lParam, dwFlags); } Event = 10634 Here is the call Stack:- |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hello Codejock Team,
I am waiting for your response for this and many more queries. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
We need some sample to reproduce problem. Can you modify our Calendar sample or try reproduce sample problem with it ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hi Oleg,
I am not able to reproduce the problem in CJ calendar sample. Also please answer following queries: 1) https://forum.codejock.com/forum_posts.asp?TID=12230&KW= 2) https://forum.codejock.com/forum_posts.asp?TID=12183&KW= Thanks in advance. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
try to minimize your application, reproduce it and attach it in support@codejock.com or here.
|
|
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 |