-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uca_phantom_get_variable freezes after too many immediate consecutive calls #7
Comments
==45885== HEAP SUMMARY:
==45885== in use at exit: 278,165 bytes in 2,329 blocks
==45885== total heap usage: 6,583 allocs, 4,254 frees, 2,483,386 bytes allocated
==45885==
==45885== 14 bytes in 1 blocks are definitely lost in loss record 139 of 1,927
==45885== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==45885== by 0x4935738: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4)
==45885== by 0x494A583: g_strdup (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4)
==45885== by 0x4A8581C: g_inet_address_to_string (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.7200.4)
==45885== by 0x10C70E: uca_phantom_communicate_discover (uca-phantom-communicate.c:456)
==45885== by 0x10C70E: uca_phantom_communicate_attempt_connect (uca-phantom-communicate.c:565)
==45885== by 0x10B982: main (test_network.c:37) So a malloc isn't being free'd before I ctrl+c. |
So actually I introduced the memroy leak by letting github copilot malloc something while forgetting to free it... Darn AI. That being said, the main issue persists. |
Probable causeI might simply be overwhelming the IO capacity of the phantom camera (or the PC ? seems unlikely). This would explain why the only solution to the problem is adding some waiting time between each call. Solutions:
|
Issue was fixed in cad4a3c: was caused by some trailing carriage return |
Problem description
Behaviour is undefined when doing the following:
Indeed, after a certain and seemingly random amount of requests, the program feezes. However, by adding a blocking sleep command at the end of the loop, all requests are made and all answers are received.
Valgrind output
The memory leak is likely due to the communicator object not being freed after the
ctl+c
signal.The text was updated successfully, but these errors were encountered: