Ticket #6832 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Mac SNSPowderReduction test failure

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: critical Milestone: Release 2.5
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Wenduo Zhou

Description

During development of #6650 the systems tests on the Mac started failing with a strange error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "../StressTestFramework/stresstesting.py", line 193, in execute
    self.runTest()
  File "/Users/mantidlog/Jenkins/workspace/is_test_osx-10.6_develop/SystemTests/AnalysisTests/SNSPowderRedux.py", line 182, in runTest
    NormalizeByCurrent=True, FinalDataUnits="dSpacing")
  File "/Users/mantidlog/Jenkins/workspace/is_clean_osx-10.6_develop/build/_CPack_Packages/SnowLeopard/PackageMaker/mantid-2.4.1409-SnowLeopard/Applications/MantidPlot.app/Contents/MacOS/mantidsimple.py", line 42, in algorithm_wrapper
    algm.execute()
RuntimeError: 'NoneType' object has no attribute 'id'

Nothing in SNSPowderReduction touches the id attribute and this occurs during the first call to any algorithm function.

Change History

comment:1 Changed 8 years ago by Martyn Gigg

  • Status changed from new to accepted

comment:2 Changed 8 years ago by Martyn Gigg

So I've tracked this down to the point in the Python layer where the code tries to figure out what type the object is when retrieving it from the ADS. In PythonInterface/mantid/kernel/src/Registry/DowncastRegistry.cpp there is this block of code (line 88):

boost::python::object id_as_py;
try
{
  id_as_py = value.attr("id")();
}
catch(boost::python::error_already_set&)
{
  return NULL;
}

On the Mac the exception is caught correctly indicating that lookup failed but it would seem that the Python exception handle has not been cleared so that the next call into boost::python after that (which is the call to DetermineChunking) thinks that there is an exception and raises it.

The other platforms are okay so I'm assuming this is a bug with either boost python on the Mac or a compiler bug.

comment:3 Changed 8 years ago by Martyn Gigg

Workaround a bug on the Mac in Python DowncastRegistry. Refs #6832

Fixes the SNSPowerReduction system test on the Mac.

Changeset: b5c5d69c1738303f88c01e89d245a601469e876c

comment:4 Changed 8 years ago by Martyn Gigg

Workaround a bug on the Mac in Python DowncastRegistry. Refs #6832

Fixes the SNSPowerReduction system test on the Mac.

Changeset: b5c5d69c1738303f88c01e89d245a601469e876c

comment:5 Changed 8 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

Branch: bugfix/6832_mac_python_downcastbug

Tester: Extremely difficult to test as it involves a change in the C code of the Python layer. Basically all of the tests should be passing obviously & the SNSPowerRedux test on the develop branch should be passing.

comment:6 Changed 8 years ago by Martyn Gigg

Workaround a bug on the Mac in Python DowncastRegistry. Refs #6832

Fixes the SNSPowerReduction system test on the Mac.

Changeset: b5c5d69c1738303f88c01e89d245a601469e876c

comment:7 Changed 8 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:8 Changed 8 years ago by Wenduo Zhou

  • Status changed from verifying to closed

System test SNSPowderRedux got passed by the change of codes committed by this ticket. It is so far the only case that exposed the issue reported in this ticket. Therefore, the ticket can be closed.

comment:9 Changed 8 years ago by Martyn Gigg

Workaround a bug on the Mac in Python DowncastRegistry. Refs #6832

Fixes the SNSPowerReduction system test on the Mac.

Changeset: b5c5d69c1738303f88c01e89d245a601469e876c

comment:10 Changed 7 years ago by Martyn Gigg

Workaround a bug on the Mac in Python DowncastRegistry. Refs #6832

Fixes the SNSPowerReduction system test on the Mac.

Changeset: b5c5d69c1738303f88c01e89d245a601469e876c

comment:11 Changed 7 years ago by Martyn Gigg

Workaround a bug on the Mac in Python DowncastRegistry. Refs #6832

Fixes the SNSPowerReduction system test on the Mac.

Changeset: b5c5d69c1738303f88c01e89d245a601469e876c

comment:12 Changed 7 years ago by Martyn Gigg

Workaround a bug on the Mac in Python DowncastRegistry. Refs #6832

Fixes the SNSPowerReduction system test on the Mac.

Changeset: b5c5d69c1738303f88c01e89d245a601469e876c

comment:13 Changed 7 years ago by Martyn Gigg

Workaround a bug on the Mac in Python DowncastRegistry. Refs #6832

Fixes the SNSPowerReduction system test on the Mac.

Changeset: b5c5d69c1738303f88c01e89d245a601469e876c

comment:14 Changed 7 years ago by Martyn Gigg

Workaround a bug on the Mac in Python DowncastRegistry. Refs #6832

Fixes the SNSPowerReduction system test on the Mac.

Changeset: b5c5d69c1738303f88c01e89d245a601469e876c

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7678

Note: See TracTickets for help on using tickets.