# C++ client bad alloc

**URL:** https://forum.heroiclabs.com/t/c-client-bad-alloc/6124
**Category:** Client Libraries
**Created:** [March 27, 2025, 4:30am UTC](https://forum.heroiclabs.com/t/c-client-bad-alloc/6124 "2025-03-27T04:30:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dungeon2567](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/dungeon2567/32/2518_2.png) [@dungeon2567](https://forum.heroiclabs.com/u/dungeon2567)
#### Post date: [March 27, 2025, 4:30am UTC](https://forum.heroiclabs.com/t/c-client-bad-alloc/6124/1 "2025-03-27T04:30:37Z")

</div>

Im getting a c++ bad alloc while trying to call Nakama::createDefaultClient

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/4/40776c2faf04b142afb050240f36158c164c7515.png)

---

<div class="post-metadata">

### Author: ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)
#### Post date: [March 27, 2025, 10:30am UTC](https://forum.heroiclabs.com/t/c-client-bad-alloc/6124/2 "2025-03-27T10:30:17Z")

</div>

@RicardRC maybe you can help out here.

---

<div class="post-metadata">

### Author: ![RicardRC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ricardrc/32/2497_2.png) [@RicardRC](https://forum.heroiclabs.com/u/RicardRC)
#### Post date: [March 28, 2025, 8:27am UTC](https://forum.heroiclabs.com/t/c-client-bad-alloc/6124/3 "2025-03-28T08:27:26Z")

</div>

Hi! Glad to help, but I can’t reproduce, could you give some more context?

1. What’s the target platform (win64? some console?).
2. It’s a grpc client or a rest client?
3. If it’s a rest client, did you choose a different rest api than the default one via compilation flags?
4. What are the platform parameters passed in?
5. Could you share any console output or log that might be created when this crash happens?

Thanks for reporting this!
