Search Issue Tracker
Duplicate
Fixed in 2017.4.X, 2018.2.X
Votes
0
Found in
Issue ID
1094478
Regression
No
iPhone XS Crash When Spawning C++ Thread
Steps to reproduce:
- Export a unity project to iPhone
- Create a C++ thread as such and wait for it to finish executing
- Crash on iPhone XS
Crash sample projects:
https://ufile.io/e8m26
void *reproduce_crash()
{
pthread_setname_np("CrashingThread");
}
call
std::thread(reproduce_crash).detach()
from anywhere. After thread executes it crashes upon cleanup.
The issue only happens on iPhone XS and only when using C++ constructs to spawn a thread, if you use the C pthread functions directly then the crash does not occur.
Its not an iOS 12 or iPhone XS issue since if you create an empty app on Xcode and do these same steps the crash does not occur. It only happens when unity is somehow linked.
If you open the attached samples you will see that the crash only happens with unity.
0 libsystem_c.dylib 0x000000022d4c7094 __abort + 188
1 libsystem_c.dylib 0x000000022d4c6fd8 __abort + 0
2 libsystem_malloc.dylib 0x000000022d5c3c7c _malloc_put + 0
3 libsystem_malloc.dylib 0x000000022d5c3e48 malloc_report + 68
4 libsystem_malloc.dylib 0x000000022d5b5574 free + 412
5 libsystem_pthread.dylib 0x000000022d5ed40c _pthread_tsd_cleanup + 512
6 libsystem_pthread.dylib 0x000000022d5e6cc8 _pthread_exit + 84
7 libsystem_pthread.dylib 0x000000022d5e5a10 _pthread_body + 144
8 libsystem_pthread.dylib 0x000000022d5e5960 _pthread_start + 52
9 libsystem_pthread.dylib 0x000000022d5eddf4 thread_start + 4
The crash always happens on pthread_tsd_cleanup and only on iPhone XS and iPhone XS Max.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- There is no way to adjust the HDR Paper White value of the Unity Editor's interface, making it difficult/uncomfortable for some developers to work on very dark/bright scenes in HDR
- Animator window has a dropdown button that throws “MissingReferenceException” error on a new project when the previous project had a GameObject with an animation
- Animator State name overflows outside the visual box when the State has a long name
- UI Document file remains marked as Dirty after Undoing made changes
- Switching between UI Documents with different Canvas sizes marks the UXML file as dirty
This is a duplicate of issue #1050875