Ticket #8511 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Fix unreleased use of POCO::XML document and nodelists in VATES

Reported by: Karl Palmen Owned by: Federico M Pouzols
Priority: major Milestone: Release 3.3
Component: Framework Keywords: Maintenance
Cc: Blocked By:
Blocking: #10637 Tester: Harry Jeffery

Description

In the code of VATES I found four cases of POCO::XML document or nodelist objects being created, but not released. This could cause memory leakage. Fix by using AutPtr for the objects.

They are VatesSimpleGui/QTWidgets/GeometryParser, VatesAPI/vtkDataSetToImplicitFunction, VatesAPI/vtkDataSetToWsLocation and VatesAPI/vtkDataSetToWsName.

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

bulk move to assigned at the into of the triage step

comment:2 Changed 6 years ago by Federico M Pouzols

  • Owner set to Federico M Pouzols
  • Status changed from assigned to inprogress
  • Milestone changed from Backlog to Release 3.3

comment:3 Changed 6 years ago by Federico M Pouzols

  • Keywords Maintenance added

comment:4 Changed 6 years ago by Federico M Pouzols

  • Blocking 10637 added

comment:5 Changed 6 years ago by Federico Montesino Pouzols

Use Poco::AutoPtr for xml docs, node lists and new elements, re #8511

Changeset: 113fa93eb4c61ae594fa1dfd192e6f219dbef749

comment:6 Changed 6 years ago by Federico Montesino Pouzols

More Poco::AutoPtr in case, re #8511

Changeset: 32cf5755f9ed00beea3c6f8e99ef66acb2450bab

comment:7 Changed 6 years ago by Federico Montesino Pouzols

Use Poco::AutoPtr in several vtkDataSet... classes, re #8511

Changeset: 1164d8b6f0eb11df853d84a882d53079ab6af0d3

comment:8 Changed 6 years ago by Federico Montesino Pouzols

missing poco header, re #8511

Changeset: dce10c3c0cc3761b67cf3ebab204062d471308cc

comment:9 Changed 6 years ago by Federico M Pouzols

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

Note that this ticket is one of several siblings that have to do with Poco XML objects and memory leaks. For the overall picture, please see #10637. All documents, node lists, and new elements being created should be released, and this should be done preferably via Poco's AutoPtr rather than calls to relase() methods.

The cpp/classes modified are:

  • vtkDataSetToImplicitFunction.cpp, vtkDataSetToWsName.cpp and vtkDataSetToWsLocation.cp in VatesAPI
  • GeometryParser.cpp in VatesSimpleGui/QtWidgets/

To test:

  • review code changes
  • check that tests pass, especially the suites VatesAPITest, Also, at least one system test (TobyFitResolutionSimulationTest.py) could be disrupted.

Note that in principle you'll need ~16GB to run the TobyFit unit test. I tricked it to run with <=12GB (in requiredMemoryMB(self)) and it seemed to work well.

To test this you'll need to compile VATES, if you're not usually compiling it. See http://www.mantidproject.org/Building_VATES for details. You'll most likely need to add -DParaView_DIR=/path/to/paraview/build/ or similar to your cmake command and/or options.

comment:10 Changed 6 years ago by Harry Jeffery

  • Status changed from verify to verifying
  • Tester set to Harry Jeffery

comment:11 Changed 6 years ago by Harry Jeffery

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/8511_unreleased_poco_xml_document_nodelists_in_vates'

Full changeset: a95fadf4d71dfdbba4c0f143577ee9ca1682b7df

comment:12 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9355

Note: See TracTickets for help on using tickets.