iOS crash on std::string allocation

I use a dynamic native library, then crashes about std::string only on UE4, it look like c++ - iphone XS, " std::__1::basic_string, std::__1::allocator >::~basic_string()" Crash - Stack Overflow

I guess it’s about the crash caused by the incompatibility between libstdc++and libc++.

it’s crashing in this function base::SplitstringusingSubstr, this chromium base function, this is no problem, and it is ok on Unity.

Thread 17 Crashed:
0 libsystem_kernel.dylib 0x1caeaa200 __pthread_kill + 8
1 libsystem_pthread.dylib 0x1db0e71ac pthread_kill + 268
2 libsystem_c.dylib 0x195ca1ca0 abort + 180
3 libsystem_malloc.dylib 0x19c9c6548 malloc_vreport + 552
4 libsystem_malloc.dylib 0x19c9c6720 malloc_report + 64
5 libsystem_malloc.dylib 0x19c9aa47c free + 300
6 libc++.1.dylib 0x19cb6671c std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >::~basic_string() + 36
7 TTNetworkManager 0x10d5eefc8 0x10d4ac000 + 1322952

I’m now trying to address the problem. Any advice would be great.

Thank you.

1 Like

Also experiencing this, can you confirm if this on iOS 16?

I believe there’s an issue linking the libc++ library on iOS 16 and UE 4/5

edit: just seeing this goes way back… it looks like the suggested fix here no longer applies beyond iPhone X (yikes!):