Ticket #1973 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Memory leak in convert units for EventWorkspaces?

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: major Milestone: Iteration 26
Component: Mantid Keywords:
Cc: vel@… Blocked By:
Blocking: Tester: Peter Peterson

Description


Change History

comment:1 Changed 10 years ago by Janik Zikovsky

  • Status changed from new to accepted

Vickie's Valgrind run finds it in AlgorithmFactory::create()

comment:2 Changed 10 years ago by Janik Zikovsky

I meant WorkspaceFactory::create

comment:3 Changed 10 years ago by Janik Zikovsky

(from Vickie)

Janik-

This memory link looks like it is the event list. Maybe the destructor is not working.

==8638== 207,570,656 (150,978,944 direct, 56,591,712 indirect) bytes in 1,179,523 blocks are definitely lost in loss record 27,312 of 27,314

==8638== at 0x4C27CC1: operator new(unsigned long) (vg_replace_malloc.c:261)

==8638== by 0x2288C339: Mantid::DataObjects::EventWorkspace::init(int const&, int const&, int const&) (EventWorkspace.cpp:85)

==8638== by 0x62BB85B: Mantid::API::MatrixWorkspace::initialize(int const&, int const&, int const&) (MatrixWorkspace.cpp:65)

==8638== by 0x629FBD2: Mantid::API::WorkspaceFactoryImpl::create(std::string const&, int const&, int const&, int const&) const (WorkspaceFactory.cpp:191)

==8638== by 0x22FD94B1: Mantid::Algorithms::AlignDetectors::execEvent() (AlignDetectors.cpp:336)

==8638== by 0x22FDA829: Mantid::Algorithms::AlignDetectors::exec() (AlignDetectors.cpp:261)

==8638== by 0x62541EA: Mantid::API::Algorithm::execute() (Algorithm.cpp:253)

==8638== by 0x22FF9D13: Mantid::Algorithms::DiffractionEventCalibrateDetectors::intensity(double, double, double, double, double, double, std::string, std::string, std::string, std::string) (DiffractionEventCalibrateDetectors.cpp:176)

==8638== by 0x22FFD78F: Mantid::Algorithms::gsl_costFunction(gsl_vector const*, void*) (DiffractionEventCalibrateDetectors.cpp:68)

==8638== by 0x5CAA7A2: ??? (in /home/vel/lib/libgsl.so.0)

==8638== by 0x22FF80F5: Mantid::Algorithms::DiffractionEventCalibrateDetectors::exec() (DiffractionEventCalibrateDetectors.cpp:384)

comment:4 Changed 10 years ago by Janik Zikovsky

Look for it in getTofs() which returns a pointer!

comment:5 Changed 10 years ago by Russell Taylor

(In [7953]) Remove a memory leak in ConvertUnits for EventWorkspaces. Re #1973. Was supposed to fix crash if no instrument (Re #2002), but changes to geometry in connection with #2010 mean that the fix that worked yesterday doesn't work today. This is also leading up to a refactor to remove duplicated code - Re #1833.

comment:6 Changed 10 years ago by Russell Taylor

(In [7956]) Forgot to check in modified test. Re #1973.

comment:7 Changed 10 years ago by Janik Zikovsky

(In [7972]) Refs #1973 and #2038: Fixed memory leak due to eventWorkspace->CopyDataFrom()

comment:8 Changed 10 years ago by Janik Zikovsky

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

(In [7985]) Fixes #1973 and #2038: fairly confident that there is no actual memory leak in Linux or Windows, and that the issue is with improper memory use reporting.

comment:9 Changed 10 years ago by Nick Draper

  • Milestone changed from Iteration 26 to Iteration 27

Bulk move of tickets to iteration 27, if your ticket is essential for Iteration 26 then move it back.

comment:10 Changed 10 years ago by Nick Draper

  • Milestone changed from Iteration 27 to Iteration 26

Sorry I didn't mean to move these ones reverting back to It 26

comment:11 Changed 10 years ago by Peter Peterson

  • Status changed from verify to verifying
  • Tester set to Peter Peterson

comment:12 Changed 10 years ago by Peter Peterson

  • Status changed from verifying to closed

This was done correctly.

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2820

Note: See TracTickets for help on using tickets.