iOS crash in libmbedtls

So, we’re in the process of updating some of our old games to the most recent lime/openfl/hxcpp. Everything’s going well apart from we’re consistently getting a crash on iOS, specifically in mbedtls_platform_zeroize() in platform_util.c, after doing a URLLoader load. xcode shows EXC_BAD_ACCESS.

It doesn’t happen every time, it seems somewhat random. ChatGPT thinks it’s probably a memory corruption during TLS cleanup.

This game is doing a lot of calls to the server, but it’s stable on Android and other platforms (hl, windows, mac, android are fine).

I haven’t had a chance to do a proper look at it yet, but I was just wondering if this is a known issue on iOS?

Thanks,
Greg

Are you updating to lime 8.2.2, or the master version on github?

Some people have had issues with ios from mbedtls, due to conflicts between the mbedtls used by lime and hxcpp (ios requires static linking, which means only one version can exist, overwriting the other). It is worth opening an issue on github, preferably with some stack traces of the crash if that’s possible.

The version we are using is the master version on github. Same with hxcpp. I will try and gather some stack traces etc and open an issue as suggested. Thanks.

I just posted an issue on Lime github with a stack trace at:

It is actually happening every time I try and load anything using HTTPRequest.load. It feels like something in the newest hxcpp might be broken or at least not working with Lime? I don’t have the most experience with this though so I might be doing something wrong. Any help would be appreciated,

Thanks,
Greg