Search Unity

[2017.3.0f3] iOS Build crashes all the time

Discussion in 'iOS and tvOS' started by AlienMe, Dec 20, 2017.

  1. arbt

    arbt

    Joined:
    May 22, 2013
    Posts:
    10
    We are also experiencing the same bug in version 2017.3.0p4.
     
  2. HaakonL

    HaakonL

    Joined:
    Mar 13, 2014
    Posts:
    123
    Same issue here with all versions of .3. Going back to .2p4 in cloudbuild.
     
  3. LimeJuice

    LimeJuice

    Joined:
    Nov 8, 2012
    Posts:
    60
    I am glad I found this thread... I actually spend one evening trying to understand where in my code this error was from... Downgraded as well to 2017.2.1 and now works perfectly!
     
    JamesArndt likes this.
  4. GeorgeCH

    GeorgeCH

    Joined:
    Oct 5, 2016
    Posts:
    222
    A question for more experienced Unity developers: do issues like these - where the entire version of Unity is literally unusable and there's no workaround - happen often with new releases?

    I mean, I've heard that Unity has a bit of a reputation for shipping versions that contain game-breaking bugs (hence the recommendation never to update to the latest version, but to the one just before it - which is exactly what I'm doing here) - but it's the first time I across an issue that is literally game-breaking and that has no workaround.
     
    developersice likes this.
  5. Mitnainartinarian

    Mitnainartinarian

    Joined:
    Jun 3, 2017
    Posts:
    16
    I'm having the same problem with ShouldUpdateTransformBefore (2017.3.0f3). It only crashes when debugging from XCode (and can't be resumed without crashing again). If it's not attached to the debugger it doesn't crash, but I don't feel comfortable releasing it like that. I'll try downgrading Unity like others have.
     
  6. CharlesBarros

    CharlesBarros

    Joined:
    Nov 17, 2011
    Posts:
    61
    Anyone else experiencing random crashes due memory corruption?
    Our app was rock solid when built with Unity 2017.1.1, but now that we upgrade to 2017.3.0p4 it's experiencing a lot of crashes. I dunno if the problem is from Unity side or Vuforia that also updated their plugin (these crashes are really hard to pinpoint where/when they happened, since the resulting crash may happen long after the initial corruption)

    Code (CSharp):
    1. CRASH_INFO_ENTRY_0
    2. abort() called
    3. CRASH_INFO_ENTRY_1
    4. *** error for object 0x64e4fb0: pointer being freed was not allocated
    5.  
    6. Crashed: com.apple.main-thread
    7. 0  libsystem_kernel.dylib         0x22cdec5c __pthread_kill + 8
    8. 1  libsystem_pthread.dylib        0x22d88733 pthread_kill + 62
    9. 2  libsystem_c.dylib              0x22c730ad abort + 108
    10. 3  libsystem_malloc.dylib         0x22d08ef7 free + 438
    11. 4  libc++.1.dylib                 0x227bd809 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string() + 20
    12. 5  libsystem_c.dylib              0x22c739a5 __cxa_finalize_ranges + 300
    13. 6  libsystem_c.dylib              0x22c32fad exit + 12
    14. 7  UIKit                          0x2765d57f -[UIApplication _terminateWithStatus:] + 578
    15. 8  UIKit                          0x278749bd __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke2019 + 908
    16. 9  UIKit                          0x278774c9 _runAfterCACommitDeferredBlocks + 268
    17. 10 UIKit                          0x278837db _cleanUpAfterCAFlushAndRunDeferredBlocks + 90
    18. 11 UIKit                          0x275c1b1d _afterCACommitHandler + 84
    19. 12 CoreFoundation                 0x230156c9 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20
    20. 13 CoreFoundation                 0x230139cd __CFRunLoopDoObservers + 280
    21. 14 CoreFoundation                 0x23013dff __CFRunLoopRun + 958
    22. 15 CoreFoundation                 0x22f63229 CFRunLoopRunSpecific + 520
    23. 16 CoreFoundation                 0x22f63015 CFRunLoopRunInMode + 108
    24. 17 GraphicsServices               0x24553ac9 GSEventRunModal + 160
    25. 18 UIKit                          0x27637189 UIApplicationMain + 144
     
    Last edited: Feb 2, 2018
  7. gowinstudio

    gowinstudio

    Joined:
    Jan 9, 2018
    Posts:
    1
    Same issue. version 2017.3.1 bug is fixed?
     
  8. GeorgeCH

    GeorgeCH

    Joined:
    Oct 5, 2016
    Posts:
    222
    No, the bug exists in all Unity versions beyond 2017.2 - even in 2018.1.
     
  9. dakuru

    dakuru

    Joined:
    Mar 16, 2014
    Posts:
    16
    Appends to me in two cases, first when the UI gets repainted:

    Code (CSharp):
    1. 0   0x00000001018dc9d8 UI::ShouldUpdateTransformBefore(TransformAccessReadOnly const&, TransformAccessReadOnly const&) (RectTransform.cpp:324)
    2. 1   0x00000001018e5520 void std::__1::__insertion_sort_3<bool (*&)(TransformAccessReadOnly const&, TransformAccessReadOnly const&), TransformAccessReadOnly*>(TransformAccessReadOnly*, TransformAccessReadOnly*, bool (*&)(TransformAccessReadOnly const&, TransformAccessReadOnly const&)) (algorithm:3745)
    3. 2   0x00000001018e4ad0 void std::__1::__sort<bool (*&)(TransformAccessReadOnly const&, TransformAccessReadOnly const&), TransformAccessReadOnly*>(TransformAccessReadOnly*, TransformAccessReadOnly*, bool (*&)(TransformAccessReadOnly const&, TransformAccessReadOnly const&)) (algorithm:4022)
    4. 3   0x00000001018dc6ec UI::RectTransform::UpdateIfTransformDispatchIsDirty() (algorithm:4041)
    5. 4   0x00000001018dcc94 UI::RectTransform::GetRect() (RectTransform.cpp:372)
    6. 5   0x0000000101bb6dbc RectTransform_CUSTOM_INTERNAL_get_rect(Il2CppObject*, RectT<float>*) (RectTransformBindings.gen.cpp:38)
    7. 6   0x00000001011b3f08 RectTransform_get_rect_m574169965 (Bulk_UnityEngine.CoreModule_1.cpp:19786)
    8. 7   0x0000000101211380 Graphic_DoMeshGeneration_m3548487693 (Bulk_UnityEngine.UI_0.cpp:42556)
    9. 8   0x0000000101210d78 Graphic_Rebuild_m4084166386 (Bulk_UnityEngine.UI_0.cpp:28)
    10. 9   0x0000000101205648 CanvasUpdateRegistry_PerformUpdate_m1793997159 (Bulk_UnityEngine.UI_0.cpp:33287)
    11. 10  0x0000000101574a70 RuntimeInvoker_Void_t1185182177(void (*)(), MethodInfo const*, void*, void**) (Il2CppInvokerTable.cpp:60321)
    12. 11  0x0000000101ffa92c il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) (Runtime.cpp:461)
    13. 12  0x0000000101943e28 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) (ScriptingApi_Il2Cpp.cpp:213)
    14. 13  0x000000010194b8f0 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) (ScriptingInvocation.cpp:329)
    15. 14  0x0000000101aebbac UI::CanvasManager::WillRenderCanvases() (ScriptingInvocation.h:70)
    16. 15  0x0000000101881930 PlayerLoop() (PlayerLoop.cpp:196)
    17. 16  0x00000001016ad1f4 UnityPlayerLoopImpl(bool) (LibEntryPoint.mm:224)
    18. 17  0x0000000100910f98 UnityRepaint (UnityAppController+Rendering.mm:267)
    19. 18  0x0000000100910e84 -[UnityAppController(Rendering) repaintDisplayLink] (UnityAppController+Rendering.mm:76)
    20. 19  QuartzCore                           0x000000018579d64c CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 668
    21. 20  QuartzCore                           0x0000000185851c0c display_timer_callback(__CFMachPort*, void*, long, void*) + 236
    22. 21  CoreFoundation                       0x00000001817fd090 __CFMachPortPerform + 184
    23. 22  CoreFoundation                       0x0000000181817e00 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    24. 23  CoreFoundation                       0x0000000181817504 __CFRunLoopDoSource1 + 436
    25. 24  CoreFoundation                       0x0000000181814fd8 __CFRunLoopRun + 2192
    26. 25  CoreFoundation                       0x0000000181734c58 CFRunLoopRunSpecific + 432
    27. 26  GraphicsServices                     0x00000001835e0f84 GSEventRunModal + 96
    28. 27  UIKit                                0x000000018ae8d5c4 UIApplicationMain + 232
    29. 28  0x0000000100909f20 main (main.mm:33)

    second when I do a SetParent():

    Code (CSharp):
    1. 0   0x000000010135d954 UI::ShouldUpdateTransformBefore(TransformAccessReadOnly const&, TransformAccessReadOnly const&) (RectTransform.cpp:324)
    2. 1   0x000000010136649c void std::__1::__insertion_sort_3<bool (*&)(TransformAccessReadOnly const&, TransformAccessReadOnly const&), TransformAccessReadOnly*>(TransformAccessReadOnly*, TransformAccessReadOnly*, bool (*&)(TransformAccessReadOnly const&, TransformAccessReadOnly const&)) (algorithm:3745)
    3. 2   0x0000000101365a4c void std::__1::__sort<bool (*&)(TransformAccessReadOnly const&, TransformAccessReadOnly const&), TransformAccessReadOnly*>(TransformAccessReadOnly*, TransformAccessReadOnly*, bool (*&)(TransformAccessReadOnly const&, TransformAccessReadOnly const&)) (algorithm:4022)
    4. 3   0x000000010135d668 UI::RectTransform::UpdateIfTransformDispatchIsDirty() (algorithm:4041)
    5. 4   0x000000010135dc10 UI::RectTransform::GetRect() (RectTransform.cpp:372)
    6. 5   0x000000010135fd18 Transform::SetParent(Transform*, Transform::SetParentOption) (RectTransform.cpp:562)
    7. 6   0x000000010163ed58 Transform_CUSTOM_SetParent(Il2CppObject*, Il2CppObject*, unsigned char) (TransformBindings.gen.cpp:232)
    8. 7   0x0000000100b3ce04 HUDManager_DisplayHitIndicator_m498437649 (Bulk_Scripts_0.cpp:43655)

    I worked around the SetParent() by using the deprecated setter (parent =) on iOS only but the repaint crash is kind of annoying :<

    Edit: appends on 2017.3.0p3
     
  10. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    331
  11. CharlesBarros

    CharlesBarros

    Joined:
    Nov 17, 2011
    Posts:
    61
    Yayyy thanks kognito1!

    Looks like that the 2017.3.1p1 fixed my issue as well:
    "iOS: Fixed trampoline being able to call UI methods ([UIApplication delegate]) from background thread. (956318)"
     
  12. Trung-Hieu

    Trung-Hieu

    Joined:
    Feb 18, 2013
    Posts:
    37
    I still have the problem at Unity 2017.3.1f1 though...
     
  13. abcjjy

    abcjjy

    Joined:
    Mar 6, 2015
    Posts:
    35
    Me too, with 2017.3.1f1
     
  14. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    He said 2017.3.1p1, not 2017.3.1f1.
     
  15. CharlesBarros

    CharlesBarros

    Joined:
    Nov 17, 2011
    Posts:
    61
  16. bilal-carameltech

    bilal-carameltech

    Joined:
    Jul 22, 2014
    Posts:
    4
  17. FTBUnity

    FTBUnity

    Joined:
    Mar 24, 2015
    Posts:
    6
    We've got a game in release with a 50% crash-free users due to this bug. Now we have to upload again and wait for apple's review. This is a huge bug...
     
  18. dakuru

    dakuru

    Joined:
    Mar 16, 2014
    Posts:
    16
    Does anyone have an ETA for the patch release?
     
  19. yanivka

    yanivka

    Joined:
    Jan 17, 2018
    Posts:
    1
  20. CharlesBarros

    CharlesBarros

    Joined:
    Nov 17, 2011
    Posts:
    61
    Is 2017.3.1p1rly stable?
     
  21. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    Not really seeing anything about this bug in the patch notes...?
     
  22. John1515

    John1515

    Joined:
    Nov 29, 2012
    Posts:
    249
    I'm also suddenly getting this after minor changes in my app. At first I think it only happened sometimes, but now everytime I try to run it. What is going on?
    Edit: does the crash at you also happens as soon as you start the app? I have a suspicion that it happens when showing a rect right from when the app starts..
     
    Last edited: Feb 18, 2018
  23. thomas-savysoda

    thomas-savysoda

    Joined:
    Dec 20, 2016
    Posts:
    8
    Tiebo likes this.
  24. mareksabov

    mareksabov

    Joined:
    Mar 31, 2016
    Posts:
    1
    fixed with 2017.3.1p1
     
    Tiebo likes this.
  25. Tiebo

    Tiebo

    Joined:
    Apr 26, 2017
    Posts:
    10
    The patch 2017.3.1p1 also worked for me
     
  26. Casual-Hit

    Casual-Hit

    Joined:
    Apr 20, 2014
    Posts:
    14
    I ran into this problem today in version 2017.3.1f1 and it seems to be a problem from the engine. I managed to fix it after upgrade to 2017.4.1f1.
     
    Mikael-H likes this.
  27. Course-Interactive

    Course-Interactive

    Joined:
    Nov 30, 2015
    Posts:
    6
    Version 2017.4.1f1 fixed the problem for me as well.
     
    Mikael-H likes this.
  28. peterhowell

    peterhowell

    Joined:
    Mar 7, 2015
    Posts:
    7
    Resolved this by upgrading to 2017.4.8f1 LTS.
     
    Mikael-H likes this.
  29. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    Still getting it in 2018.2.2f1.
     
  30. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    Is there any news on this? I believe I am seeing this issue, as reported by Crashlytics, in 2018.2.8f1.
     
  31. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    Are you using ARFoundation? It's causing the crash in my game.
     
  32. mattbrandmm

    mattbrandmm

    Joined:
    Jun 5, 2018
    Posts:
    90
    No, not using ARFoundation.