Hi,
I am having problem getting my simulation to run. I have two classes ADC and VoltageMonitor. ADC has a private attribute val:int and VoltageMonitor has a private attribute voltage:int. I want Voltagemonitor to use the operation readADCVal():int in ADC to update it's own attribute via ports typed by an interface:

I have a stm in VoltageMonitor that just calls readADCVal() at it's initial transition and sets its attribute voltage to the returned value:

and the implementation of readADCVal():int is like this:

When I press Full Build I get the following error:

I then decided to simplify things a bit in order to make sure that I could get the behaviour that I wanted by instead of using ports and interfaces only use associations and make sure that I at least could call the operation in ADC from VoltageMonitor. So instead of readADCVal():int I created a printVal() operation and instead of a private attribute val I changed it to public:

printVal() has the following implementation:

I also updated to stm in VoltageMonitor:

Now when I do Full Build, i do not get any errors, however as soon as I run the simulation i just stops and I get this message in the console:

DefaultComponent.exe.stackdump looks like this:

I then simplified it even further and removed the val from the implementation of the printVal() operation:

Now the simulation works:

Questions:
Do you know why I get the Cygwin exception above?
How can I modify the model to get the behaviour that I wanted in the first place?
Thanks!
Wonderful! Thank you so much!