Opened 7 years ago
Last modified 6 years ago
#2863 new defect
SingleObjectiveBasicProblem causes a virtual method call in the constructor
Reported by: | abeham | Owned by: | |
---|---|---|---|
Priority: | medium | Milestone: | HeuristicLab 3.3.17 |
Component: | Optimization | Version: | |
Keywords: | Cc: |
Description
In the constructor several operators are added. Each call to Operators.Add causes the OperatorsChanged event to fire which in turn calls OnOperatorsChanged - a virtual method.
In a derived class thus one could see code being executed before its constructor is finished.
Change History (2)
comment:1 Changed 7 years ago by abeham
comment:2 Changed 6 years ago by gkronber
- Milestone changed from HeuristicLab 3.3.16 to HeuristicLab 3.3.17
Note: See
TracTickets for help on using
tickets.
Discussion with mkommend:
The issue mostly occurs when a problem defines own operators that need to be wired to one of the problem's own parameters.
We agreed on using a workaround in the problem for the meantime. A change in the way initial operators are defined is tricky.