Ticket #95 (closed defect: fixed)

Opened 13 years ago

Last modified 13 years ago

Is the logging of Duplicate accurate about the MO pointer?

Reported by: michelpons Owned by: michaelhalloran
Priority: critical Milestone: 2.1
Component: COLoggers Version: Development
Keywords: DuplicateMOs Cc:

Description

When analyzing logs obtained with COLTT 1.08.5 with two different PMEs and the same PMC (the CPP Mixer Splitter example), I have noticed that within the Calculate method, the Duplicate method is called twice (because there are two feeds to the UO) and each time the pointer returned appears as the same. This is worrying me because in fact the previous MO is not released before a new duplicate is done according to the following excerpt of the CPP Mixer Splitter code:

bool Duplicate(Material &m,wstring &error)
{ATLASSERT(materialObject); class should be instanciated properly
create a new material object
MaterialObjectWrapper *MO=materialObject->Duplicate(error); <------- NEW ONE IS OBTAINED
if (!MO) return false ; fail
clean up old MO in m
if (m.materialObject) m.materialObject->Release(); <------- OLD ONE IS RELEASED
set new
m.materialObject=MO;
ok
return true ;

}

So while this has no consequence really for the CPP Mixer Splitter it is of interest to know if the pointer mentioned in the log is the real pointer or one pertaining to the CO logger. Could this be assessed?

Attachments

apmain_090811_161032.log (212.4 KB) - added by michelpons 13 years ago.
Log file obtained in Aspen Plus 7.3 with CPP Mixer
proii_090811_085108.log (192.2 KB) - added by michelpons 13 years ago.
Log file obtained with PRO/II 9.1 and CPP Mixer Splitter
proii_093011_170753.log (181.8 KB) - added by michelpons 13 years ago.
Log file obtained with commit 212

Change History

Changed 13 years ago by michelpons

Log file obtained in Aspen Plus 7.3 with CPP Mixer

Changed 13 years ago by michelpons

Log file obtained with PRO/II 9.1 and CPP Mixer Splitter

comment:1 Changed 13 years ago by michelpons

  • Milestone set to 2.01

comment:2 Changed 13 years ago by anonymous

  • Priority changed from major to critical

comment:3 Changed 13 years ago by michaelhalloran

  • Status changed from new to closed
  • Resolution set to fixed

No the logging of Duplicate was not accurate about the pointer. Commit 212 fixes the problem, but it needs testing because my tests don't seem to call Duplicate.

comment:4 Changed 13 years ago by michelpons

I made a test with commit 212 in PRO/II 9.1 using the CPP MixerSplitter example. As per the attached log file, the Duplicate calls within Calculate return different pointers now so the issue has been indeed resolved.

Changed 13 years ago by michelpons

Log file obtained with commit 212

Note: See TracTickets for help on using tickets.