nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
34 stars 19 forks source link

After freeze websocket client doesnot receive data for a long time and suddenly continues to receive again. #1720

Closed yusufcananar closed 3 months ago

yusufcananar commented 4 months ago

I was playing with the websocket server features of trick and wanted to review the issues about it. While trying to reproduce the issue #1294 I find another problem that, After freeze websocket client doesnot receive data for a long time and suddenly continues to receive again.

Steps to reproduce:

sharmeye commented 4 months ago

The webserver functionality is not very well-supported for a variety of reasons, but we will look into this and determine what is causing the holdup. Thanks for bringing it to our attention.

yusufcananar commented 4 months ago

Do the web socket and socket variable servers use the same approach to gather variables from main sim thread? I haven't looked it up but aren't they using the same layer to collect data from sim?

sharmeye commented 4 months ago

They should use the same underlying functionality now (in fact this comment made me find an old issue that should've been closed like 2 years ago about this). We've identified the problem, and we're working on a fix right now.

Mrockwell2 commented 4 months ago

@Fjolnirr The linked branch and pull request should fix the issue. Please test it out and let me know if you still run into any problems.

yusufcananar commented 4 months ago

I have installed trick on this branch https://github.com/Mrockwell2/trick/tree/1720_Websocket_Freeze_Issue Still got the similar results. image

Mrockwell2 commented 4 months ago

I have installed trick on this branch https://github.com/Mrockwell2/trick/tree/1720_Websocket_Freeze_Issue Still got the similar results. image

Did you do a make clean before rebuilding?

yusufcananar commented 4 months ago

Of course. I have cloned your repo and installed everything from 0.

hchen99 commented 3 months ago

I tried on both Firefox & Safari (on Mac) with WS Experiments in SIM_cannon_numeric as #1294 suggested without any issue. Without the fix in this PR, I did see the web client didn't get data updates after freeze. However with the fix, the client received data updates after freeze without any issue. On the other hand, Chrome doesn't work for me for some reason. Those variables specified in the respective wsexp.html didn't even show up on Chrome. I didn't try postman though.

sharmeye commented 3 months ago

We also tried postman also, and didn't see any issues. We're going to close this one for now, but feel free to comment again if you still have issues.