Ticket #9048 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

small win bugs & Coverity code quality

Reported by: Alex Buts Owned by: Alex Buts
Priority: major Milestone: Release 3.2
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Nick Draper

Description

Release with debug mode ticket has been broken and need fixing for windows profiling.

Coverity reports various errors in code I wrote -- most are not important but generate noise. Other look real -- this also should be dealt with.

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

comment:2 Changed 7 years ago by Alex Buts

  • Status changed from assigned to inprogress

refs #9048 Fixing code which breaks Win comp in RelWithDebug mode

for Curve fitting though it can break Mac build in return.

Changeset: 40cd26017fbbe220446f6dea8aa07753ff36943e

comment:3 Changed 7 years ago by Alex Buts

refs #9048 should fix one of Coverity false alarms

Changeset: 76b9cbc533596a544543a644b7a74ccee986b6ba

comment:6 Changed 7 years ago by Alex Buts

refs #9048 Coverity noise in IMDEventWorkspace

https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11024017&defectInstanceId=3877305&mergedDefectId=528995 initialized m_FileNeedsUpdating, though I do not think it is necessary/used any more.

Changeset: efb7a6ae355cec33f7868895487ae187eb5d5d25

comment:7 Changed 7 years ago by Alex Buts

refs #9048 Trying to fix Coverity noise in ConvToMDSelector

at https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11025316&defectInstanceId=3876567&mergedDefectId=528357

do not understand what Coverity is complaining about -- default occurs if neither EventWS nor Matrix2D ws is provided (e.g. Table) Rewritten in a way which hopefully is more clear for Coverity

Changeset: a56df7928eb0c6240df6be7d30762a71c2ee5a99

comment:8 Changed 7 years ago by Alex Buts

refs #9048 Avoid unnecessary shared pointer increment

Changeset: f4c9f97385540130b7ff00305b9d22cac835b96b

comment:9 Changed 7 years ago by Alex Buts

comment:10 Changed 7 years ago by Alex Buts

refs #9048 Coverity noise ? in CoordTransformAffine

https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11025303&defectInstanceId=3876983&mergedDefectId=528902

It may be actually a real memory leak -- not sure how delete [] figures out the range of array it deallocates and it is not standardized. But the changes should make Coverity happy for very low price of additional pointer stored in the class.

Changeset: 25a4168b7381302b82fcd76215e2cae626b119d3

comment:11 Changed 7 years ago by Alex Buts

refs #9048 Ubuntu does not like this kind of default algorithm

, so need to get rid of it. Defaults are not used in its present form anyway.

Changeset: 2adf693f29dd9d387ed84f2e7c7cfaf0b0398a98

comment:12 Changed 7 years ago by Alex Buts

refs #9048 Fixing build

Changed form is actually used in the test but this can be moderated.

Changeset: 49f0867e4182c5a71ecdb0bd75ed000eab71915a

comment:13 Changed 7 years ago by Alex Buts

refs #9048 removed unused header from the BoxController.h

Changeset: de7723e6e754805494e46e0d54f90480b1ba468e

comment:14 Changed 7 years ago by Alex Buts

refs #9048 Coverity bug in ConvToMDEventsWS

https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11025021&defectInstanceId=3876993&mergedDefectId=528900 It looks like real resource leak, fixed by wrapping the thread scheduler into unique pointer.

Changeset: c01e8bb9f3a52745b23fb3b035199ab948067581

comment:16 Changed 7 years ago by Alex Buts

refs #9048 Coverity bug?

https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11025833&defectInstanceId=3878261&mergedDefectId=528972 not sure if Coverity just mean in this case, but have just rewritten this function to accept missing experiment info entries. Do not think its logic is tested anywhere.

Changeset: 5e72cc6cd14ce5a677e0d00a0ad29ca5ba359c96

comment:19 Changed 7 years ago by Alex Buts

refs #9048 COverity noise for MDTransfModQ.h

https://scan6.coverity.com:8443/reports.htm#v29240/p10083/fileInstanceId=11026160&defectInstanceId=3876763&mergedDefectId=528801 do not understand this message and do not see any comma. Moved operation into from h to cpp in the hope to quiet this message.

Changeset: 56beb13e9339fc6e0ff41c362024effaafe2c4fb

comment:24 Changed 7 years ago by Alex Buts

refs #9048 nasty conflict with develop

Merge branch 'bugfix/9048_smallWinBugs' into develop

Conflicts:

Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UnitsConversionHelper.h Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp Code/Mantid/Framework/MDEvents/src/UnitsConversionHelper.cpp

Changeset: 4399e00fb418421fcedc487a1f224de91ca7819f

comment:25 Changed 7 years ago by Alex Buts

refs #9048 still lefower from merge conflict with develop.

Changeset: 3041c76ca454f588f72776fc51425bd0b775bc06

comment:26 Changed 7 years ago by Alex Buts

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

I went through all code I am familiar with in Coverity and tried to fix all bugs it reports. Most of these bugs are noise (marked as noise at commits) but some worth minor refactoring. To see initial reports in Coverity by clicking on commit link you should be logged into Coverity.

Testing by code review only.

I have also fixed Release with debug information mode on Windows (first commit) rewriting the code which crashes Microsoft compiler in this mode. Can be tested on windows or just code reviewed to ensure that the results are as before (unit and system tests confirm so).

Last edited 7 years ago by Alex Buts (previous) (diff)

comment:27 Changed 7 years ago by Martyn Gigg

refs #9048 nasty conflict with develop

Merge branch 'bugfix/9048_smallWinBugs' into develop

Conflicts:

Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UnitsConversionHelper.h Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp Code/Mantid/Framework/MDEvents/src/UnitsConversionHelper.cpp

Changeset: 3de64c67e3768b7790567192206a14840bcf220b

comment:28 Changed 7 years ago by Martyn Gigg

refs #9048 still lefower from merge conflict with develop.

Conflicts:

Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/UnitsConversionHelper.h Code/Mantid/Framework/MDEvents/src/UnitsConversionHelper.cpp

Changeset: 0eeeb850ed36616872c0fd4390dcc7d39ce57508

comment:29 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to reopened
  • Resolution fixed deleted

There are some compiler warnings related to fixes in MDTransfModQ. See here

comment:30 Changed 7 years ago by Alex Buts

  • Status changed from reopened to inprogress

refs #9048 GCC warnings

Changeset: 53baf578459049085c0843577b39212ce1329907

comment:31 Changed 7 years ago by Alex Buts

refs #9048 Fixing conflict with develop

Merge branch 'bugfix/9048_smallWinBugs' into develop

Conflicts:

Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp

Changeset: aee6916e5b43d5cc4cff46008b17739f5dd2a9af

comment:32 Changed 7 years ago by Alex Buts

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

comment:33 Changed 7 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:34 Changed 7 years ago by Nick Draper

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/9048_smallWinBugs'

Full changeset: c2fff94a55bd7437e94ee2d53ad8ec658604a44d

comment:35 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9891

Note: See TracTickets for help on using tickets.