clariusdev / solum

APIs for OEMs to Create Standalone Applications
https://www.clarius.com
BSD 3-Clause "New" or "Revised" License
16 stars 10 forks source link

Memory leaks #30

Open J-Olejnik opened 1 year ago

J-Olejnik commented 1 year ago

I ran into a problem while running your Qt example in debug mode. Everything works fine until you want to close the app with the 'X' button. When you do that, VS throws this exception: mem_leaks

Upon further investigation, I found out that this issue is related to the BLE connection, as the app closes normally until connected to the probes Bluetooth module (searching for available modules is fine, but after a successful BLE connection, it doesn't matter if you are connected to TCP/IP port or not, an exception is thrown when you try to close the application).

Steps to reproduce the behavior:

  1. Run app on Debug mode
  2. Go to BLE tab (you don't have to retrieve the probe credentials)
  3. Click on Search and Connect
  4. Close the app via 'X' button
  5. See error

Additional steps to reveal the cause of this issue prompted me to check for memory leaks. (simple _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);) After closing the app (nothing is connected, just opening the app and closing it right after) this message is printed in the terminal output: mem_leaks2

Environment:

Hope this helps :)

julien-l commented 1 year ago

Thanks for reporting we will have look.

ClaudioHoffmann commented 1 year ago

This is probably fixed in the dev-threads fork (#37).