crypto-chassis / ccapi

A header-only C++ library for interacting with crypto exchanges. Bindings for Python, Java, C#, Go, and Javascript are provided.
https://discord.gg/b5EKcp9s8T
MIT License
555 stars 192 forks source link

segmentation fault, wsConnectionPtr null pointer in onPongByMethod #432

Closed nelyajizi closed 10 months ago

nelyajizi commented 10 months ago

Describe the bug the subscription is working fine but after few seconds, I got a segmentation fault in onPongByMethod while he is trying to use wsConnectionPtr: this->lastPongTpByMethodByConnectionIdMap[wsConnection.id][method] = timeReceived; the bug appears with the version v6.4.4, when using the version v5.45.5, there is noticed no issue .. To Reproduce Steps to reproduce the behavior: use 6.4.4: I subscribed to Kucoin and Ascendex for marketData (depth=5) and trades in addition of sending a request within the same session once every n seconds... after the subscription started, wait few seconds and the segmentation fault happens..

Expected behavior no issue, receiving event normaly

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here (such as operating system, compiler used, git commit hash used, etc.). image

cryptochassis commented 10 months ago

Yes, I am able to reproduce the bug now.