Project

General

Profile

Bug #2049

<Run Simulator> may create a corrupted-copy of the original model

Added by Anonymous over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
-
Start date:
07/15/2014
Due date:
% Done:

100%

Estimated time:

Description

If a model contains an input port with array type(eg. int3) and an initial value-list with duplicated items(e.g [1,1,1]), when the model is sent to simulator via "Run Simulator", the actual simulated input port contains a corrupted init.value with only unique items(e.g. [1]).

This bug happens when LibraryService calls EcoreUtil.copy() to create a copy for the select model/component. The root cause is because many expression terms override hash code() and equals() method. During the copy, the EcoreUtil thinks the duplicated elements (e.g. the 2nd and 3rd item "1") are already copied and therefore reused the first copied item.

We need rethink, whether we need overrides hash code() and equals() method.

History

#1 Updated by Anonymous over 6 years ago

  • Status changed from New to Resolved
  • Assignee changed from Anonymous to Anonymous
  • % Done changed from 0 to 100

I made a dirty retro-engineering hack, but should work, please test.

#2 Updated by Anonymous over 6 years ago

  • Status changed from Resolved to Closed

fix verified

Also available in: Atom PDF