Search Unity

the iOS project which unity export crashed when append a string which length equal or more than 64

Discussion in 'iOS and tvOS' started by doom_sil, Apr 9, 2019.

  1. doom_sil

    doom_sil

    Joined:
    Mar 14, 2017
    Posts:
    5
    upload_2019-4-9_10-43-37.png
    it will not crash in a debug mode, only crash when you archive a .ipa and run it in your device.
     
  2. doom_sil

    doom_sil

    Joined:
    Mar 14, 2017
    Posts:
    5
    the unity version is 2018.2.10f1, Xcode version is 10.2 (10E125)
     
  3. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    516
    I am so curious what bug is this so I tried your test and it does not crash on my end.

    Could you share a stack trace when it crashes?
     
  4. doom_sil

    doom_sil

    Joined:
    Mar 14, 2017
    Posts:
    5
    Thanks to reply.
    this is the crash log

    ----------

    Incident Identifier: 6112620D-21E8-4114-B7CE-E3DD613B49DE
    CrashReporter Key: f41eb0fd95b17fd5838c971eb2a8f62e52c9593b
    Hardware Model: iPhone8,1
    Process: testmakeup [3935]
    Path: /private/var/containers/Bundle/Application/B7BDD24A-9033-4A12-8886-CA98C100A29D/testmakeup.app/testmakeup
    Identifier: com.kivisense.testmakeup
    Version: 1 (2.0)
    Code Type: ARM-64 (Native)
    Role: Foreground
    Parent Process: launchd [1]
    Coalition: com.kivisense.testmakeup [1635]


    Date/Time: 2019-04-16 10:20:51.0668 +0800
    Launch Time: 2019-04-16 10:20:50.2085 +0800
    OS Version: iPhone OS 12.2 (16E227)
    Baseband Version: 5.55.00
    Report Version: 104

    Exception Type: EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Exception Note: EXC_CORPSE_NOTIFY
    Triggered by Thread: 0

    Application Specific Information:
    abort() called

    Thread 0 name: Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0 libsystem_kernel.dylib 0x00000001a2eca0dc __pthread_kill + 8
    1 libsystem_pthread.dylib 0x00000001a2f43094 pthread_kill$VARIANT$mp + 380
    2 libsystem_c.dylib 0x00000001a2e23ea8 abort + 140
    3 libsystem_malloc.dylib 0x00000001a2f1d780 _malloc_put + 0
    4 libsystem_malloc.dylib 0x00000001a2f1d938 malloc_report + 60
    5 libsystem_malloc.dylib 0x00000001a2f105e8 free + 532
    6 libc++.1.dylib 0x00000001a24d8818 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__grow_by_and_replace+ 260120 (unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*) + 248
    7 libc++.1.dylib 0x00000001a24d8668 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append+ 259688 (char const*, unsigned long) + 108
    8 testmakeup 0x00000001041740b0 appendTest() + 32944 (main.mm:45)
    9 testmakeup 0x0000000104173fa0 main + 32672 (main.mm:24)
    10 libdyld.dylib 0x00000001a2d7e8e0 start + 4

    ----------
     
  5. doom_sil

    doom_sil

    Joined:
    Mar 14, 2017
    Posts:
    5
  6. doom_sil

    doom_sil

    Joined:
    Mar 14, 2017
    Posts:
    5
    ok, i solved the question, you must take the appendTest function after the UnityInitRuntime, although it run well but i am so confused.