# Mini 2.0 : 9E6 samples cause crash inside LMS\_RecvStream

**URL:** https://discourse.myriadrf.org/t/mini-2-0-9e6-samples-cause-crash-inside-lms-recvstream/13256
**Category:** Lime Suite
**Created:** [13 June 2026 19:06 UTC](https://discourse.myriadrf.org/t/mini-2-0-9e6-samples-cause-crash-inside-lms-recvstream/13256 "2026-06-13T19:06:57Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![zvivered](https://avatars.discourse-cdn.com/v4/letter/z/58f4c7/32.png) [@zvivered](https://discourse.myriadrf.org/u/zvivered)
#### Post date: [13 June 2026 19:06 UTC](https://discourse.myriadrf.org/t/mini-2-0-9e6-samples-cause-crash-inside-lms-recvstream/13256/1 "2026-06-13T19:06:57Z")

</div>

Hello,

I’m using the singleRX.cpp sample code.  
The following code spcifies the data size:

```auto
//Data buffers
const int buffersize = 10000; //complex samples per buffer
float buffer[buffersize * 2]; //must hold I+Q values of each sample
//Start streaming
LMS_StartStream(&streamId);
...
int samplesRead = LMS_RecvStream(&streamId, buffer, buffersize, NULL, 1000);

```

Instead of 10000 complex samples I tried 4E6 samples.

This scenario cause a crash inside LMS\_RecvStream.

Is there any limit on number of samples ?

When I changed to 2E6 it worked fine.

Instead of calling once to LMS\_RecvStream I called it several times till I got 9E6 samples.

Each time I read 0x40000 samples (262144)

Is this the right solution ?

Thank you,

Zvi

---

<div class="post-metadata">

### Author: ![Arnius](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@Arnius](https://discourse.myriadrf.org/u/Arnius)
#### Post date: [15 June 2026 08:05 UTC](https://discourse.myriadrf.org/t/mini-2-0-9e6-samples-cause-crash-inside-lms-recvstream/13256/2 "2026-06-15T08:05:20Z")

</div>

Hi,

Is there a particular reason you want to use the `limesuiteng-legacyapi` library and the old API?

For new boards (and LimeSDR Mini 2.0) we recommend that you use the `limesuiteng` library and LimeSuiteNG library API instead since it is a more up to date software stack that is actively maintained and has issues like these already resolved.

> **[Application Programming Interface — Lime Suite NG latest documentation](https://myriadrf.org/projects/limesuiteng/developer/doxygen/related_pages/sorted_api.html)**

---

<div class="post-metadata">

### Author: ![zvivered](https://avatars.discourse-cdn.com/v4/letter/z/58f4c7/32.png) [@zvivered](https://discourse.myriadrf.org/u/zvivered)
#### Post date: [15 June 2026 11:42 UTC](https://discourse.myriadrf.org/t/mini-2-0-9e6-samples-cause-crash-inside-lms-recvstream/13256/3 "2026-06-15T11:42:22Z")

</div>

Hi,

The only reason I used the legacy API that it’s syntex is simpler.

Thank you,

Zvi

---

<div class="post-metadata">

### Author: ![N0YKG](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@N0YKG](https://discourse.myriadrf.org/u/N0YKG)
#### Post date: [15 June 2026 12:28 UTC](https://discourse.myriadrf.org/t/mini-2-0-9e6-samples-cause-crash-inside-lms-recvstream/13256/4 "2026-06-15T12:28:26Z")

</div>

Is that buffer defined as a file static variable, or is that an auto variable in a function? If the latter, you are likely exceeding the stack space allocated for the program.  
I _strongly_ urge that you at least allocate that buffer on the heap with operator new() (and assign it to a std::unique\_ptr\<\> or std::shared\_ptr\<\>), or preferably use a std::vector\<\> to contain the data.

---

<div class="post-metadata">

### Author: ![andrewback](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@andrewback](https://discourse.myriadrf.org/u/andrewback)
#### Post date: [17 June 2026 08:56 UTC](https://discourse.myriadrf.org/t/mini-2-0-9e6-samples-cause-crash-inside-lms-recvstream/13256/5 "2026-06-17T08:56:37Z")

</div>

> [@zvivered](#):
>
> The only reason I used the legacy API that it’s syntex is simpler.

It will be deprecated, hence we strongly advise against creating new applications which use this.
