Sorry for the trouble with this! Everything in the log before “Killed” indicates a USB transfer failure. The device side buffers overflowed, which triggered the device to stop recording. This caused the following read requests on the Logic software to timeout, ending the capture.
The problem here is probably memory. The screenshot shows the software reporting 23 GB in use. The in-app memory reporting is usually off by a lot when analyzers are used, so it’s likely that even more memory was in use.
I expect a few things could have happened:
- The capture stopped not because of a USB problem, but because the USB thread could not allocate new transfer buffers fast enough. This is a common problem when the software memory usage is very high and there is little to no free ram available. The OS has to page memory to disk before it can provide additional RAM, and if the OS takes too long to provide the RAM, the PC will momentarily stop issuing read requests to the device, causing it to time out.
- The “Killed” message. I can’t be 100% sure, but I suspect that the OS has killed our application because it’s run out of memory.
Logic 1.x never dealt with running out of memory well. It relied on the OS to tell it when memory was no longer available, through the std::bad_alloc exception. This would cause our software to stop capturing and stop processing memory. Later we added a memory “airbag” that would get deleted the moment this happened too, but overall, it was not a good solution. This is the most obvious on Linux. On Linux, the OS would pretty much die trying to allocate more memory for the software. On some systems, this would cause the OS to become unresponsive, until either Logic was killed or the user reboot the system.
Logic 2 takes a different approach. Instead, it asks the user to set a memory limit for the capture. (Logic 2 still has some bugs with this, but the experience is much better). Logic 2 also introduces a capture mode called “Looping” where the capture has no definite end (it needs to be stopped by the user) and the oldest recorded data is automatically deleted to ensure the used memory does not exceed the user selected buffer size.
I have a few suggestions:
- Update to Logic 2 and compare its performance.
- Analyzers consume a lot of memory. Especially high speed protocols like I2S. I suggest removing all of your analyzers before starting the capture. Once completed, Save the capture, then add 1 analyzer at a time. This way, memory pressure from the analyzers can’t disrupt the capture, because the capture is already complete. You also might want to try only having 1 analyzer added at a time. I2S analyzers are likely consuming the majority of the memory in use here.
- Take shorter captures. If the software crashes, you will lose the recorded data. Stopping the capture before this happens let’s you keep that data. Logic 1.x has an automation interface that lets you automate recording & saving do disk repeatedly. This tool is designed for that purpose: GitHub - saleae/python-saleae-cli: basic command line utility to automate the Saleae Logic softwar
What are your goals? Do you need to record long durations of I2S Audio? Would a series of shorter captures taken with a short delay (gaps) be acceptable? With this information we could provide better support.