-
Notifications
You must be signed in to change notification settings - Fork 318
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
iio_buffer_destroy segfault via usb #1116
Comments
Can you upload your |
There you go, I hope I didn't miss anything, I took out practically all the options to lighten the library. I just need the communication via USB #ifndef IIO_CONFIG_H
#define IIO_CONFIG_H
#define LIBIIO_VERSION_MAJOR 1
#define LIBIIO_VERSION_MINOR 0
#define LIBIIO_VERSION_GIT "v1.0"
#define LOG_LEVEL Info_L
#define DEFAULT_LOG_LEVEL 4
#define IIO_MODULES_DIR ""
#define IIO_LIBRARY_SUFFIX ".so"
#define IF_ENABLED(cfg, ptr) ((cfg) ? (ptr) : NULL)
#define LIBIIO_SCAN_BACKENDS "usb"
#define WITH_LOCAL_BACKEND 0
#define WITH_XML_BACKEND 1
#define WITH_NETWORK_BACKEND 0
#define WITH_USB_BACKEND 1
#define WITH_SERIAL_BACKEND 0
#define WITH_MODULES 0
#define WITH_NETWORK_BACKEND_DYNAMIC 0
#define WITH_SERIAL_BACKEND_DYNAMIC 0
#define WITH_USB_BACKEND_DYNAMIC 0
#define WITH_NETWORK_EVENTFD 0
#define WITH_IIOD_USBD 0
#define WITH_IIOD_SERIAL 0
#define WITH_LOCAL_CONFIG 0
#define WITH_LOCAL_DMABUF_API 0
#define WITH_LOCAL_MMAP_API 0
#define WITH_HWMON 0
#define WITH_AIO 0
#define HAVE_DNS_SD 0
#define HAVE_AVAHI 0
#define WITH_ZSTD 1
/* #undef HAS_PIPE2 */
#define HAS_STRDUP
#define HAS_STRNDUP
#define HAS_STRTOK_R
#define HAS_STRERROR_R
#define HAS_NEWLOCALE
/* #undef HAS_PTHREAD_SETNAME_NP */
/* #undef HAVE_IPV6 */
/* #undef NO_THREADS */
#define IF_ENABLED(cfg, ptr) ((cfg) ? (ptr) : NULL)
#endif /* IIO_CONFIG_H */ |
It looks like you are using an older version of the library, there are some macros missing here. Can you re-try with the latest "main"? |
#ifndef IIO_CONFIG_H
#define IIO_CONFIG_H
#define LIBIIO_VERSION_MAJOR 1
#define LIBIIO_VERSION_MINOR 0
#define LIBIIO_VERSION_GIT "v1.0"
#define LOG_LEVEL Info_L
#define DEFAULT_LOG_LEVEL 4
#define MAX_LOG_LEVEL 5
#define IIO_MODULES_DIR ""
#define IIO_LIBRARY_SUFFIX ".so"
#define IF_ENABLED(cfg, ptr) ((cfg) ? (ptr) : NULL)
#define LIBIIO_SCAN_BACKENDS "usb"
#define WITH_LOCAL_BACKEND 0
#define WITH_XML_BACKEND 1
#define WITH_NETWORK_BACKEND 0
#define WITH_USB_BACKEND 1
#define WITH_SERIAL_BACKEND 0
#define WITH_MODULES 0
#define WITH_NETWORK_BACKEND_DYNAMIC 0
#define WITH_SERIAL_BACKEND_DYNAMIC 0
#define WITH_USB_BACKEND_DYNAMIC 0
#define WITH_NETWORK_EVENTFD 0
#define WITH_IIOD_NETWORK 0
#define WITH_IIOD_USBD 0
#define WITH_IIOD_SERIAL 0
#define WITH_IIOD_V0_COMPAT 0
#define WITH_LOCAL_CONFIG 0
#define WITH_LOCAL_DMABUF_API 0
#define WITH_LOCAL_MMAP_API 0
#define WITH_HWMON 0
#define WITH_AIO 0
#define HAVE_DNS_SD 0
#define HAVE_AVAHI 0
#define WITH_ZSTD 1
/* #undef HAS_PIPE2 */
#define HAS_STRDUP
#define HAS_STRNDUP
#define HAS_STRTOK_R
#define HAS_STRERROR_R
#define HAS_NEWLOCALE
/* #undef HAS_PTHREAD_SETNAME_NP */
/* #undef HAVE_IPV6 */
/* #undef NO_THREADS */
#define IF_ENABLED(cfg, ptr) ((cfg) ? (ptr) : NULL)
#endif /* IIO_CONFIG_H */ Now I'm using the latest one, but still segfault |
I am trying to reproduce your segfault, running |
What's iio_rwdev? |
|
@raccoman Can you maybe run it under GDB, and get a backtrace after it segfaults? |
Sure, I'll try on Monday |
Any progress? Can you try my |
Thanks, I'll try as soon as I can. I was busy this week |
@pcercuei Hi |
@pcercuei Nevermind, it seems to segfault less frequently, but still freeze on buffer clear |
I'm having trouble closing and reopening a stream. During the execution of my application there is a possibility to change the
n_blocks
andblock_size
parameters. (the input parameters at the time of creating the stream).Here is how I create the stream:
Here is how I destroy it, before recreating it passing new parameters:
This should work fine, but quite always it segfault or freeze while calling
iio_buffer_destroy
The text was updated successfully, but these errors were encountered: