![]() |
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)
Quote Reply
Topic: Crash on Calendar (Day Mode) Double ClickPosted: 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)
Quote Reply
Posted: 08 May 2008 at 4:19am |
|
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)
Quote Reply
Posted: 10 July 2008 at 5:28pm |
|
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)
Quote Reply
Posted: 08 September 2008 at 3:10am |
|
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)
Quote Reply
Posted: 09 September 2008 at 7:50am |
|
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)
Quote Reply
Posted: 09 September 2008 at 10:46am |
|
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)
Quote Reply
Posted: 09 September 2008 at 11:35am |
|
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)
Quote Reply
Posted: 10 September 2008 at 1:47am |
|
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)
Quote Reply
Posted: 23 September 2008 at 5:11am |
|
Hello Codejock Team,
I am waiting for your response for this and many more queries. ![]() |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 September 2008 at 2:09am |
|
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)
Quote Reply
Posted: 25 September 2008 at 12:21am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 25 September 2008 at 2:06am |
|
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 |