Bug 108100 - Application crashing the while selecting the test case from the Tree Hierarchy in Test runner application
Summary: Application crashing the while selecting the test case from the Tree Hierarch...
Status: RESOLVED FIXED
Alias: None
Product: cppunit
Classification: Unclassified
Component: General (show other bugs)
Version:
(earliest affected)
1.13
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-26 04:53 UTC by Kumar
Modified: 2017-06-07 22:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
cppunit 1.13.3 release (1002.92 KB, application/gzip)
2017-06-07 22:47 UTC, Markus Mohrhard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kumar 2017-05-26 04:53:12 UTC
Hi,

We have used CPPUnit 1.13.2 version in Win 7, VS2008 32 bit application and it is working fine.

but we are facing issue with  CPPUnit 1.13.2 version to test our application in Win10 ,VS2013 64 bit . 

I have created the testing application using CPPUnit 1.13.2 and compilation success under Win10,VS2013 64 bit.

Testing tool is crashed (Memory access violation ) while selecting the test case from the TreeHierarchy Dlg under testrunner application.

I have debugged the application and found the issues as in below
File Name : $\cppunit-1.13.2\src\msvc6\testrunner\TreeHierarchyDlg.cpp
issue 1: 
Function Name : 
HTREEITEM TreeHierarchyDlg::addTest( CPPUNIT_NS::Test *test, 
                           HTREEITEM hParent )
{
  ....
  if ( hItem != NULL )
  {
    VERIFY( m_treeTests.SetItemData( hItem, (DWORD)test ) );
   ...
 }
  return hItem;
}
issue 2:
CPPUNIT_NS::Test *
TreeHierarchyDlg::findSelectedTest()
{
  HTREEITEM hItem = m_treeTests.GetSelectedItem();
  if ( hItem != NULL )
  {
    DWORD data;
    VERIFY( data = m_treeTests.GetItemData( hItem ) );
    ..
  }
  return NULL;
}

In both function DWORD should be DWORD_PTR as per the VS 2013 64 bit version.
Kindly let me know is this issue already fixed ? if yes let me know where to get the updated version.

Is CPPUnit support the Win10 ,VS2013 64bit version ?

Regards
Kumar Mamidi
Comment 1 Markus Mohrhard 2017-05-26 16:16:01 UTC
Hey,

so I removed the test runners in current cppunit master and 1.14.0 as they were mostly unmaintained.

I think your analysis is correct and these should be changed. I currently don't plan to release another cppunit 1.13 version but if you want I can push a fix to the repository. You would need to create your own tarball for using the version.
Comment 2 Kumar 2017-05-29 06:05:24 UTC
Hi,

Thanks for your information.
Yes, can you fix it and push to repository.

As per my understand with respect to legal rules, I should not update your code due to this I have raised  the bug.

is this CPPUnit 1.12.1 and 1.13.2 support VS2013 64 bit version ?

Regards
Kumar Mamidi
Comment 3 Xisco Faulí 2017-05-29 10:37:13 UTC
Moving to NEW
Comment 4 Kumar 2017-05-31 06:37:28 UTC
Hi,

Kindly let me know when it will be available ?

I have one more question as in below
Is CPPUnit 1.12.1 and 1.13.2 both support VS2013 64 bit version ?

Thanks for support.

Regards
Kumar MAmidi
Comment 5 Kumar 2017-06-02 08:55:16 UTC
Hi,

Kindly let me know the status.

Regards
Kumar
Comment 6 Markus Mohrhard 2017-06-07 22:31:24 UTC
> 
> Thanks for your information.
> Yes, can you fix it and push to repository.
> 
> As per my understand with respect to legal rules, I should not update your
> code due to this I have raised  the bug.
> 

The code is open source software so you are free to modify it. You are just required to share your changes to cppunit if you distribute binaries that include cppunit.

I'll push the change but don't plan to release a new cppunit 1.13.x release. You should create a local release for your work based on the code that you can use.
Comment 7 Markus Mohrhard 2017-06-07 22:35:55 UTC
Actually the two issues have been fixed in cppunit already nearly 3 years ago. See https://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=fbe10799cfbd765b5081443bf81b5e9ee3a3cbff for the commit that fixed the issues in cppunit 1.13

You should be able to just create a new release from the cppunit-1-13 branch head and get the fix.
Comment 8 Markus Mohrhard 2017-06-07 22:47:38 UTC
Created attachment 133907 [details]
cppunit 1.13.3 release