ios - App freezes when showing a UITextView with short text -
i have simple tab-bar application no code beyond template provided xcode when starting project.
i add new uiviewcontroller
, put uitextview
inside of it, , change text in default short "console". (autolayout or not irrelevant.)
when attempt run application (device or simulator - ios 9) after tapping tab uitextview
freezes app. app doesn't crash, after long time, buttons become entirely unresponsive until quit.
same happens simple single screen app uitextview not text.
the amount of text tricky determine, it's around 11 characters, not based on length (different amounts of different letters not entirely based on visual length seems cause it: 11 a
's i
's or m
's crash it, aaaabbbbc
, aaaabbbbcc
not).
the text must plain, attributed text never causes hang.
appears stuck looping in objc_msgsend
, best can tell goes instruction on line 1 below line 26 , line 01 forever (or few passes @ least) don't know how introspect assembly in xcode's debug view i'm stuck debugging well.
libobjc.a.dylib`objc_msgsend: 01: 0x10c795800 <+0>: testq %rdi, %rdi 02: 0x10c795803 <+3>: jle 0x10c795850 ; <+80> 03: 0x10c795805 <+5>: movq (%rdi), %r11 04: 0x10c795808 <+8>: movq %rsi, %r10 05: 0x10c79580b <+11>: andl 0x18(%r11), %r10d 07: 0x10c79580f <+15>: shlq $0x4, %r10 08: 0x10c795813 <+19>: addq 0x10(%r11), %r10 09: 0x10c795817 <+23>: cmpq (%r10), %rsi 10: 0x10c79581a <+26>: jne 0x10c795820 ; <+32> 11: 0x10c79581c <+28>: jmpq *0x8(%r10) 12: 0x10c795820 <+32>: cmpq $0x1, (%r10) 13: 0x10c795824 <+36>: jbe 0x10c795833 ; <+51> 14: 0x10c795826 <+38>: addq $0x10, %r10 15: 0x10c79582a <+42>: cmpq (%r10), %rsi 16: 0x10c79582d <+45>: jne 0x10c795820 ; <+32> 17: 0x10c79582f <+47>: jmpq *0x8(%r10) 18: 0x10c795833 <+51>: jb 0x10c795871 ; <+113> 19: 0x10c795835 <+53>: movq 0x8(%r10), %r10 20: 0x10c795839 <+57>: jmp 0x10c795845 ; <+69> 21: 0x10c79583b <+59>: cmpq $0x1, (%r10) 22: 0x10c79583f <+63>: jbe 0x10c79584e ; <+78> 23: 0x10c795841 <+65>: addq $0x10, %r10 24: 0x10c795845 <+69>: cmpq (%r10), %rsi 25: 0x10c795848 <+72>: jne 0x10c79583b ; <+59> 26: 0x10c79584a <+74>: jmpq *0x8(%r10) 27: ... continues
why uitextview short text cause app hang?
edit: question presumed hang occurred when uitextview
inside of uiscrollview
, on further testing happens regardless of uiscrollview
being present.
Comments
Post a Comment