# Bug in MemryX runtime v2.2

**URL:** <https://community.memryx.com/t/bug-in-memryx-runtime-v2-2/199>\
**Category:** Technical Support\
**Created:** [April 17, 2026, 10:53pm UTC](https://community.memryx.com/t/bug-in-memryx-runtime-v2-2/199 "2026-04-17T22:53:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![barkas](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@barkas](https://community.memryx.com/u/barkas)\
**Post date:** [April 17, 2026, 10:53pm UTC](https://community.memryx.com/t/bug-in-memryx-runtime-v2-2/199/1 "2026-04-17T22:53:57Z")

</div>

Trying to run MemryX in local mode (by setting `local_mode = true` and `ignore_server_ = false`  
in `MX::Runtime::MxAccl` constructor leads to a crash with  
`vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)`  
exception.

How to reproduce:  
In `MemryX_eXamples/video_inference/object_detection_yolo11_mxprepost/src/python/run_objectiondetection.py` line 87 set `ignore_server=True` and run the example.

The reason is in DFPRunner.cpp:132-151:  
When `ignore_server_` is `true`, `converted_dev_ids_` is never populated by `convert_device_ids()` — it is only set in the else branch. As a result:

The device loop that calls `memx_open` iterated 0 times → `open_contexts_` remained empty

The size check `open_contexts_.size() != converted_dev_ids_.size()` passed (0 == 0), so no error was caught.

`MxModel` was created with `local_mode_ = true` but an empty `open_contexts_`

In input\_loop/manual\_input\_loop, `open_contexts_.at(ctx_infer_idx)` throws `std::out_of_range` because `ctx_infer_idx = 0` but the vector had size 0.

---

<div class="post-metadata">

**Author:** ![mx-tim](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.memryx.com/mx-tim/32/62_2.png) [@mx-tim](https://community.memryx.com/u/mx-tim)\
**Post date:** [April 20, 2026, 2:21pm UTC](https://community.memryx.com/t/bug-in-memryx-runtime-v2-2/199/2 "2026-04-20T14:21:05Z")

</div>

Hi @barkas ,

Thanks for finding this, this does appear to be a bug!

More generally, note we do discourage using `ignore_server=True`. Without communicating with `mxa-manager` to get an exclusive lock on the device (local mode), there’s the possibility multiple applications may try to use the same device simultaneously, which may lock up the chip and need a reboot. We added this option a while back for a customer using a very slim Yocto build [who continue to use only SDK 2.0 C++ API], so to be honest this flag hasn’t been well tested in pybind MxAccl 😅

So thank you for finding this – we’ll incorporate it in a patch to 2.2 soon!
