[Bug]ReportAddRecordEx bug (with repro steps) |
Post Reply |
Author | |
apautrot
Groupie Joined: 16 April 2009 Location: France Status: Offline Points: 18 |
Post Options
Thanks(0)
Posted: 24 April 2009 at 10:44am |
Launch the ReportAddRecordEx sample, click on "Add records" button. Wait for all the items to be added.
Select the first row which display text "Column 1: Row - 1, Col - 1"). This row is now displayed in the header rows section. Click any cell of this header row, then click on another one. This produce a NULL pointer access in the method CReportControl::OnFocusChanging, its first parameter pNewRow being NULL. |
|
Win 7 x64 VS 2008 CJ 15.13 |
|
apautrot
Groupie Joined: 16 April 2009 Location: France Status: Offline Points: 18 |
Post Options
Thanks(0)
|
This bug is still in the version 13.1.
At least, you should reply to people trying to help you finding bugs. Are you only interested in the money I spent buying your products ? |
|
Win 7 x64 VS 2008 CJ 15.13 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
This is not 13.1 Core error - this is Sample error - not checked pointer. Coming from old time. Thanks for post.
BOOL CReportControl::OnFocusChanging(CXTPReportRow* pNewRow, CXTPReportColumn* pNewCol) { //it was no checking for pNewRow = NULL !!!
CXTPReportControl::OnFocusChanging(pNewRow, pNewCol);
// apply changes
CXTPReportRow* pFocusedRow = GetFocusedRow(); if (pFocusedRow && pFocusedRow->GetType() == xtpRowTypeHeader &&
pNewRow && pNewRow != GetFocusedRow() && m_pFocusedRecord && pNewRow->GetType() != xtpRowTypeHeader)
*(CMessageRecord*)m_pFocusedRecord = *(CMessageRecord*)pFocusedRow->GetRecord(); UpdateRecord(m_pFocusedRecord, FALSE); } Now it works properly. Sample source in SVN updated |
|
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 |