CYAPI VS2008 Debug version repeated crashes in finishDataXfer | Cypress Semiconductor
CYAPI VS2008 Debug version repeated crashes in finishDataXfer
Whilst attempting to develop a client application to read a variable data stream from a device ( 512bytes - 10meg+ a second ) I opted to use the Asynchronous CYAPI library calls.
After looking at the streamer example I pretty much lifted the xferloop and built it into my own application for testing purposes. What I've found is that if my application allocs any memory even if it's immediatley deleted it appears to conflict with the memory allocations being performed by the API calls. The pointers to the memory I am allocating are not related to the contexts returned by beingDataXfer or freed by finishDataXfer.
I have made my applications project settings match that of the streamer app to ensure that I have all the correct C++ settings yet I will still get crashes to do with data freeing in finishDataXfer either to do with heap corruption when writing past a data size or writing into something thats already been freed. The application is single threaded it's a simple loop of waitForXfer ( after inital setup and begin ) finishDataXfer and beginDataXfer again. There is nothing fancy about the application.
For testing purposes I placed 2 lines after the data call to simulated the handling of the results from a successful read
UCHAR *ptr = new UCHAR;
delete  ptr;
After around 2-3 minutes or less in some cases the app will crash. The only allocs are the one described above and those done by CYAPI.
This does not appear to be an issue in the release version and I'm wondering if this problem is because the API is built as a release version only? Have I missed something very simple here. Without the ability to debug it makes it hard to ensure I'm developing my application correctly.