Problem with costumized data reading in state machines

Hello everyone,
I want to work with an event data port in a rtt state machine script. The type of the data port is an own struct. I managed to transport the struct to the script. Waiting for new data also works. But the data I receive is not the data I sent. I can only receive the default constructor values no matter what I do. When I receive new data manually with the deployer everything is fine. There is no difference if I generate the typekit by my own or with the typegen command.
I appended a minimal component setup which reproduces the problem. One with an own setup of the typekit. Another with the preparation for using typegen (typegen command in README_TYPEGEN).
Here are some configuration options which I already tried to find the problem source.
Current configuration: Ctrl sends periodically data and Receiver receives data over the state machine in state SETUP.
Output when executable started: msg: received failure 4 false (periodically)
Wanted output: msg: received success 42 false
New configuration with same result: comment sending in updateHook of Ctrl (no automatic sending)
Start executable and send data with the following sequence over the deployer
var CmdType data
data.cmd = 42
cmdOutport.write(data)
output over state machine: msg: received failure 4 0
Wanted output: msg: received success 42 false
New configuration with correct behavior: comment sending in updateHook of Ctrl (no automatic sending),
Comment complete transition in SETUP state (no automatic receiving)
Start executable and send and receive data with following sequence over the deployer
var CmdType data
data.cmd = 42
cmdOutport.write(data)
var CmdType receivedData
Receiver.printMsg("" + receivedData.cmd)
Receiver.cmdInport.read(receivedData)
Receiver.printMsg("" + receivedData.cmd)
output over deployer: msg: 4 ,msg: 42
That's the correct output. 4 is the default value and 42 the received data. But why does it only work like this. In my opinion the configurations before do the same only over scripts and component code and not over the deployer. At least in each configuration I receive data. So the port is working. But it seems the serialization of my own data type only works in the last configuration but I can't find a reason for that behavior.
Now some really strange addons:
Addon configuration 1:
Deployer sequence after few received data:
Stop
var CmdType receivedData
Receiver.cmdInport.read(receivedData)
Receiver.printMsg("" + receivedData.cmd)
Output: even when oldData is received: the value is corret with 42. BUT the state machine always reads 4?!?!
Addon configuration 2: when reading inputport after script reacted the correct data will be received:
var CmdType receivedData
Receiver.cmdInport.read(receivedData)
Receiver.printMsg("" + receivedData.cmd)
Output: even when oldData is received: the value is corret with 42. BUT the state machine always reads 4?!?!
BUT:
When repeating reading in script the same wrong result. (configure script with following else and repeat configuration 1 or 2)
else
{
printMsg("received failure " + data.cmd + " " + data.status);
cmdInport.read(data)
printMsg("received failure " + data.cmd + " " + data.status);
}

So it seems the read operation of the deployer is working differently?!?!
Do you know that problem and do you have a solution? Hope, you can help. I'm looking for a long time now, and I can't make any head or tail out of that behavior.
I'm working with orocos version 2.6.
Thanks
Sandra