Hey dotsha, Thanks for bringing us this great library.
Unfortunately, I run into a problem when using your library and run my app in the debugger.
When running my app in debugbuild, but without gdb running, everything is great, however, whenever I run my app under control of gdb, the app throws and terminates.
I was able to nail down the problem to this piece of code:
|
recv_len = recvfrom(sock, message, sizeof(message), 0, |
|
(struct sockaddr *) &addr, &addrlen); |
|
time_t nowTime = time(NULL); |
|
|
|
if (recv_len < 0) { |
|
|
|
if (errno != EWOULDBLOCK) { |
|
ostringstream buf; |
|
buf << "recvfrom returned " << recv_len << " errno is " << errno |
|
<< endl; |
|
throw runtime_error(buf.str()); |
|
}; |
Obviously, the socket is not correctly established yet and hence, the recv_len == -1. So the function throws, but this is not caught anywhere.
Do you have an idea, how to resolve that problem and why it only happens when debugging the app.
Regards,
Felix
Hey dotsha, Thanks for bringing us this great library.
Unfortunately, I run into a problem when using your library and run my app in the debugger.
When running my app in debugbuild, but without gdb running, everything is great, however, whenever I run my app under control of gdb, the app throws and terminates.
I was able to nail down the problem to this piece of code:
libXPlane-UDP-Client/src/libsrc/XPlaneBeaconListener.cpp
Lines 146 to 157 in 7637d36
Obviously, the socket is not correctly established yet and hence, the
recv_len == -1. So the function throws, but this is not caught anywhere.Do you have an idea, how to resolve that problem and why it only happens when debugging the app.
Regards,
Felix