inet-framework / inet

INET Framework for the OMNeT++ discrete event simulator
https://inet.omnetpp.org
Other
435 stars 486 forks source link

echoDelay in TcpEchoApp causes a bug #991

Open Ganht99 opened 2 months ago

Ganht99 commented 2 months ago

I'm running General in examples/inet/tcpapp/omnetpp.ini and I'm running into a bug. I changed the application type on the server side to TcpEchoApp and added the echoDelay parameter to it. The ini is as followed.

> General
> network = TcpAppExample
> #abstract-config = true (requires omnet 7)
> *. *.numApps = 1
> *.client.app[0].typename = “TcpClientApp”
> *. client.app[0].io.connectAddress = “server”
> *.client.app[0].io.connectPort = 1000
> *.client.app[0].source.productionInterval = uniform(0s, 20s)
> *.client.app[0].source.packetLength = intuniform(100B, 200B)
> *.client.app[0].source.packetData = intuniform(0, 1)
> 
> #*.server.app[0].typename = “TcpServerApp”
> 
> *.server.app[0].typename = “TcpEchoApp”
> *.server.app[0].echoDelay = 200us
> *.server.app[0].listener.localPort = 1000

Then the following error is reported in the run. image

I looked at the source code and when echoDelay is set, it uses the schedulerAfter function and then reports an error in the csimplemodule.cc file because msg->getOwner()! =this

But I still don't understand the reason. How can I fix this bug?

levy commented 1 month ago

Usually it means some method on the stack lacks an Enter_Method() macro to switch the context from one module to the other.