I submitted a game to iTunes Connect that was created using Unity5.1.1f1 personal and xCode6.4, and unfortunately it was rejected due to the game crashed when tested by them. I've symbolicated the crash log but can't be sure what exactly the is the cause while running it on a test device using iOS8.4 (the same as Apple's tester) doesn't cause any crash at all (tested by directly installing through xCode and installing through Test Flight). Part of the crash log are pasted below:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001964fb270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000019659916c pthread_kill + 108
2 libsystem_c.dylib 0x0000000196472b14 abort + 108
3 libsystem_c.dylib 0x0000000196447a38 __assert_rtn + 88
4 Metal 0x0000000186b93b0c MTLReportFailure + 452
5 Metal 0x0000000186b6b24c validateWritePixels + 704
6 AGXMetal 0x0000000105994c44 0x10597c000 + 101444
7 AGXMetal 0x00000001059bc084 0x10597c000 + 262276
8 Metal 0x0000000186b6ce80 -[MTLIOAccelTexture replaceRegion:mipmapLevel:withBytes:bytesPerRow:] + 76
9 HitAndRescue 0x0000000100970208 TexturesMetal::UploadTextureSubData2D(TextureID, unsigned char const*, int, int, int, int, int, TextureFormat, TextureColorSpace) (TexturesMetal.mm:253)
10 HitAndRescue 0x000000010096b4e0 GfxDeviceMetal::UploadTextureSubData2D(TextureID, unsigned char const*, int, int, int, int, int, int, TextureFormat, TextureColorSpace) (GfxDeviceMetal.mm:1722)
11 HitAndRescue 0x000000010091510c TextRenderingPrivate::Font::AddCharacterToTexture(unsigned int, int, unsigned int) (Font.cpp:685)
12 HitAndRescue 0x000000010091564c TextRenderingPrivate::Font::CacheFontForText(unsigned short*, int, int, unsigned int, std::__1::vector>) (Font.cpp:827)
13 HitAndRescue 0x0000000100922c54 TextRenderingPrivate::NativeTextGenerator::Setup() (TextGenerator.cpp:208)
14 HitAndRescue 0x0000000100926db0 TextRenderingPrivate::TextMeshGenerator::Generate() (TextMeshGenerator.cpp:294)
15 HitAndRescue 0x0000000100926c0c TextRenderingPrivate::TextMeshGenerator::Get(UTF16String const&, TextRenderingPrivate::Font*, TextAnchor, TextAlignment, float, float, float, bool, bool, ColorRGBA32, int, int) (TextMeshGenerator.cpp:99)
16 HitAndRescue 0x0000000100911620 TextRenderingModule::TMGenGet(UTF16String const&, TextRendering::Font*, TextAnchor, TextAlignment, float, float, float, bool, bool, ColorRGBA32, int, int) const (TextRenderingModule.cpp:20)
17 HitAndRescue 0x0000000100654798 IMGUI::GetGenerator(RectT const&, GUIContent const&, TextRendering::Font*, TextAnchor, bool, bool, ColorRGBA32, int, int, ImagePosition) (IMGUIUtils.cpp:77)
18 HitAndRescue 0x0000000100650db4 GUIStyle::GetGenerator(RectT const&, GUIContent&) const (GUIStyle.cpp:598)
19 HitAndRescue 0x000000010065108c GUIStyle::CalcSize(GUIContent&) const (GUIStyle.cpp:435)
20 HitAndRescue 0x000000010095f604 GUIStyle_CUSTOM_Internal_CalcSize(void*, ScriptingObject*, Vector2fIcall*) (GUIStyleBindings.gen.cpp:660)
21 HitAndRescue 0x0000000100238490 GUIStyle_CalcSize_m2752 (Bulk_UnityEngine_0.cpp:17509)
22 HitAndRescue 0x0000000100066c10 GUIHelper_GetSuggestedFontSizeFull_m1719 (Bulk_Assembly-CSharp_0.cpp:33257)
23 HitAndRescue 0x00000001000a8f84 SignupScreen_InitLayoutVariable_m2399 (Bulk_Assembly-CSharp_1.cpp:23558)
24 HitAndRescue 0x00000001000a5e2c SignupScreen__ctor_m2394 (Bulk_Assembly-CSharp_1.cpp:23316)
25 HitAndRescue 0x00000001000a5b70 LoginScreen_Start_m2349 (Bulk_Assembly-CSharp_1.cpp:21572)
26 HitAndRescue 0x00000001003c2da4 RuntimeInvoker_Void_t189(MethodInfo const*, void*, void**) (GeneratedInvokers.cpp:12)
27 HitAndRescue 0x0000000100dd09e0 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppObject**) (Runtime.cpp:299)
28 HitAndRescue 0x00000001006d4f24 ScriptingInvocation::Invoke(ScriptingException**, bool) (ScriptingInvocation.cpp:128)
29 HitAndRescue 0x00000001006cf1c4 MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodIl2Cpp, ScriptingObject*, ScriptingException**) (MonoBehaviour.cpp:844)
30 HitAndRescue 0x00000001006cf710 MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodIl2Cpp, ScriptingObject*) (MonoBehaviour.cpp:926)
31 HitAndRescue 0x00000001006ce6bc MonoBehaviour::DoGUI(MonoBehaviour::GUILayoutType, int) (MonoBehaviour.cpp:358)
32 HitAndRescue 0x000000010064cd64 GUIManager::DoGUIEvent(InputEvent&, bool) (GUIManager.cpp:315)
33 HitAndRescue 0x000000010064d2b4 GUIManager::SendQueuedEvents() (GUIManager.cpp:142)
34 HitAndRescue 0x0000000100683d68 PlayerLoop(bool, bool, IHookEvent*) (Player.cpp:1829)
35 HitAndRescue 0x0000000100487024 UnityPlayerLoopImpl(bool) (LibEntryPoint.mm:235)
36 HitAndRescue 0x000000010000b47c UnityRepaint (UnityAppController+Rendering.mm:246)
37 HitAndRescue 0x000000010000b2e0 __51-[UnityAppController(Rendering) repaintDisplayLink]_block_invoke (UnityAppController+Rendering.mm:52)
38 libdispatch.dylib 0x00000001963b5990 _dispatch_call_block_and_release + 20
39 libdispatch.dylib 0x00000001963b5950 _dispatch_client_callout + 12
40 libdispatch.dylib 0x00000001963ba208 _dispatch_main_queue_callback_4CF + 1604
41 CoreFoundation 0x000000018411f7f4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
42 CoreFoundation 0x000000018411d89c __CFRunLoopRun + 1488
43 CoreFoundation 0x00000001840492d0 CFRunLoopRunSpecific + 392
44 GraphicsServices 0x000000018d9776f8 GSEventRunModal + 164
45 UIKit 0x0000000188c46f3c UIApplicationMain + 1484
46 HitAndRescue 0x00000001000055d0 main (main.mm:40)
47 libdyld.dylib 0x00000001963e2a04 start + 0
I'm quite new to iOS but from what I can see; the crash is appeared after "validateWritePixels"? My game's name in the log is HitAndRescue and the last of my own function being called was "GetSuggestedFontSizeFull". The function was used a few time before the crash so I'm not sure if that's the cause.
I really can't make heads of tails on this issue. Is there some settings I need to change? Some code I shouldn't use? The "Metal" seems to be something from iOS itself, so is there something in my code that's upsetting it? If my device actually crashed, I could just keep testing to find the issue by changing settings and codes, but it's not. So I'm not sure what to do.
↧